diff --git a/.gitignore b/.gitignore index f0621fb..29d45de 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.dll .vscode/* thepool +thepool_debug \ No newline at end of file diff --git a/source/actor.h b/source/actor.h index c40b056..0246462 100644 --- a/source/actor.h +++ b/source/actor.h @@ -12,6 +12,7 @@ #define FLAG_ORIENTABLE 32 #define FLAG_DEADLY 64 #define FLAG_GRAVITY 128 +#define FLAG_NOEDITOR 256 #define PUSH_NONE 0 #define PUSH_XP 1 @@ -34,7 +35,7 @@ namespace actor { struct actor_t { - char name[8]; + char name[16]; draw::surface *surface; SDL_Rect bmp_rect; SDL_Point bmp_offset; @@ -48,7 +49,7 @@ namespace actor uint8_t anim_wait; uint8_t anim_wait_count; - uint8_t flags; + uint16_t flags; uint8_t push; uint8_t react_mask; diff --git a/source/main.cpp b/source/main.cpp index 17af64d..36b7b67 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -103,6 +103,8 @@ int section = 0; bool game::loop() { + if (input::keyDown(SDL_SCANCODE_ESCAPE)) return false; + actor::update(actor::getFirst()); actor::reorder(); @@ -145,12 +147,14 @@ bool game::loop() int line = 0; actor::actor_t *act = actor::getFirst(); while (act) { - if (act==actor::getSelected()) { - draw::color(TEAL); - draw::fillrect(330, 40+line*8, 50, 8); + if ((act->flags&FLAG_NOEDITOR)!=FLAG_NOEDITOR) { + if (act==actor::getSelected()) { + draw::color(TEAL); + draw::fillrect(330, 40+line*8, 50, 8); + } + draw::print(act->name, 330, 40+line*8, WHITE, BLACK); + line++; } - draw::print(act->name, 330, 40+line*8, WHITE, BLACK); - line++; act = act->next; } break; diff --git a/source/room.cpp b/source/room.cpp index 6d9ded5..c5d7dc4 100644 --- a/source/room.cpp +++ b/source/room.cpp @@ -60,10 +60,10 @@ namespace room { uint8_t actual_floor = door_height[2]>0?0:floor_type*32; actor::actor_t *act = actor::create("DOOR_YP1", {24,(tmax.y+1)*8,0}, {8,8,(door_height[2])*4}, "floor.gif", {actual_floor,1,32,15}, {0,15+door_height[2]*8}); - act->flags = FLAG_NONE; + act->flags = FLAG_NOEDITOR; actor::setDirty(act, true); act = actor::create("DOOR_YP2", {32,(tmax.y+1)*8,0}, {8,8,(door_height[2])*4}, "floor.gif", {actual_floor,1,32,15}, {0,15+door_height[2]*8}); - act->flags = FLAG_NONE; + act->flags = FLAG_NOEDITOR; actor::setDirty(act, true); } @@ -71,10 +71,10 @@ namespace room { uint8_t actual_floor = door_height[0]>0?0:floor_type*32; actor::actor_t *act = actor::create("DOOR_XP1", {(tmax.x+1)*8,24,0}, {8,8,(door_height[0])*4}, "floor.gif", {actual_floor,1,32,15}, {0,15+door_height[0]*8}); - act->flags = FLAG_NONE; + act->flags = FLAG_NOEDITOR; actor::setDirty(act, true); act = actor::create("DOOR_XP2", {(tmax.x+1)*8,32,0}, {8,8,(door_height[0])*4}, "floor.gif", {actual_floor,1,32,15}, {0,15+door_height[0]*8}); - act->flags = FLAG_NONE; + act->flags = FLAG_NOEDITOR; actor::setDirty(act, true); } }