- Les vores de baix de les portes son configurables

- En les portes de davant, si el piso està a ras tenen el mateix floor, sinó tenen el primer (per a que contraste)
This commit is contained in:
2023-09-12 19:13:44 +02:00
parent 7023419151
commit ed27bd2680
3 changed files with 26 additions and 20 deletions

View File

@@ -17,11 +17,12 @@ int room_color = 9;
int room_floor = 0;
int room_walls = 0;
int room_doors = 0;
int room_walldoors = 0;
void restart()
{
actor::clear();
room::load(room_w, room_h, room_xp, room_xn, room_yp, room_yn, room_color, room_floor, room_walls, room_doors);
room::load(room_w, room_h, room_xp, room_xn, room_yp, room_yn, room_color, room_floor, room_walls, room_doors, room_walldoors);
/*
box = actor::create("ASCENSOR",{16,32,0}, {8,8,4}, {64,0,32,24}, {0,24});
@@ -31,7 +32,7 @@ void restart()
actor::setDirty(box, true);
*/
actor::actor_t *box = actor::create("BOX", {32,32,16}, {8,8,8}, {32,0,32,32}, {0,32});
actor::actor_t *box = actor::create("BOX", {32,32,16}, {8,8,8}, "test.gif", {32,0,32,32}, {0,32});
box->flags = FLAG_PUSHABLE | FLAG_GRAVITY;
box->movement = MOV_CW;
box->mov_push = PUSH_XN;
@@ -54,7 +55,7 @@ void game::init()
draw::loadPalette("test.gif");
game::setUpdateTicks(64);
actor::actor_t *hero = actor::create("HERO", {16,32,8}, {8,8,12}, {0,32,20,32}, {-6,38});
actor::actor_t *hero = actor::create("HERO", {16,32,8}, {8,8,12}, "test.gif", {0,32,20,32}, {-6,38});
hero->flags = FLAG_HERO | FLAG_PUSHABLE | FLAG_GRAVITY | FLAG_ORIENTABLE | FLAG_ANIMATED;
actor::setDirty(hero, true);
@@ -122,7 +123,8 @@ bool game::loop()
btn("COLOR:", 330, 110, room_color, 5, 11);
btn("FLOOR:", 330, 125, room_floor, 0, 5);
btn("WALLS:", 330, 140, room_walls, 0, 5);
btn("DOORS:", 330, 155, room_doors, 0, 2);
btn("DOORS:", 330, 155, room_doors, 0, 4);
btn("WDOORS:", 330, 170, room_walldoors, 0, 5);
draw::render();