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/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/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/tilesets/standard.png b/data/tilesets/standard.png
index 68bf5ee..db30eca 100644
Binary files a/data/tilesets/standard.png and b/data/tilesets/standard.png differ
diff --git a/source/director.cpp b/source/director.cpp
index c415802..de0eba4 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..c26614a 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 = "01.room";
const int x = 30;
const int y = 13;
spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};