diff --git a/Makefile b/Makefile index 2e53911..25afbfb 100644 --- a/Makefile +++ b/Makefile @@ -5,18 +5,18 @@ macosBundle = ../jaildoctors_dilemma_release/JailDoctor's Dilemma.app/Contents/ windows: @echo off if not exist data\config (mkdir data\config) - g++ $(source) -std=c++11 -Wall -O2 -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o $(executable).exe + g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o $(executable).exe strip -s -R .comment -R .gnu.version $(executable).exe --strip-unneeded macos: rm -rdf data/config mkdir -p data/config - g++ $(source) -std=c++11 -Wall -O2 -lSDL2 -ffunction-sections -fdata-sections -o $(executable)_macos + g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o $(executable)_macos macos_f: rm -rdf data/config mkdir -p data/config cp -r data "$(macosBundle)Resources" cp -r "$(macosBundle)/Frameworks" . - clang++ $(source) -std=c++11 -Wall -O2 -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(macosBundle)MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12 + clang++ $(source) -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(macosBundle)MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12 rm -rdf ./Frameworks linux: rm -rdf data/config diff --git a/data/enemies/spark.ani b/data/enemies/spark.ani new file mode 100644 index 0000000..065fd45 --- /dev/null +++ b/data/enemies/spark.ani @@ -0,0 +1,9 @@ +frameWidth=8 +frameHeight=16 + +[animation] +name=default +speed=6 +loop=0 +frames=0,1,2,3 +[/animation] \ No newline at end of file diff --git a/data/enemies/spark.png b/data/enemies/spark.png new file mode 100644 index 0000000..550eedc Binary files /dev/null and b/data/enemies/spark.png differ diff --git a/data/enemies/z80.ani b/data/enemies/z80.ani new file mode 100644 index 0000000..830ed70 --- /dev/null +++ b/data/enemies/z80.ani @@ -0,0 +1,9 @@ +frameWidth=16 +frameHeight=32 + +[animation] +name=default +speed=8 +loop=0 +frames=0,1,2,3 +[/animation] \ No newline at end of file diff --git a/data/enemies/z80.png b/data/enemies/z80.png new file mode 100644 index 0000000..e06da52 Binary files /dev/null and b/data/enemies/z80.png differ diff --git a/data/items/items.png b/data/items/items.png index 97e01a6..7ef91c2 100644 Binary files a/data/items/items.png and b/data/items/items.png differ diff --git a/data/room/01.room b/data/room/01.room index b82ce27..ef9d02f 100644 --- a/data/room/01.room +++ b/data/room/01.room @@ -93,13 +93,13 @@ tileSetFile=printer.png animation=printer.ani width=16 height=16 -x=2 +x=3 y=9 vx=0 vy=0 -x1=2 +x1=3 y1=9 -x2=2 +x2=3 y2=9 color=white [/enemy] @@ -109,13 +109,13 @@ tileSetFile=printer.png animation=printer.ani width=16 height=16 -x=5 +x=6 y=9 vx=0 vy=0 -x1=5 +x1=6 y1=9 -x2=5 +x2=6 y2=9 color=white [/enemy] @@ -126,13 +126,13 @@ animation=lamp.ani width=16 height=16 x=23 -y=5 +y=6 vx=0 vy=0 x1=23 -y1=5 +y1=6 x2=23 -y2=5 +y2=6 color=white [/enemy] diff --git a/data/room/01.tmx b/data/room/01.tmx index 33f0d70..4f9e28c 100644 --- a/data/room/01.tmx +++ b/data/room/01.tmx @@ -3,18 +3,18 @@ -188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188, -188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, -188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164, +164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,43,43,43,43,43,43,43,43,43,43,43,43,43,43,164, +164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, +164,43,43,43,43,43,43,43,43,43,43,43,43,43,43,164,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34, -43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, -43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, -34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, -34,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, -34,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, -34,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, -34,34,34,34,34,34,34,34,34,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, +43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,34,34,34,34,0,0,0,0,0,0,0,0,0,0,34,34,34, +34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,0,0,0,0,0,0,0,0,0,0,0,0,34,34, +34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, +34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, +34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, +34,34,34,34,34,34,34,34,34,0,0,0,0,0,0,0,34,138,139,0,0,0,0,0,0,0,0,0,0,0,0,34, 34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34, 34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, diff --git a/data/room/36.room b/data/room/36.room index c31b13d..ac022a4 100644 --- a/data/room/36.room +++ b/data/room/36.room @@ -1,6 +1,6 @@ -name=no 36 +name=STATIC bgColor=black -border=red +border=bright_cyan tileMapFile=36.tmx tileSetFile=standard.png roomUp=0 diff --git a/data/room/36.tmx b/data/room/36.tmx index ee220e2..6765118 100644 --- a/data/room/36.tmx +++ b/data/room/36.tmx @@ -3,22 +3,22 @@ -25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, +118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119, +119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25 +0,0,119,118,119,118,119,118,119,118,119,118,119,118,119,354,0,118,119,118,119,118,119,118,119,118,119,118,119,118,0,0, +0,0,118,119,118,119,118,119,118,119,118,119,118,119,118,0,354,119,118,119,118,119,118,119,118,119,118,119,118,119,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,354,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,354,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,354,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,354,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,354,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119,118,119 diff --git a/data/room/37.room b/data/room/37.room index 2e37530..091e5eb 100644 --- a/data/room/37.room +++ b/data/room/37.room @@ -1,33 +1,108 @@ -name=no 37 +name=CHIP'N CHIP bgColor=black -border=red +border=bright_green tileMapFile=37.tmx tileSetFile=standard.png roomUp=0 roomDown=0 roomLeft=38.room roomRight=36.room +itemColor1=green +itemColor2=red [enemy] -tileSetFile=diskette.png -animation=diskette.ani +tileSetFile=z80.png +animation=z80.ani width=16 -height=16 -x=2 -y=2 +height=32 +x=15 +y=1 vx=0 -vy=0 -x1=2 -y1=2 -x2=2 -y2=2 -color=magenta +vy=0.3 +x1=15 +y1=1 +x2=15 +y2=10 +color=bright_green [/enemy] +[enemy] +tileSetFile=chip.png +animation=chip.ani +width=8 +height=16 +x=1 +y=8 +vx=0.3 +vy=0 +x1=1 +y1=8 +x2=6 +y2=8 +color=bright_green +[/enemy] + +[enemy] +tileSetFile=chip.png +animation=chip.ani +width=8 +height=16 +x=28 +y=8 +vx=0.3 +vy=0 +x1=25 +y1=8 +x2=30 +y2=8 +color=bright_green +[/enemy] + +[enemy] +tileSetFile=shock.png +animation=shock.ani +width=8 +height=8 +x=8 +y=1 +vx=0 +vy=1 +x1=8 +y1=1 +x2=8 +y2=14 +color=bright_green +[/enemy] + +[enemy] +tileSetFile=shock.png +animation=shock.ani +width=8 +height=8 +x=23 +y=7 +vx=0 +vy=1 +x1=23 +y1=1 +x2=23 +y2=14 +color=bright_green +[/enemy] + + [item] tileSetFile=items.png -tile=1 -x=1 -y=1 +tile=57 +x=3 +y=6 counter=1 +[/item] + +[item] +tileSetFile=items.png +tile=57 +x=26 +y=5 +counter=2 [/item] \ No newline at end of file diff --git a/data/room/37.tmx b/data/room/37.tmx index d644fd8..1171a5c 100644 --- a/data/room/37.tmx +++ b/data/room/37.tmx @@ -3,22 +3,22 @@ -44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44, +114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,377,377,377,0,0,0,0,377,377,377,0,0,0,0, +0,0,114,115,0,0,0,0,0,0,0,377,377,377,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,44,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44 +0,0,0,0,0,0,0,0,0,0,377,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,431,432,431,432,431,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,115,114,115,114,115,0, +0,0,0,0,0,0,0,0,0,0,377,377,377,116,0,0,0,0,116,377,377,377,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,140,0,0,0,0,140,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,377,377,377,0,116,0,0,0,0,116,0,377,377,377,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,140,555,555,555,555,140,0,0,0,0,0,0,0,0,0,0,0,0,0, +114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115 diff --git a/data/room/38.room b/data/room/38.room index 281b9b4..4a50c0e 100644 --- a/data/room/38.room +++ b/data/room/38.room @@ -1,5 +1,5 @@ name=THE FINAL CROSSOVER -bgColor=black +bgColor=bright_black border=yellow tileMapFile=38.tmx tileSetFile=standard.png @@ -13,13 +13,13 @@ tileSetFile=arounder_stop.png animation=arounder_stop.ani width=7 height=8 -x=8 +x=9 y=11 vx=0 vy=0 -x1=8 +x1=9 y1=11 -x2=8 +x2=9 y2=11 color=white [/enemy] @@ -49,7 +49,7 @@ x=12 y=1 vx=0.5 vy=0 -x1=9 +x1=11 y1=1 x2=16 y2=1 @@ -57,6 +57,23 @@ color=white flip=true [/enemy] +[enemy] +tileSetFile=arounders_door.png +animation=arounders_door.ani +width=16 +height=16 +x=9 +y=0 +vx=0 +vy=0 +x1=9 +y1=0 +x2=9 +y2=0 +color=yellow +flip=true +[/enemy] + [enemy] tileSetFile=arounder_fly.png animation=arounder_fly.ani @@ -83,11 +100,11 @@ x=12 y=10 vx=0.2 vy=0 -x1=9 +x1=10 y1=10 x2=17 y2=10 -color=yellow +color=bright_yellow flip=true [/enemy] diff --git a/data/room/38.tmx b/data/room/38.tmx index 3a8b484..abea954 100644 --- a/data/room/38.tmx +++ b/data/room/38.tmx @@ -3,8 +3,8 @@ -21,21,21,21,21,21,21,23,24,21,21,21,21,21,21,21,21,23,24,21,21,21,21,21,21,21,21,21,21,21,21,21, -21,21,0,0,0,21,21,47,48,0,0,0,0,0,0,0,0,47,48,21,21,0,0,0,0,0,0,0,0,0,0,0, +21,21,21,21,21,21,21,23,24,0,0,21,21,21,21,21,21,23,24,21,21,21,21,21,21,21,21,21,21,21,21,21, +21,21,0,0,0,21,21,47,48,0,0,0,0,0,0,0,0,47,48,21,21,21,0,0,0,21,21,21,21,21,0,0, 21,0,0,0,0,0,21,21,223,224,224,224,224,224,224,224,224,224,224,225,0,0,0,0,0,0,0,0,0,0,0,0, 21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,335,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,359,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -13,11 +13,11 @@ 21,21,0,0,263,398,398,335,0,0,0,0,397,0,0,0,397,0,0,0,0,0,0,0,0,506,21,21,21,21,0,0, 21,0,0,0,287,0,0,359,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,506,0,0,0,263,0,0,0, 21,0,0,0,311,0,0,383,0,0,0,0,0,0,0,0,0,0,0,397,399,399,400,397,0,0,0,0,287,0,0,0, -0,0,0,399,397,398,399,400,0,0,0,0,0,0,0,0,0,0,0,335,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,399,397,398,399,400,0,0,0,0,0,0,0,0,0,0,0,335,0,0,0,0,0,0,0,0,287,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,383,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,217,218,218,218,218,218,218,218,218,218,218,218,219,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,264,0,0,0,0,0,0,0,0,264,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,556,0,0,0,312,0,0,0,0,0,0,0,0,312,0,0,0,556,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,217,218,218,218,218,218,218,218,218,218,218,218,218,219,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,264,0,0,0,0,0,0,0,0,0,0,0,264,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,556,0,0,312,0,0,0,0,0,0,0,0,0,0,0,312,0,556,0,0,0,0,0,311,0,0,0, 218,218,218,219,21,21,21,21,21,21,557,557,557,557,557,557,557,557,21,21,21,21,21,21,21,220,221,221,221,221,221,222 diff --git a/data/tilesets/standard.png b/data/tilesets/standard.png index d1d88dc..fa6ac91 100644 Binary files a/data/tilesets/standard.png and b/data/tilesets/standard.png differ diff --git a/data/tilesets/standard_zxarne.png b/data/tilesets/standard_zxarne.png index 62c36cb..69a7c9b 100644 Binary files a/data/tilesets/standard_zxarne.png and b/data/tilesets/standard_zxarne.png differ diff --git a/source/director.cpp b/source/director.cpp index 9c1b208..a65eb6f 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -381,11 +381,13 @@ void Director::loadResources(section_t section) textureList.push_back("sam.png"); textureList.push_back("sigmasua.png"); textureList.push_back("spider.png"); + textureList.push_back("spark.png"); textureList.push_back("tuno.png"); textureList.push_back("tv_panel.png"); textureList.push_back("tv.png"); textureList.push_back("shock.png"); textureList.push_back("wave.png"); + textureList.push_back("z80.png"); // Player textureList.push_back("player.png"); @@ -437,11 +439,13 @@ void Director::loadResources(section_t section) animationList.push_back("sam.ani"); animationList.push_back("sigmasua.ani"); animationList.push_back("spider.ani"); + animationList.push_back("spark.ani"); animationList.push_back("tuno.ani"); animationList.push_back("tv_panel.ani"); animationList.push_back("tv.ani"); animationList.push_back("shock.ani"); animationList.push_back("wave.ani"); + animationList.push_back("z80.ani"); // Player animationList.push_back("player.ani"); @@ -532,12 +536,14 @@ void Director::loadResources(section_t section) textureList.push_back("qvoid.png"); textureList.push_back("sam.png"); textureList.push_back("sigmasua.png"); + textureList.push_back("spark.png"); textureList.push_back("spider.png"); textureList.push_back("tuno.png"); textureList.push_back("tv_panel.png"); textureList.push_back("tv.png"); textureList.push_back("shock.png"); textureList.push_back("wave.png"); + textureList.push_back("z80.png"); // Items textureList.push_back("items.png"); @@ -595,12 +601,14 @@ void Director::loadResources(section_t section) animationList.push_back("qvoid.ani"); animationList.push_back("sam.ani"); animationList.push_back("sigmasua.ani"); + animationList.push_back("spark.ani"); animationList.push_back("spider.ani"); animationList.push_back("tuno.ani"); animationList.push_back("tv_panel.ani"); animationList.push_back("tv.ani"); animationList.push_back("shock.ani"); animationList.push_back("wave.ani"); + animationList.push_back("z80.ani"); resource->loadAnimations(animationList); @@ -1193,6 +1201,8 @@ bool Director::setFileList() asset->add(prefix + "/data/enemies/sam.png", t_bitmap); asset->add(prefix + "/data/enemies/sigmasua.ani", t_data); asset->add(prefix + "/data/enemies/sigmasua.png", t_bitmap); + asset->add(prefix + "/data/enemies/spark.ani", t_data); + asset->add(prefix + "/data/enemies/spark.png", t_bitmap); asset->add(prefix + "/data/enemies/spider.ani", t_data); asset->add(prefix + "/data/enemies/spider.png", t_bitmap); asset->add(prefix + "/data/enemies/tuno.ani", t_data); @@ -1205,6 +1215,8 @@ bool Director::setFileList() asset->add(prefix + "/data/enemies/shock.png", t_bitmap); asset->add(prefix + "/data/enemies/wave.ani", t_data); asset->add(prefix + "/data/enemies/wave.png", t_bitmap); + asset->add(prefix + "/data/enemies/z80.ani", t_data); + asset->add(prefix + "/data/enemies/z80.png", t_bitmap); // Jugador asset->add(prefix + "/data/player/player.png", t_bitmap); diff --git a/source/ending2.cpp b/source/ending2.cpp index 059d369..af97b2a 100644 --- a/source/ending2.cpp +++ b/source/ending2.cpp @@ -288,9 +288,11 @@ void Ending2::iniSpriteList() spriteList.push_back("diskette"); spriteList.push_back("bird"); spriteList.push_back("chip"); + spriteList.push_back("spark"); spriteList.push_back("code"); spriteList.push_back("paco"); spriteList.push_back("printer"); + spriteList.push_back("z80"); spriteList.push_back("bell"); spriteList.push_back("dong"); diff --git a/source/enemy.cpp b/source/enemy.cpp index 4c727fc..cc67fdd 100644 --- a/source/enemy.cpp +++ b/source/enemy.cpp @@ -21,6 +21,7 @@ Enemy::Enemy(enemy_t enemy) sprite->setWidth(enemy.w); sprite->setHeight(enemy.h); doFlip = enemy.flip; + mirror = enemy.mirror; if (doFlip) { if (enemy.vx < 0.0f) diff --git a/source/enemy.h b/source/enemy.h index c6ae180..2580788 100644 --- a/source/enemy.h +++ b/source/enemy.h @@ -26,6 +26,7 @@ struct enemy_t int y1; // Limite superior de la ruta en el eje Y int y2; // Limite inferior de la ruta en el eje Y bool flip; // Indica si el enemigo hace flip al terminar su ruta + bool mirror; // Indica si el enemigo está volteado verticalmente std::string color; // Color del enemigo palette_e palette; // Paleta de colores }; @@ -46,6 +47,7 @@ private: int y2; // Limite inferior de la ruta en el eje Y SDL_Rect collider; // Caja de colisión bool doFlip; // Indica si el enemigo hace flip al terminar su ruta + bool mirror; // Indica si el enemigo se dibuja volteado verticalmente // Comprueba si ha llegado al limite del recorrido para darse media vuelta void checkPath(); diff --git a/source/room.cpp b/source/room.cpp index 18ebd1d..252ec0d 100644 --- a/source/room.cpp +++ b/source/room.cpp @@ -78,6 +78,7 @@ room_t loadRoomFile(std::string file_path, bool verbose) { enemy_t enemy; enemy.flip = false; + enemy.mirror = false; enemy.palette = p_zxspectrum; do @@ -316,6 +317,11 @@ bool setEnemy(enemy_t *enemy, std::string var, std::string value) enemy->flip = stringToBool(value); } + else if (var == "mirror") + { + enemy->mirror = stringToBool(value); + } + else if (var == "color") { enemy->color = value; @@ -734,7 +740,7 @@ tile_e Room::getTile(SDL_Point point) // Devuelve el tipo de tile que hay en ese indice tile_e Room::getTile(int index) { - //const bool onRange = (index > -1) && (index < mapWidth * mapHeight); + // const bool onRange = (index > -1) && (index < mapWidth * mapHeight); const bool onRange = (index > -1) && (index < (int)tileMap.size()); if (onRange) @@ -975,7 +981,7 @@ void Room::setTopSurfaces() } } - // Añade un terminador + // Añade un terminador tile.push_back(-1); // Recorre el vector de tiles buscando tiles consecutivos para localizar las superficies @@ -1036,7 +1042,7 @@ void Room::setLeftSurfaces() } } - // Añade un terminador + // Añade un terminador tile.push_back(-1); // Recorre el vector de tiles buscando tiles consecutivos @@ -1084,7 +1090,7 @@ void Room::setRightSurfaces() } } - // Añade un terminador + // Añade un terminador tile.push_back(-1); // Recorre el vector de tiles buscando tiles consecutivos diff --git a/todo.txt b/todo.txt index f0ef122..9472c13 100644 --- a/todo.txt +++ b/todo.txt @@ -56,7 +56,7 @@ x (A) Las vidas del marcador no estan animadas. No cambian de frame (A) Mejorar las cintas. no permitir saltar hacia atras x (A) Cambio de paleta en caliente x (A) Precargar todos los recursos del juego -(A) Deshabilitar el input hasta que se suelten todas las teclas +x (A) Deshabilitar el input hasta que se suelten todas las teclas ## TEMAS @@ -73,7 +73,7 @@ x mini ascii mappy x paco x chirping -abad y batman +x abad y batman x jail counter strike starcraft @@ -84,7 +84,7 @@ molotov tutorials gavina puzzle restorer -qvoid +x qvoid brick roll dante's fall repairing computers