diff --git a/data/rooms/00.txt b/data/rooms/00.txt index bd3bb06..3154c53 100644 --- a/data/rooms/00.txt +++ b/data/rooms/00.txt @@ -1,21 +1,40 @@ width: 2 height: 1 -door-height-xn: 0 +door-height-xp: 1 +door-height-xn: 1 color: CYAN floor-texture: 0 -wall-texture: 3 -door-texture: 1 -under-door-texture: 1 +wall-texture: 2 +door-texture: 0 +under-door-texture: 0 exit-xn: 1 +exit-zn: 0 actor{ - name: BOX2 + name: PLATFORM00 bmp: test.gif - bmp-rect: 32 0 32 32 - bmp-offset: 0 32 - pos: 21 32 0 - size: 8 8 8 - flags: PUSHABLE GRAVITY + bmp-rect: 64 0 32 24 + bmp-offset: 0 24 + pos: 8 28 0 + size: 8 8 4 +} + +actor{ + name: PLATFORM02 + bmp: test.gif + bmp-rect: 64 0 32 24 + bmp-offset: 0 24 + pos: 16 20 0 + size: 8 8 4 +} + +actor{ + name: PLATFORM01 + bmp: test.gif + bmp-rect: 64 0 32 24 + bmp-offset: 0 24 + pos: 16 28 0 + size: 8 8 4 } actor{ @@ -23,7 +42,25 @@ actor{ bmp: test.gif bmp-rect: 32 0 32 32 bmp-offset: 0 32 - pos: 32 33 0 + pos: 16 28 4 size: 8 8 8 flags: PUSHABLE GRAVITY } + +actor{ + name: PLATFORM04 + bmp: test.gif + bmp-rect: 64 0 32 24 + bmp-offset: 0 24 + pos: 40 28 0 + size: 8 8 4 +} + +actor{ + name: PLATFORM03 + bmp: test.gif + bmp-rect: 64 0 32 24 + bmp-offset: 0 24 + pos: 48 28 0 + size: 8 8 4 +} diff --git a/source/actor.cpp b/source/actor.cpp index d8c51a9..2b708df 100644 --- a/source/actor.cpp +++ b/source/actor.cpp @@ -857,7 +857,7 @@ namespace actor draw::pushSource(); draw::setSource(act->surface); - if (act==selected) draw::swapcol(1, room::getColor()==9?11:9); // Si està seleccionat, que canvie de color + if (editor::isEditing() && (act==selected)) draw::swapcol(1, room::getColor()==9?11:9); // Si està seleccionat, que canvie de color draw::draw(x, y, act->bmp_rect.w, act->bmp_rect.h, act->bmp_rect.x+ao, act->bmp_rect.y+oo, flip); draw::swapcol(1, room::getColor()); // Tornem al color per defecte draw::popSource(); diff --git a/source/main.cpp b/source/main.cpp index 5a22650..5840519 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -553,6 +553,7 @@ switch (section) line += 10; ui::label("UNDER DOOR", 2, line, 48, 11); changed |= btn_small(48, line, room::editor::refWallDoorTex(), 0, 5, 50); + line += 10; ui::label("EXITS", 2, line, 96, 11, GRAY); line+=10; diff --git a/source/room.cpp b/source/room.cpp index 228617f..567b1ea 100644 --- a/source/room.cpp +++ b/source/room.cpp @@ -254,7 +254,7 @@ namespace room for (int x=tmin.x;x<=tmax.x;++x) { // Si hi ha porta en YP i està a altura 0, no pintem la vorera en eixos dos tiles - if ( !(doors & DOOR_YP) || (door_height[2] != 0) || (x!=3 && x!=4) ) draw::draw(148+x*16-tmax.y*16,84+x*8+tmax.y*8,16,15,walls_type*16, 33); + if (exits[ZN]==-1) if ( !(doors & DOOR_YP) || (door_height[2] != 0) || (x!=3 && x!=4) ) draw::draw(148+x*16-tmax.y*16,84+x*8+tmax.y*8,16,15,walls_type*16, 33); // Si hi ha porta en YN, no pintem la pared en eixos dos tiles if ( !(doors & DOOR_YN) || (x!=3 && x!=4) ) draw::draw(164+x*16-tmin.y*16,36+x*8+tmin.y*8,16,48,walls_type*16, 0); @@ -264,16 +264,19 @@ namespace room { draw::setSource(walls_surf); // Si hi ha porta en XP i està a altura 0, no pintem la vorera en eixos dos tiles - if ( !(doors & DOOR_XP) || (door_height[0] != 0) || (y!=3 && y!=4) ) draw::draw(164+tmax.x*16-y*16,84+tmax.x*8+y*8,16,15,walls_type*16, 33, DRAW_FLIP_HORIZONTAL); + if (exits[ZN]==-1) if ( !(doors & DOOR_XP) || (door_height[0] != 0) || (y!=3 && y!=4) ) draw::draw(164+tmax.x*16-y*16,84+tmax.x*8+y*8,16,15,walls_type*16, 33, DRAW_FLIP_HORIZONTAL); // Si hi ha porta en XN, no pintem la pared en eixos dos tiles if ( !(doors & DOOR_XN) || (y!=3 && y!=4) ) draw::draw(148+tmin.x*16-y*16,36+tmin.x*8+y*8,16,48,walls_type*16,0, DRAW_FLIP_HORIZONTAL); // Pintem tots els tiles del piso - draw::setSource(floor_surf); - for (int x=tmin.x;x<=tmax.x;++x) + if (exits[ZN]==-1) { - draw::draw(148+x*16-y*16,76+x*8+y*8,32,15,floor_type*32,1); + draw::setSource(floor_surf); + for (int x=tmin.x;x<=tmax.x;++x) + { + draw::draw(148+x*16-y*16,76+x*8+y*8,32,15,floor_type*32,1); + } } } draw::popSource();