diff --git a/.gitignore b/.gitignore
index 5c56f06..99ab783 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,6 @@
.vscode
bin
-data/config.txt
-data/score.bin
+*config.txt
dll
docs
icon
diff --git a/Makefile b/Makefile
index fc85bf8..cf12afb 100644
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,15 @@ source = source/*.cpp source/common/*.cpp
windows:
@echo off
if not exist bin\ (mkdir bin)
+ 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 bin/$(executable).exe
strip -s -R .comment -R .gnu.version bin/$(executable).exe --strip-unneeded
macos:
mkdir -p bin
+ mkdir -p data/config
g++ $(source) -std=c++11 -Wall -O2 -lSDL2 -ffunction-sections -fdata-sections -o bin/$(executable)_macos
linux:
mkdir -p bin
+ mkdir -p data/config
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o bin/$(executable)_linux
strip -s -R .comment -R .gnu.version bin/$(executable)_linux --strip-unneeded
\ No newline at end of file
diff --git a/data/config/config.txt b/data/config/config.txt
deleted file mode 100644
index 76d12ec..0000000
--- a/data/config/config.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-fullScreenMode=0
-windowSize=3
-filter=FILTER_NEAREST
-vSync=true
-integerScale=true
-keepAspect=true
-borderEnabled=true
-borderSize=0.100000
diff --git a/data/enemies/bry.ani b/data/enemies/bry.ani
new file mode 100644
index 0000000..7d64c84
--- /dev/null
+++ b/data/enemies/bry.ani
@@ -0,0 +1,9 @@
+frameWidth=10
+frameHeight=16
+
+[animation]
+name=default
+speed=6
+loop=0
+frames=0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,4,5,4,5,4,5,4,5,4,5,4,5,4,5,4,5,4,5,4,5,4,5,4,5
+[/animation]
\ No newline at end of file
diff --git a/data/enemies/bry.png b/data/enemies/bry.png
new file mode 100644
index 0000000..59f0d0e
Binary files /dev/null and b/data/enemies/bry.png differ
diff --git a/data/enemies/lamp.ani b/data/enemies/lamp.ani
new file mode 100644
index 0000000..01d177d
--- /dev/null
+++ b/data/enemies/lamp.ani
@@ -0,0 +1,9 @@
+frameWidth=16
+frameHeight=16
+
+[animation]
+name=default
+speed=4
+loop=0
+frames=0,1
+[/animation]
\ No newline at end of file
diff --git a/data/enemies/lamp.png b/data/enemies/lamp.png
new file mode 100644
index 0000000..c1333dc
Binary files /dev/null and b/data/enemies/lamp.png differ
diff --git a/data/enemies/tv.ani b/data/enemies/tv.ani
new file mode 100644
index 0000000..1facc66
--- /dev/null
+++ b/data/enemies/tv.ani
@@ -0,0 +1,9 @@
+frameWidth=16
+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/tv.png b/data/enemies/tv.png
new file mode 100644
index 0000000..2bb004e
Binary files /dev/null and b/data/enemies/tv.png differ
diff --git a/data/enemies/tv_panel.ani b/data/enemies/tv_panel.ani
new file mode 100644
index 0000000..b9ec4ed
--- /dev/null
+++ b/data/enemies/tv_panel.ani
@@ -0,0 +1,9 @@
+frameWidth=24
+frameHeight=16
+
+[animation]
+name=default
+speed=4
+loop=0
+frames=0,1,2,3
+[/animation]
\ No newline at end of file
diff --git a/data/enemies/tv_panel.png b/data/enemies/tv_panel.png
new file mode 100644
index 0000000..4d5fb98
Binary files /dev/null and b/data/enemies/tv_panel.png differ
diff --git a/data/items/items.png b/data/items/items.png
index 18764e4..67066b3 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 a3d0560..0363cd0 100644
--- a/data/room/01.room
+++ b/data/room/01.room
@@ -118,4 +118,84 @@ y1=9
x2=5
y2=9
color=white
-[/enemy]
\ No newline at end of file
+[/enemy]
+
+[enemy]
+tileset=lamp.png
+animation=lamp.ani
+width=16
+height=16
+x=23
+y=5
+vx=0
+vy=0
+x1=23
+y1=5
+x2=23
+y2=5
+color=white
+[/enemy]
+
+[enemy]
+tileset=bry.png
+animation=bry.ani
+width=8
+height=16
+x=17
+y=13
+vx=0
+vy=0
+x1=17
+y1=13
+x2=17
+y2=13
+color=white
+[/enemy]
+
+#[enemy]
+#tileset=tv_panel.png
+#animation=tv_panel.ani
+#width=24
+#height=16
+#x=18
+#y=9
+#vx=0
+#vy=0
+#x1=18
+#y1=9
+#x2=18
+#y2=9
+#color=white
+#[/enemy]
+#
+#[enemy]
+#tileset=tv_panel.png
+#animation=tv_panel.ani
+#width=24
+#height=16
+#x=22
+#y=9
+#vx=0
+#vy=0
+#x1=22
+#y1=9
+#x2=22
+#y2=9
+#color=white
+#[/enemy]
+#
+#[enemy]
+#tileset=tv_panel.png
+#animation=tv_panel.ani
+#width=24
+#height=16
+#x=26
+#y=9
+#vx=0
+#vy=0
+#x1=26
+#y1=9
+#x2=26
+#y2=9
+#color=white
+#[/enemy]
\ No newline at end of file
diff --git a/data/room/01.tmx b/data/room/01.tmx
index 2107321..33f0d70 100644
--- a/data/room/01.tmx
+++ b/data/room/01.tmx
@@ -3,21 +3,21 @@
-34,34,34,34,34,34,34,34,34,34,34,34,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,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,
-34,0,0,151,151,0,151,151,151,0,151,0,151,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,
-34,0,0,0,151,0,151,0,151,0,151,0,151,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,
-34,0,151,0,151,0,151,151,151,0,151,0,151,0,0,0,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,
-34,0,151,151,151,0,151,0,151,0,151,0,151,151,151,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,
+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,
+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,
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,134,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,134,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,
+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,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34
diff --git a/data/room/03.room b/data/room/03.room
index 531f0dd..23d2114 100644
--- a/data/room/03.room
+++ b/data/room/03.room
@@ -12,25 +12,25 @@ itemColor1=bright_cyan
itemColor2=yellow
[enemy]
-tileset=bin.png
-animation=bin.ani
+tileset=code.png
+animation=code.ani
width=16
-height=8
+height=16
x=3
-y=3
+y=2
vx=0.4
vy=0
x1=3
-y1=3
+y1=2
x2=27
-y2=3
-color=white
+y2=2
+color=yellow
[/enemy]
[item]
tileset=items.png
-tile=8
-x=18
+tile=42
+x=21
y=13
counter=1
[/item]
\ No newline at end of file
diff --git a/data/room/03.tmx b/data/room/03.tmx
index 60253ec..6f7ee30 100644
--- a/data/room/03.tmx
+++ b/data/room/03.tmx
@@ -7,17 +7,17 @@
25,25,0,0,0,0,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,
0,0,0,0,0,0,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,
0,0,0,0,0,0,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,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,0,0,505,253,253,253,253,253,253,25,25,
+25,25,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,0,0,505,25,25,25,25,25,25,25,25,
25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,25,0,0,0,0,0,25,25,
25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,25,0,0,0,0,0,25,25,
25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,0,25,0,0,0,0,0,25,25,
25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,0,0,25,0,0,0,0,0,25,25,
25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,0,0,0,25,0,0,0,0,0,25,25,
25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,0,0,0,0,25,0,0,0,0,0,25,25,
-25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,0,0,0,0,0,25,0,0,0,0,0,25,25,
+25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,0,0,0,0,0,25,25,25,0,0,0,25,25,
25,25,0,0,0,0,0,0,0,253,253,253,253,253,253,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,
-0,0,0,0,0,0,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,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,441,441,441,441,0,0,0,0,0,0,0,0,25,25,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,25,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,441,441,441,441,0,0,0,0,0,0,0,0,135,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,25
diff --git a/data/room/42.room b/data/room/42.room
index 7d9e7bf..594ecab 100644
--- a/data/room/42.room
+++ b/data/room/42.room
@@ -1,33 +1,60 @@
-name=no 42
+name=P.A.C.O. on the go
bgColor=black
-border=red
+border=black
tilemap=42.tmx
tileset=standard.png
roomUp=0
roomDown=43.room
roomLeft=53.room
roomRight=41.room
+itemColor1=magenta
+itemColor2=red
[enemy]
-tileset=diskette.png
-animation=diskette.ani
+tileset=paco.png
+animation=paco.ani
width=16
height=16
-x=2
+x=10
y=2
vx=0
-vy=0
-x1=2
+vy=0.5
+x1=10
y1=2
-x2=2
-y2=2
-color=magenta
+x2=10
+y2=11
+color=green
+[/enemy]
+
+[enemy]
+tileset=abad.png
+animation=abad.ani
+width=8
+height=16
+x=15
+y=13
+vx=0.8
+vy=0
+x1=4
+y1=13
+x2=19
+y2=13
+color=bright_cyan
+flip=true
[/enemy]
[item]
tileset=items.png
-tile=1
-x=1
-y=1
+tile=41
+x=2
+y=9
counter=1
+[/item]
+
+[item]
+tileset=items.png
+tile=41
+x=29
+y=3
+counter=2
[/item]
\ No newline at end of file
diff --git a/data/room/42.tmx b/data/room/42.tmx
index 4d00ee7..bdf03be 100644
--- a/data/room/42.tmx
+++ b/data/room/42.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,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,421,0,0,0,0,0,0,0,62,
+36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,415,421,415,0,0,0,0,0,0,0,0,0,0,62,
+36,0,0,0,0,0,0,0,305,0,0,0,0,305,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,
+36,0,0,0,305,0,0,0,0,0,0,0,0,0,0,0,0,421,0,0,0,0,0,0,0,0,0,0,0,0,0,62,
+36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,
+36,0,415,421,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,415,0,0,421,415,0,0,0,0,0,62,
+36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,507,415,421,531,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,507,0,0,0,0,531,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,26,0,0,423,385,0,0,26,44,44,44,44,44
diff --git a/data/room/43.room b/data/room/43.room
index edd84a3..12652c2 100644
--- a/data/room/43.room
+++ b/data/room/43.room
@@ -1,33 +1,51 @@
-name=no 43
+name=the tube
bgColor=black
-border=red
+border=blue
tilemap=43.tmx
tileset=standard.png
roomUp=42.room
roomDown=44.room
roomLeft=0
roomRight=0
+itemColor1=yellow
+itemColor2=red
[enemy]
-tileset=diskette.png
-animation=diskette.ani
-width=16
-height=16
-x=2
-y=2
-vx=0
+tileset=spider.png
+animation=spider.ani
+width=8
+height=8
+x=20
+y=5
+vx=0.3
vy=0
-x1=2
-y1=2
-x2=2
-y2=2
-color=magenta
+x1=20
+y1=5
+x2=23
+y2=5
+color=cyan
+[/enemy]
+
+[enemy]
+tileset=spider.png
+animation=spider.ani
+width=8
+height=8
+x=22
+y=11
+vx=0.3
+vy=0
+x1=20
+y1=11
+x2=23
+y2=11
+color=green
[/enemy]
[item]
tileset=items.png
-tile=1
-x=1
-y=1
+tile=8
+x=21
+y=10
counter=1
[/item]
\ No newline at end of file
diff --git a/data/room/43.tmx b/data/room/43.tmx
index f194f33..04a139b 100644
--- a/data/room/43.tmx
+++ b/data/room/43.tmx
@@ -3,22 +3,22 @@
-25,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,0,0,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,0,0,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,424,385,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,385,385,423,423,0,0,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,0,0,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,425,385,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,385,424,385,385,0,0,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,0,0,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,385,385,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,385,385,424,385,0,0,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,0,0,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,423,385,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,385,423,385,385,0,0,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,0,0,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,0,0,0,0,385,385,26,44,44,44,44,44,
+44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,26,423,385,423,385,0,0,26,44,44,44,44,44
diff --git a/data/room/44.room b/data/room/44.room
index c3a2e26..357b274 100644
--- a/data/room/44.room
+++ b/data/room/44.room
@@ -1,6 +1,6 @@
-name=no 44
+name=the kitchen
bgColor=black
-border=red
+border=cyan
tilemap=44.tmx
tileset=standard.png
roomUp=43.room
diff --git a/data/room/44.tmx b/data/room/44.tmx
index f194f33..834f028 100644
--- a/data/room/44.tmx
+++ b/data/room/44.tmx
@@ -3,22 +3,22 @@
-25,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,413,413,413,413,413,413,0,0,0,0,37,37,
+37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,
+37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,413,413,0,0,0,0,0,0,0,0,0,0,37,37,
+37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,
+37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,413,413,413,413,413,413,0,0,0,0,37,37,
+37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,
+37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,413,413,413,0,0,37,37,
+37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,
+38,38,38,38,38,38,38,38,38,38,38,38,38,38,417,0,0,417,38,38,38,38,38,38,38,38,38,38,38,38,38,38
diff --git a/data/room/53.room b/data/room/53.room
index b2162bb..40b1d38 100644
--- a/data/room/53.room
+++ b/data/room/53.room
@@ -1,33 +1,99 @@
-name=no 53
+name=P.A.C.O workshop
bgColor=black
-border=red
+border=yellow
tilemap=53.tmx
tileset=standard.png
roomUp=0
roomDown=51.room
roomLeft=0
roomRight=42.room
+itemColor1=magenta
+itemColor2=red
[enemy]
-tileset=diskette.png
-animation=diskette.ani
+tileset=paco.png
+animation=paco.ani
width=16
height=16
-x=2
+x=6
+y=6
+vx=0.3
+vy=0
+x1=6
+y1=6
+x2=13
+y2=6
+color=yellow
+[/enemy]
+
+[enemy]
+tileset=paco.png
+animation=paco.ani
+width=16
+height=16
+x=16
+y=2
+vx=0
+vy=0.8
+x1=16
+y1=2
+x2=16
+y2=13
+color=bright_red
+[/enemy]
+
+[enemy]
+tileset=wave.png
+animation=wave.ani
+width=8
+height=8
+x=1
+y=10
+vx=0.4
+vy=0
+x1=1
+y1=10
+x2=14
+y2=10
+color=bright_yellow
+[/enemy]
+
+[enemy]
+tileset=lamp.png
+animation=lamp.ani
+width=16
+height=16
+x=22
y=2
vx=0
vy=0
-x1=2
+x1=22
y1=2
-x2=2
+x2=22
y2=2
-color=magenta
+color=bright_yellow
[/enemy]
[item]
tileset=items.png
-tile=1
+tile=40
x=1
-y=1
+y=6
counter=1
-[/item]
\ No newline at end of file
+[/item]
+
+[item]
+tileset=items.png
+tile=40
+x=1
+y=9
+counter=2
+[/item]
+
+[item]
+tileset=items.png
+tile=40
+x=30
+y=5
+counter=3
+[/item]
diff --git a/data/room/53.tmx b/data/room/53.tmx
index 686390e..34c7733 100644
--- a/data/room/53.tmx
+++ b/data/room/53.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,
-25,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,25,25,25,25,25,25
+36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,
+36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,
+36,36,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,36,
+36,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,
+36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,
+36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,
+36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,
+36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,
+36,411,0,0,0,0,411,411,411,411,411,411,411,411,411,0,0,0,0,453,453,453,453,453,453,453,453,0,0,0,0,36,
+36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,387,36,
+36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,
+36,411,411,411,411,411,411,363,411,411,411,411,411,411,411,0,0,0,0,453,453,453,453,453,453,453,453,0,0,0,0,36,
+36,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,
+36,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+135,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,0,0,36,36,36,36,36,36
diff --git a/data/tilesets/standard.png b/data/tilesets/standard.png
index 68bf5ee..290951c 100644
Binary files a/data/tilesets/standard.png and b/data/tilesets/standard.png differ
diff --git a/source/demo.cpp b/source/demo.cpp
index a69ad7c..3c91ea3 100644
--- a/source/demo.cpp
+++ b/source/demo.cpp
@@ -5,12 +5,12 @@ Demo::Demo(SDL_Renderer *renderer, Screen *screen, Asset *asset, Debug *debug)
{
// Inicia algunas variables
board.iniClock = SDL_GetTicks();
- rooms.push_back("04.room");
rooms.push_back("03.room");
- rooms.push_back("02.room");
- rooms.push_back("01.room");
- rooms.push_back("05.room");
- rooms.push_back("06.room");
+ rooms.push_back("54.room");
+ rooms.push_back("16.room");
+ rooms.push_back("45.room");
+ rooms.push_back("60.room");
+ rooms.push_back("58.room");
roomIndex = 0;
currentRoom = rooms.at(roomIndex);
@@ -157,7 +157,7 @@ void Demo::render()
scoreboard->render();
screen->renderFX();
- text->write(0, 0, std::to_string(counter));
+ //text->write(0, 0, std::to_string(counter));
// Actualiza la pantalla
screen->blit();
diff --git a/source/director.cpp b/source/director.cpp
index af60eeb..daa905d 100644
--- a/source/director.cpp
+++ b/source/director.cpp
@@ -9,7 +9,7 @@ Director::Director(std::string path)
section.name = SECTION_PROG_LOGO;
section.subsection = SUBSECTION_LOGO_TO_INTRO;
- section.name = SECTION_PROG_CREDITS;
+ section.name = SECTION_PROG_GAME;
// Crea el objeto que controla los ficheros de recursos
asset = new Asset(path.substr(0, path.find_last_of("\\/")));
@@ -353,14 +353,17 @@ bool Director::initSDL()
// Crea el indice de ficheros
bool Director::setFileList()
{
+ // Texto
asset->add("/../data/font/smb2.png", t_font);
asset->add("/../data/font/smb2.txt", t_font);
asset->add("/../data/font/debug.png", t_font);
asset->add("/../data/font/debug.txt", t_font);
+ // Configuración
asset->add("/../data/input/gamecontrollerdb.txt", t_data);
asset->add("/../data/config/config.txt", t_data, false);
+ // Habitaciones
asset->add("/../data/room/01.room", t_room);
asset->add("/../data/room/02.room", t_room);
asset->add("/../data/room/03.room", t_room);
@@ -422,6 +425,7 @@ bool Director::setFileList()
asset->add("/../data/room/59.room", t_room);
asset->add("/../data/room/60.room", t_room);
+ // Tilemaps
asset->add("/../data/room/01.tmx", t_room);
asset->add("/../data/room/02.tmx", t_room);
asset->add("/../data/room/03.tmx", t_room);
@@ -483,8 +487,11 @@ bool Director::setFileList()
asset->add("/../data/room/59.tmx", t_room);
asset->add("/../data/room/60.tmx", t_room);
+ // Tilesets
asset->add("/../data/tilesets/standard.png", t_bitmap);
+ asset->add("/../data/tilesets/standard_zxarne.png", t_bitmap);
+ // Enemigos
asset->add("/../data/enemies/paco.png", t_bitmap);
asset->add("/../data/enemies/paco.ani", t_data);
asset->add("/../data/enemies/chip.png", t_bitmap);
@@ -545,18 +552,30 @@ bool Director::setFileList()
asset->add("/../data/enemies/amstrad_character_set.ani", t_data);
asset->add("/../data/enemies/breakout.png", t_bitmap);
asset->add("/../data/enemies/breakout.ani", t_data);
+ asset->add("/../data/enemies/lamp.png", t_bitmap);
+ asset->add("/../data/enemies/lamp.ani", t_data);
+ asset->add("/../data/enemies/bry.png", t_bitmap);
+ asset->add("/../data/enemies/bry.ani", t_data);
+ asset->add("/../data/enemies/tv.png", t_bitmap);
+ asset->add("/../data/enemies/tv.ani", t_data);
+ asset->add("/../data/enemies/tv_panel.png", t_bitmap);
+ asset->add("/../data/enemies/tv_panel.ani", t_data);
+ // Jugador
asset->add("/../data/player/player.png", t_bitmap);
asset->add("/../data/player/player.ani", t_data);
+ // Items
asset->add("/../data/items/items.png", t_bitmap);
+ // Musicas
asset->add("/../data/music/title.ogg", t_music);
asset->add("/../data/music/game.ogg", t_music);
asset->add("/../data/music/loading_sound1.ogg", t_music);
asset->add("/../data/music/loading_sound2.ogg", t_music);
asset->add("/../data/music/loading_sound3.ogg", t_music);
+ // Efectos de sonido
asset->add("/../data/sound/item.wav", t_sound);
asset->add("/../data/sound/death.wav", t_sound);
asset->add("/../data/sound/jump1.wav", t_sound);
@@ -584,10 +603,12 @@ bool Director::setFileList()
asset->add("/../data/sound/jump23.wav", t_sound);
asset->add("/../data/sound/jump24.wav", t_sound);
+ // Logo
asset->add("/../data/logo/jailgames.png", t_bitmap);
asset->add("/../data/logo/since_1998.png", t_bitmap);
asset->add("/../data/logo/seagull.png", t_bitmap);
+ // Intro
asset->add("/../data/title/loading_screen1.png", t_bitmap);
asset->add("/../data/title/loading_screen2.png", t_bitmap);
diff --git a/source/game.cpp b/source/game.cpp
index 2377f97..531706e 100644
--- a/source/game.cpp
+++ b/source/game.cpp
@@ -17,7 +17,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, D
// ****
// this->debug->setEnabled(true);
- currentRoom = "51.room";
+ currentRoom = "53.room";
const int x = 30;
const int y = 13;
spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
diff --git a/todo.txt b/todo.txt
index 62903b4..4d55411 100644
--- a/todo.txt
+++ b/todo.txt
@@ -41,8 +41,8 @@ x (A) La pantalla de titulo no tiene menu, solo un PRESS ENTER TO PLAY
(A) Crear la tipografia de corazon
(A) Los Creditos se han de ir escribiendo letra a letra
x (A) Arreglar la pantalla de carga para que cargue bit a bit
-(A) La musica del titulo ha de seguir sonando en los creditos y el ¿logo?
-(A) Ha de haber un modo demo en el que se muestran las habitaciones predefinidas
+x (A) La musica del titulo ha de seguir sonando en los creditos y el ¿logo?
+x (A) Ha de haber un modo demo en el que se muestran las habitaciones predefinidas
(A) Menu de pausa/salir
x (A) Poner el mapa/jugador en pausa
x (A) El color del borde se pierde al morir por la pantalla negra
@@ -66,12 +66,12 @@ x matatunos
x sigmasua
calculin doom
leaper reaper
-mini ascii
+x mini ascii
mappy
-paco
+x paco
x chirping
abad y batman
-jail
+x jail
counter strike
starcraft
diablo