- [CHG] Si no està editant, que no resalte ningún actor

- [FIX] El camp d'edició de la textura de baix les portes no es veïa
- [NEW] Si hi ha eixida per baix, no pintar el piso
This commit is contained in:
2024-06-14 19:48:02 +02:00
parent 6a11697562
commit 74e46f6e85
4 changed files with 58 additions and 17 deletions

View File

@@ -1,21 +1,40 @@
width: 2 width: 2
height: 1 height: 1
door-height-xn: 0 door-height-xp: 1
door-height-xn: 1
color: CYAN color: CYAN
floor-texture: 0 floor-texture: 0
wall-texture: 3 wall-texture: 2
door-texture: 1 door-texture: 0
under-door-texture: 1 under-door-texture: 0
exit-xn: 1 exit-xn: 1
exit-zn: 0
actor{ actor{
name: BOX2 name: PLATFORM00
bmp: test.gif bmp: test.gif
bmp-rect: 32 0 32 32 bmp-rect: 64 0 32 24
bmp-offset: 0 32 bmp-offset: 0 24
pos: 21 32 0 pos: 8 28 0
size: 8 8 8 size: 8 8 4
flags: PUSHABLE GRAVITY }
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{ actor{
@@ -23,7 +42,25 @@ actor{
bmp: test.gif bmp: test.gif
bmp-rect: 32 0 32 32 bmp-rect: 32 0 32 32
bmp-offset: 0 32 bmp-offset: 0 32
pos: 32 33 0 pos: 16 28 4
size: 8 8 8 size: 8 8 8
flags: PUSHABLE GRAVITY 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
}

View File

@@ -857,7 +857,7 @@ namespace actor
draw::pushSource(); draw::pushSource();
draw::setSource(act->surface); 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::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::swapcol(1, room::getColor()); // Tornem al color per defecte
draw::popSource(); draw::popSource();

View File

@@ -553,6 +553,7 @@ switch (section)
line += 10; line += 10;
ui::label("UNDER DOOR", 2, line, 48, 11); ui::label("UNDER DOOR", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refWallDoorTex(), 0, 5, 50); changed |= btn_small(48, line, room::editor::refWallDoorTex(), 0, 5, 50);
line += 10;
ui::label("EXITS", 2, line, 96, 11, GRAY); line+=10; ui::label("EXITS", 2, line, 96, 11, GRAY); line+=10;

View File

@@ -254,7 +254,7 @@ namespace room
for (int x=tmin.x;x<=tmax.x;++x) 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 // 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 // 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); 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); draw::setSource(walls_surf);
// Si hi ha porta en XP i està a altura 0, no pintem la vorera en eixos dos tiles // 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 // 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); 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 // Pintem tots els tiles del piso
draw::setSource(floor_surf); if (exits[ZN]==-1)
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::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(); draw::popSource();