Level modifications
This commit is contained in:
parent
16f7e091e3
commit
c446d2d6f4
|
@ -16,7 +16,8 @@ monsters
|
||||||
1 34 16
|
1 34 16
|
||||||
1 27 28
|
1 27 28
|
||||||
1 32 20
|
1 32 20
|
||||||
132 30 13 488 224 488 472
|
132 30 13 488 224 488 224 488 472
|
||||||
|
23 36 12
|
||||||
endmonsters
|
endmonsters
|
||||||
exitdir 1
|
exitdir 1
|
||||||
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,0,0,0,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,0,0,0,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
||||||
|
|
|
@ -36,8 +36,8 @@ monsters
|
||||||
16 31 6
|
16 31 6
|
||||||
16 5 8
|
16 5 8
|
||||||
16 35 17
|
16 35 17
|
||||||
132 8 18 136 304 239 304
|
132 8 18 136 304 136 304 239 304
|
||||||
132 31 18 504 304 371 304
|
132 31 18 504 304 504 304 371 304
|
||||||
endmonsters
|
endmonsters
|
||||||
exitdir 1
|
exitdir 1
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
|
@ -47,9 +47,9 @@ exitdir 1
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,58,58,58,58,58,58,58,58,58,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,62,62,62,62,62,62,62,62,62,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,58,58,58,58,58,58,58,58,58,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,62,62,62,62,62,62,62,62,62,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
|
|
|
@ -36,34 +36,34 @@ monsters
|
||||||
15 11 21
|
15 11 21
|
||||||
endmonsters
|
endmonsters
|
||||||
exitdir 1
|
exitdir 1
|
||||||
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,0,0,0,0,0,0,57,
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,56,53,53,53,53,53,53,56,
|
||||||
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,53,53,53,53,53,53,56,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,56,56,56,56,56,56,56,56,56,56,56,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,58,58,58,58,58,58,58,58,58,58,60,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,56,56,56,56,56,56,56,56,56,56,56,0,0,57,
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,57,57,57,57,57,57,57,57,57,57,57,0,0,57,
|
|
||||||
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,45,45,45,45,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,45,45,45,45,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,61,0,0,0,0,0,0,0,59,58,58,58,58,58,58,58,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,56,0,0,0,0,0,0,0,56,56,56,56,56,56,56,56,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,61,61,61,0,0,0,0,0,0,57,57,57,57,57,57,57,57,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,56,56,56,0,0,0,0,0,0,56,56,56,56,56,56,56,56,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,61,61,61,61,61,61,61,61,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,56,56,56,56,56,56,56,56,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,61,0,0,0,0,61,61,61,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,56,0,0,0,0,56,56,56,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,67,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,67,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,0,0,0,0,0,67,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,0,0,0,0,0,67,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,0,30,0,0,0,0,67,67,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
57,0,30,0,0,0,0,67,67,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,
|
||||||
57,56,56,15,15,15,15,15,15,15,15,15,15,15,56,56,56,56,56,56,56,56,56,56,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,57,
|
57,56,56,15,15,15,15,15,15,15,15,15,15,15,56,56,56,56,56,56,56,56,56,56,56,56,56,56,58,58,58,58,58,58,58,58,58,58,58,57,
|
||||||
57,57,56,15,15,15,15,15,15,15,15,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,56,15,15,15,15,15,15,15,15,15,15,15,56,56,56,56,56,56,56,56,56,56,56,56,56,56,57,57,57,57,57,57,57,57,57,57,57,57,
|
||||||
57,57,56,15,15,15,15,15,15,15,15,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,56,15,15,15,15,15,15,15,15,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
||||||
57,57,56,15,15,15,15,15,15,15,15,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,56,15,15,15,15,15,15,15,15,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
||||||
57,57,56,15,15,65,67,67,67,67,66,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,56,15,15,65,67,67,67,67,66,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
||||||
57,57,56,56,56,56,67,67,67,67,56,56,56,56,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,56,56,56,56,67,67,67,67,56,56,56,56,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
||||||
57,57,57,57,57,56,67,67,67,67,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
56,56,56,56,56,56,67,67,67,67,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,
|
||||||
57,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,67,67,57,
|
56,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,67,67,56,
|
||||||
57,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,67,67,67,57,
|
56,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,67,67,67,56,
|
||||||
57,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,67,67,67,67,57,
|
56,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,67,67,67,67,56,
|
||||||
57,65,65,65,65,65,65,65,65,65,65,65,65,65,15,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,67,67,67,67,67,57,
|
56,65,65,65,65,65,65,65,65,65,65,65,65,65,15,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,67,67,67,67,67,56,
|
||||||
57,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,67,67,67,67,67,67,57,
|
56,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,67,67,67,67,67,67,56,
|
||||||
57,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,67,67,67,67,67,67,57,
|
56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,67,67,67,67,67,67,56,
|
||||||
layer2
|
layer2
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
bgfile kitchen1.png
|
bgfile kitchen3.png
|
||||||
bg 0
|
bg 0
|
||||||
hurryup 30
|
hurryup 30
|
||||||
help
|
help
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
bgfile kitchen2.png
|
bgfile kitchen3.png
|
||||||
bg 0
|
bg 0
|
||||||
hurryup 30
|
hurryup 30
|
||||||
help
|
help
|
||||||
|
@ -27,9 +27,9 @@ monsters
|
||||||
16 5 22
|
16 5 22
|
||||||
1 29 23
|
1 29 23
|
||||||
1 7 23
|
1 7 23
|
||||||
132 6 20 104 336 536 336
|
132 6 20 104 336 104 336 536 336
|
||||||
132 37 17 600 288 34 288
|
132 37 17 600 288 600 288 34 288
|
||||||
132 31 14 504 240 137 240
|
132 31 14 504 240 504 240 137 240
|
||||||
endmonsters
|
endmonsters
|
||||||
exitdir 1
|
exitdir 1
|
||||||
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
||||||
|
@ -57,9 +57,9 @@ exitdir 1
|
||||||
57,57,57,57,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,57,57,57,57,
|
57,57,57,57,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,57,57,57,57,
|
||||||
57,57,57,57,57,58,0,0,0,0,0,0,0,0,0,0,59,58,58,58,58,58,60,0,0,0,0,0,0,0,0,0,0,0,58,57,57,57,57,57,
|
57,57,57,57,57,58,0,0,0,0,0,0,0,0,0,0,59,58,58,58,58,58,60,0,0,0,0,0,0,0,0,0,0,0,58,57,57,57,57,57,
|
||||||
57,57,57,57,57,57,58,58,58,58,58,58,58,58,58,58,57,57,57,57,57,57,57,58,58,58,58,58,58,58,58,58,58,58,57,57,57,57,57,57,
|
57,57,57,57,57,57,58,58,58,58,58,58,58,58,58,58,57,57,57,57,57,57,57,58,58,58,58,58,58,58,58,58,58,58,57,57,57,57,57,57,
|
||||||
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,25,25,25,25,25,57,57,25,25,25,25,57,57,57,57,25,57,57,25,25,25,25,57,57,25,57,57,25,57,57,25,57,57,57,25,57,57,25,57,
|
||||||
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,57,24,57,57,57,57,24,57,57,57,25,57,57,57,24,57,57,24,57,57,57,57,57,24,25,25,57,57,57,24,25,25,25,24,57,57,24,57,
|
||||||
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,57,24,57,57,57,57,24,25,25,25,57,57,57,57,24,57,57,24,57,57,57,57,57,24,57,24,57,57,57,57,57,24,57,57,57,57,57,57,
|
||||||
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,57,24,57,57,57,57,24,57,57,57,25,57,57,57,24,57,57,24,25,25,25,57,57,24,57,57,25,57,57,57,57,24,57,57,57,57,25,57,
|
||||||
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,
|
||||||
layer2
|
layer2
|
||||||
|
|
2
defs.h
2
defs.h
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
/* files */
|
/* files */
|
||||||
#define FILE_LEVELMAP "map.dat"
|
#define FILE_LEVELMAP "map.dat"
|
||||||
|
#define FILE_TILEDEFS "tiledefs.dat"
|
||||||
|
#define DIR_LEVELS "levels"
|
||||||
|
|
||||||
|
|
||||||
/* Macros */
|
/* Macros */
|
||||||
|
|
15
edit.c
15
edit.c
|
@ -27,7 +27,6 @@ int selsprite = -1;
|
||||||
int modified = B_FALSE; // has the current level been modified since last save?
|
int modified = B_FALSE; // has the current level been modified since last save?
|
||||||
|
|
||||||
|
|
||||||
int curworld = 1;
|
|
||||||
int curlevelnum;
|
int curlevelnum;
|
||||||
|
|
||||||
int skipto = -1;
|
int skipto = -1;
|
||||||
|
@ -166,7 +165,7 @@ int main (int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* init tiles */
|
/* init tiles */
|
||||||
if (loadtiletypes("green.tiles")) {
|
if (loadtiletypes(FILE_TILEDEFS)) {
|
||||||
printf("Cannot initialise tiles\n");
|
printf("Cannot initialise tiles\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -206,7 +205,7 @@ int main (int argc, char **argv) {
|
||||||
|
|
||||||
state = LS_EDIT;
|
state = LS_EDIT;
|
||||||
|
|
||||||
if (loadlevel(curworld,curlevelnum, B_TRUE)) {
|
if (loadlevel(curlevelnum, B_TRUE)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -603,7 +602,7 @@ int main (int argc, char **argv) {
|
||||||
if (toggletimer == 0) {
|
if (toggletimer == 0) {
|
||||||
if (curlevelnum < (numlevels-1)) {
|
if (curlevelnum < (numlevels-1)) {
|
||||||
curlevelnum++;
|
curlevelnum++;
|
||||||
loadlevel(curworld, curlevelnum, B_TRUE);
|
loadlevel(curlevelnum, B_TRUE);
|
||||||
draweditorlevel();
|
draweditorlevel();
|
||||||
drawsprites();
|
drawsprites();
|
||||||
toggletimer = 30;
|
toggletimer = 30;
|
||||||
|
@ -617,7 +616,7 @@ int main (int argc, char **argv) {
|
||||||
if (toggletimer == 0) {
|
if (toggletimer == 0) {
|
||||||
if (curlevelnum > 1) {
|
if (curlevelnum > 1) {
|
||||||
curlevelnum--;
|
curlevelnum--;
|
||||||
loadlevel(curworld, curlevelnum, B_TRUE);
|
loadlevel(curlevelnum, B_TRUE);
|
||||||
draweditorlevel();
|
draweditorlevel();
|
||||||
drawsprites();
|
drawsprites();
|
||||||
toggletimer = 30;
|
toggletimer = 30;
|
||||||
|
@ -662,7 +661,7 @@ int main (int argc, char **argv) {
|
||||||
/* SAVE LEVEL */
|
/* SAVE LEVEL */
|
||||||
if (keys[SDLK_s]) {
|
if (keys[SDLK_s]) {
|
||||||
if (modified) {
|
if (modified) {
|
||||||
savelevel(curworld,curlevelnum);
|
savelevel(curlevelnum);
|
||||||
setmod(B_FALSE);
|
setmod(B_FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -977,7 +976,7 @@ void drawpalette(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int savelevel(int wnum, int lnum) {
|
int savelevel(int lnum) {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int x,y;
|
int x,y;
|
||||||
char filename[BUFLEN];
|
char filename[BUFLEN];
|
||||||
|
@ -985,7 +984,7 @@ int savelevel(int wnum, int lnum) {
|
||||||
sprite_t *s;
|
sprite_t *s;
|
||||||
|
|
||||||
|
|
||||||
sprintf(filename,"%s/world%d/%s",datadir,wnum,levelentry[lnum].filename);
|
sprintf(filename,"%s/%s/%s",datadir,DIR_LEVELS,levelentry[lnum].filename);
|
||||||
|
|
||||||
f = fopen(filename,"wt");
|
f = fopen(filename,"wt");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
|
|
2
edit.h
2
edit.h
|
@ -46,7 +46,7 @@ void draweditortile(SDL_Surface *where, int x, int y);
|
||||||
void drawtilehint(SDL_Surface *where, tiletype_t *tt, double x, double y);
|
void drawtilehint(SDL_Surface *where, tiletype_t *tt, double x, double y);
|
||||||
void drawpalette(void);
|
void drawpalette(void);
|
||||||
void drawsprites(void);
|
void drawsprites(void);
|
||||||
int savelevel(int wnum, int lnum);
|
int savelevel(int lnum);
|
||||||
void cleanup(void);
|
void cleanup(void);
|
||||||
void usage(void);
|
void usage(void);
|
||||||
void clearlevel(void);
|
void clearlevel(void);
|
||||||
|
|
15
rc.c
15
rc.c
|
@ -128,7 +128,6 @@ int gtime = 0;
|
||||||
int fpsticks = 0;
|
int fpsticks = 0;
|
||||||
int fpsstart = 0;
|
int fpsstart = 0;
|
||||||
|
|
||||||
int curworld;
|
|
||||||
int curlevelnum;
|
int curlevelnum;
|
||||||
int skipto = -1; // which level to skip to
|
int skipto = -1; // which level to skip to
|
||||||
level_t *curlevel;
|
level_t *curlevel;
|
||||||
|
@ -321,7 +320,7 @@ int main (int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* init tiles */
|
/* init tiles */
|
||||||
if (loadtiletypes("green.tiles")) {
|
if (loadtiletypes(FILE_TILEDEFS)) {
|
||||||
printf("Cannot initialise tiles\n");
|
printf("Cannot initialise tiles\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -1114,9 +1113,9 @@ void nextlevel(void) {
|
||||||
// load next level data
|
// load next level data
|
||||||
if (haspowerupany(PW_PHONE) && !isbosslevel(curlevelnum)) {
|
if (haspowerupany(PW_PHONE) && !isbosslevel(curlevelnum)) {
|
||||||
// don't add monsters
|
// don't add monsters
|
||||||
loadlevel(curworld,curlevelnum, B_FALSE);
|
loadlevel(curlevelnum, B_FALSE);
|
||||||
} else {
|
} else {
|
||||||
loadlevel(curworld,curlevelnum, B_TRUE);
|
loadlevel(curlevelnum, B_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// remmeber layer 2 in case we replace it with water
|
// remmeber layer 2 in case we replace it with water
|
||||||
|
@ -9680,7 +9679,6 @@ void startgame(void) {
|
||||||
|
|
||||||
// initial variables
|
// initial variables
|
||||||
curlevelnum = 1;
|
curlevelnum = 1;
|
||||||
curworld = 1; // TODO: REMOVE THIS
|
|
||||||
musicplaying = B_FALSE;
|
musicplaying = B_FALSE;
|
||||||
levelcompletetime = -1;
|
levelcompletetime = -1;
|
||||||
oldlevelcomplete = -1;
|
oldlevelcomplete = -1;
|
||||||
|
@ -9755,13 +9753,6 @@ void startgame(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// pre-load initial level
|
|
||||||
/*
|
|
||||||
if (loadlevel(curworld,curlevelnum, B_TRUE)) {
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// more initial variables
|
// more initial variables
|
||||||
if (player) {
|
if (player) {
|
||||||
makeinvuln(player);
|
makeinvuln(player);
|
||||||
|
|
8
shared.c
8
shared.c
|
@ -20,7 +20,7 @@
|
||||||
#include "shared.h"
|
#include "shared.h"
|
||||||
|
|
||||||
|
|
||||||
int loadlevel(int wnum, int lnum, int wantmonsters) {
|
int loadlevel(int lnum, int wantmonsters) {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int x,y;
|
int x,y;
|
||||||
int xx,yy;
|
int xx,yy;
|
||||||
|
@ -49,12 +49,11 @@ int loadlevel(int wnum, int lnum, int wantmonsters) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
printf("Loading level %d-%d...",wnum,lnum);
|
printf("Loading level %d-%d (seq %d) %s...",getworld(lnum), getlevel(lnum), lnum,levelentry[lnum].filename);
|
||||||
|
|
||||||
sprintf(filename,"%s/world%d/%s",datadir,wnum,levelentry[lnum].filename);
|
sprintf(filename,"%s/%s/%s",datadir,DIR_LEVELS,levelentry[lnum].filename);
|
||||||
//filename = levelentry[lnum].filename;
|
//filename = levelentry[lnum].filename;
|
||||||
|
|
||||||
//sprintf(filename, "world%d/level%d.dat",wnum,lnum);
|
|
||||||
f = fopen(filename,"rt");
|
f = fopen(filename,"rt");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
printf("can't open level file %s\n",filename);
|
printf("can't open level file %s\n",filename);
|
||||||
|
@ -83,7 +82,6 @@ int loadlevel(int wnum, int lnum, int wantmonsters) {
|
||||||
if (level->animtiles) free(level->animtiles);
|
if (level->animtiles) free(level->animtiles);
|
||||||
|
|
||||||
level->id = levelentry[lnum].id;
|
level->id = levelentry[lnum].id;
|
||||||
//sprintf(level->name, "Level %d-%d",wnum,lnum);
|
|
||||||
sprintf(level->name, "%s",levelentry[lnum].desc);
|
sprintf(level->name, "%s",levelentry[lnum].desc);
|
||||||
level->prev = NULL;
|
level->prev = NULL;
|
||||||
level->next = NULL;
|
level->next = NULL;
|
||||||
|
|
2
shared.h
2
shared.h
|
@ -5,7 +5,7 @@
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
int loadlevel(int wnum, int lnum, int wantmonsters);
|
int loadlevel(int lnum, int wantmonsters);
|
||||||
void setdefaults(sprite_t *s);
|
void setdefaults(sprite_t *s);
|
||||||
int loadtiletypes(char *filename);
|
int loadtiletypes(char *filename);
|
||||||
sprite_t *addsprite(int id,int x, int y, char *name);
|
sprite_t *addsprite(int id,int x, int y, char *name);
|
||||||
|
|
Loading…
Reference in New Issue