- Provant gràfics...
This commit is contained in:
BIN
data/doors.gif
BIN
data/doors.gif
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
data/floor.gif
BIN
data/floor.gif
Binary file not shown.
|
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 404 B |
BIN
data/walls.gif
BIN
data/walls.gif
Binary file not shown.
|
Before Width: | Height: | Size: 1020 B After Width: | Height: | Size: 1.0 KiB |
@@ -575,9 +575,9 @@ namespace actor
|
||||
const int ao = (act->flags & FLAG_ANIMATED) ? anims[act->anim_cycle][anim_frame]*act->bmp_rect.w : 0;
|
||||
|
||||
draw::draw(x, y, act->bmp_rect.w, act->bmp_rect.h, act->bmp_rect.x+ao, act->bmp_rect.y+oo, flip);
|
||||
print(x+5,y,act->pos.x);
|
||||
print(x+5,y+6,act->pos.y);
|
||||
print(x+5,y+12,act->pos.z);
|
||||
//print(x+5,y,act->pos.x);
|
||||
//print(x+5,y+6,act->pos.y);
|
||||
//print(x+5,y+12,act->pos.z);
|
||||
//print(x+5,y+12,order);
|
||||
//print(x+5,y,act->flags);
|
||||
|
||||
|
||||
@@ -86,20 +86,20 @@ namespace room
|
||||
// Si la porta està elevada, pintar la part frontal de baix de la porta
|
||||
if (door_height[3] > 0) {
|
||||
draw::setSource(walls_surf);
|
||||
draw::draw( 164+3*16-tmin.y*16, (36+3*8+tmin.y*8) + (5-door_height[3])*8, 16, 48-(5-door_height[3])*8, walls_type*32, (5-door_height[3])*8);
|
||||
draw::draw( 164+4*16-tmin.y*16, (36+4*8+tmin.y*8) + (5-door_height[3])*8, 16, 48-(5-door_height[3])*8, walls_type*32, (5-door_height[3])*8);
|
||||
draw::draw( 164+3*16-tmin.y*16, (36+3*8+tmin.y*8) + (5-door_height[3])*8, 16, 48-(5-door_height[3])*8, walls_type*16, (5-door_height[3])*8);
|
||||
draw::draw( 164+4*16-tmin.y*16, (36+4*8+tmin.y*8) + (5-door_height[3])*8, 16, 48-(5-door_height[3])*8, walls_type*16, (5-door_height[3])*8);
|
||||
}
|
||||
|
||||
// Pintem els dos tiles baix de la porta
|
||||
draw::setSource(walls_surf);
|
||||
draw::draw(164+4*16-(tmin.y-1)*16, -door_height[3]*8+84+4*8+(tmin.y-1)*8, 16, 15, 16+walls_type*32, 33); // Vora
|
||||
draw::draw(164+4*16-(tmin.y-1)*16, -door_height[3]*8+84+4*8+(tmin.y-1)*8, 16, 15, walls_type*16, 33, DRAW_FLIP_HORIZONTAL); // Vora
|
||||
draw::setSource(floor_surf);
|
||||
draw::draw(148+3*16-(tmin.y-1)*16, -door_height[3]*8+76+3*8+(tmin.y-1)*8, 32, 15, floor_type*32, 1); // Tile de Piso
|
||||
draw::draw(148+4*16-(tmin.y-1)*16, -door_height[3]*8+76+4*8+(tmin.y-1)*8, 32, 15, floor_type*32, 1); // Tile de Piso
|
||||
|
||||
// Pintem la porta
|
||||
draw::setSource(doors_surf);
|
||||
draw::draw(164+3*16-tmin.y*16, -door_height[3]*8+32+3*8+tmin.y*8,40,59,doors_type*80,0);
|
||||
draw::draw(164+3*16-tmin.y*16, -door_height[3]*8+32+3*8+tmin.y*8,40,59,doors_type*40,0);
|
||||
}
|
||||
|
||||
// RUTINES DE PINTAT DE LA PORTA DE DALT A LA ESQUERRA
|
||||
@@ -108,40 +108,40 @@ namespace room
|
||||
// Si la porta està elevada, pintar la part frontal de baix de la porta
|
||||
if (door_height[1] > 0) {
|
||||
draw::setSource(walls_surf);
|
||||
draw::draw(148+tmin.x*16-3*16, (36+tmin.x*8+3*8)+(5-door_height[1])*8, 16, 48-(5-door_height[1])*8, 16+walls_type*32, (5-door_height[1])*8);
|
||||
draw::draw(148+tmin.x*16-4*16, (36+tmin.x*8+4*8)+(5-door_height[1])*8, 16, 48-(5-door_height[1])*8, 16+walls_type*32, (5-door_height[1])*8);
|
||||
draw::draw(148+tmin.x*16-3*16, (36+tmin.x*8+3*8)+(5-door_height[1])*8, 16, 48-(5-door_height[1])*8, walls_type*16, (5-door_height[1])*8, DRAW_FLIP_HORIZONTAL);
|
||||
draw::draw(148+tmin.x*16-4*16, (36+tmin.x*8+4*8)+(5-door_height[1])*8, 16, 48-(5-door_height[1])*8, walls_type*16, (5-door_height[1])*8, DRAW_FLIP_HORIZONTAL);
|
||||
}
|
||||
|
||||
// Pintem els dos tiles baix de la porta
|
||||
draw::setSource(walls_surf);
|
||||
draw::draw(164+(tmin.x-1)*16-5*16, -door_height[1]*8+84+(tmin.x-1)*8+4*8, 16, 15, walls_type*32, 33); // Vora
|
||||
draw::draw(164+(tmin.x-1)*16-5*16, -door_height[1]*8+84+(tmin.x-1)*8+4*8, 16, 15, walls_type*16, 33); // Vora
|
||||
draw::setSource(floor_surf);
|
||||
draw::draw(148+(tmin.x-1)*16-3*16, -door_height[1]*8+76+(tmin.x-1)*8+3*8,32,15,floor_type*32,1);
|
||||
draw::draw(148+(tmin.x-1)*16-4*16, -door_height[1]*8+76+(tmin.x-1)*8+4*8,32,15,floor_type*32,1);
|
||||
|
||||
// Pintem la porta
|
||||
draw::setSource(doors_surf);
|
||||
draw::draw(164+(tmin.x-1)*16-4*16-8, -door_height[1]*8+32+3*8+9+(tmin.x-1)*8, 40,59, 40+doors_type*80,0);
|
||||
draw::draw(164+(tmin.x-1)*16-4*16-8, -door_height[1]*8+32+3*8+9+(tmin.x-1)*8, 40,59, doors_type*40,0, DRAW_FLIP_HORIZONTAL);
|
||||
}
|
||||
|
||||
draw::setSource(walls_surf);
|
||||
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*32, 33);
|
||||
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*32, 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);
|
||||
}
|
||||
|
||||
for (int y=tmin.y;y<=tmax.y;++y)
|
||||
{
|
||||
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,16+walls_type*32, 33);
|
||||
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,16+walls_type*32,0);
|
||||
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);
|
||||
@@ -162,9 +162,9 @@ namespace room
|
||||
{
|
||||
// Pintem les voreres dels dos tiles extra per a la porta YP
|
||||
draw::setSource(walls_surf);
|
||||
draw::draw(164+4*16-(tmax.y+1)*16, -door_height[2]*8+84+4*8+(tmax.y+1)*8, 16, 15+door_height[2]*8, 16+walls_type*32, 1);
|
||||
draw::draw(148+3*16-(tmax.y+1)*16, -door_height[2]*8+84+3*8+(tmax.y+1)*8, 16, 15+door_height[2]*8, walls_type*32, 1);
|
||||
draw::draw(148+4*16-(tmax.y+1)*16, -door_height[2]*8+84+4*8+(tmax.y+1)*8, 16, 15+door_height[2]*8, walls_type*32, 1);
|
||||
draw::draw(164+4*16-(tmax.y+1)*16, -door_height[2]*8+84+4*8+(tmax.y+1)*8, 16, 15+door_height[2]*8, walls_type*16, 1, DRAW_FLIP_HORIZONTAL);
|
||||
draw::draw(148+3*16-(tmax.y+1)*16, -door_height[2]*8+84+3*8+(tmax.y+1)*8, 16, 15+door_height[2]*8, walls_type*16, 1);
|
||||
draw::draw(148+4*16-(tmax.y+1)*16, -door_height[2]*8+84+4*8+(tmax.y+1)*8, 16, 15+door_height[2]*8, walls_type*16, 1);
|
||||
|
||||
draw::setSource(aux_surf);
|
||||
draw::draw(164+4*16-(tmax.y+1)*16, 91+4*8+(tmax.y+1)*8, 16, 8, 16, 0);
|
||||
@@ -173,15 +173,15 @@ namespace room
|
||||
|
||||
// Pintem la porta YP
|
||||
draw::setSource(doors_surf);
|
||||
draw::draw(164+3*16-8-(tmax.y+1)*16, -door_height[2]*8+32+3*8+4+(tmax.y+1)*8,40,59,doors_type*80,0);
|
||||
draw::draw(164+3*16-8-(tmax.y+1)*16, -door_height[2]*8+32+3*8+4+(tmax.y+1)*8,40,59,doors_type*40,0);
|
||||
}
|
||||
if (doors & DOOR_XP)
|
||||
{
|
||||
// Pintem les voreres dels dos tiles extra per a la porta XP
|
||||
draw::setSource(walls_surf);
|
||||
draw::draw(148+(tmax.x+1)*16-4*16, -door_height[0]*8+84+(tmax.x+1)*8+4*8,16,15+door_height[0]*8,walls_type*32, 1);
|
||||
draw::draw(164+(tmax.x+1)*16-3*16, -door_height[0]*8+84+(tmax.x+1)*8+3*8,16,15+door_height[0]*8,16+walls_type*32, 1);
|
||||
draw::draw(164+(tmax.x+1)*16-4*16, -door_height[0]*8+84+(tmax.x+1)*8+4*8,16,15+door_height[0]*8,16+walls_type*32, 1);
|
||||
draw::draw(148+(tmax.x+1)*16-4*16, -door_height[0]*8+84+(tmax.x+1)*8+4*8,16,15+door_height[0]*8,walls_type*16, 1);
|
||||
draw::draw(164+(tmax.x+1)*16-3*16, -door_height[0]*8+84+(tmax.x+1)*8+3*8,16,15+door_height[0]*8,walls_type*16, 1, DRAW_FLIP_HORIZONTAL);
|
||||
draw::draw(164+(tmax.x+1)*16-4*16, -door_height[0]*8+84+(tmax.x+1)*8+4*8,16,15+door_height[0]*8,walls_type*16, 1, DRAW_FLIP_HORIZONTAL);
|
||||
|
||||
draw::setSource(aux_surf);
|
||||
draw::draw(148+(tmax.x+1)*16-4*16, 91+(tmax.x+1)*8+4*8,16,8,0,0);
|
||||
@@ -190,7 +190,7 @@ namespace room
|
||||
|
||||
// Pintem la porta XP
|
||||
draw::setSource(doors_surf);
|
||||
draw::draw( 164+(tmax.x+1)*16-4*16-16, -door_height[0]*8+32+3*8+4+(tmax.x+1)*8, 40,59, 40+doors_type*80,0);
|
||||
draw::draw( 164+(tmax.x+1)*16-4*16-16, -door_height[0]*8+32+3*8+4+(tmax.x+1)*8, 40,59, doors_type*40,0, DRAW_FLIP_HORIZONTAL);
|
||||
}
|
||||
draw::popSource();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user