merge
This commit is contained in:
BIN
data/caixes.gif
BIN
data/caixes.gif
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.4 KiB |
@@ -1,11 +1,13 @@
|
|||||||
width: 0
|
width: 0
|
||||||
height: 3
|
height: 3
|
||||||
|
door-height-yp: 0
|
||||||
door-height-yn: 5
|
door-height-yn: 5
|
||||||
color: CYAN
|
color: CYAN
|
||||||
floor-texture: 1
|
floor-texture: 1
|
||||||
wall-texture: 0
|
wall-texture: 0
|
||||||
door-texture: 0
|
door-texture: 0
|
||||||
under-door-texture: 0
|
under-door-texture: 0
|
||||||
|
exit-yp: 9
|
||||||
exit-yn: 7
|
exit-yn: 7
|
||||||
|
|
||||||
actor{
|
actor{
|
||||||
|
|||||||
39
data/rooms/09.txt
Normal file
39
data/rooms/09.txt
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
width: 2
|
||||||
|
height: 2
|
||||||
|
door-height-xp: 0
|
||||||
|
door-height-xn: 0
|
||||||
|
door-height-yp: 0
|
||||||
|
door-height-yn: 0
|
||||||
|
color: WHITE
|
||||||
|
floor-texture: 0
|
||||||
|
wall-texture: 7
|
||||||
|
door-texture: 2
|
||||||
|
under-door-texture: 0
|
||||||
|
exit-xp: 12
|
||||||
|
exit-xn: 10
|
||||||
|
exit-yp: 17
|
||||||
|
exit-yn: 8
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: NEVERA1
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 0 96 32 32
|
||||||
|
bmp-offset: 2 33
|
||||||
|
pos: 8 8 0
|
||||||
|
size: 8 8 8
|
||||||
|
orient: YP
|
||||||
|
flags: ORIENTABLE
|
||||||
|
movement: CW
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: NEVERA2
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 32 96 32 32
|
||||||
|
bmp-offset: 2 33
|
||||||
|
pos: 8 8 8
|
||||||
|
size: 8 8 8
|
||||||
|
orient: YP
|
||||||
|
flags: ORIENTABLE
|
||||||
|
movement: CW
|
||||||
|
}
|
||||||
11
data/rooms/10.txt
Normal file
11
data/rooms/10.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
width: 2
|
||||||
|
height: 2
|
||||||
|
door-height-xp: 0
|
||||||
|
door-height-yn: 0
|
||||||
|
color: PURPLE
|
||||||
|
floor-texture: 0
|
||||||
|
wall-texture: 0
|
||||||
|
door-texture: 0
|
||||||
|
under-door-texture: 0
|
||||||
|
exit-xp: 9
|
||||||
|
exit-yn: 11
|
||||||
9
data/rooms/11.txt
Normal file
9
data/rooms/11.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
width: 2
|
||||||
|
height: 2
|
||||||
|
door-height-yp: 0
|
||||||
|
color: YELLOW
|
||||||
|
floor-texture: 0
|
||||||
|
wall-texture: 0
|
||||||
|
door-texture: 0
|
||||||
|
under-door-texture: 0
|
||||||
|
exit-yp: 10
|
||||||
13
data/rooms/12.txt
Normal file
13
data/rooms/12.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
width: 2
|
||||||
|
height: 2
|
||||||
|
door-height-xp: 0
|
||||||
|
door-height-xn: 0
|
||||||
|
door-height-yn: 0
|
||||||
|
color: GREEN
|
||||||
|
floor-texture: 3
|
||||||
|
wall-texture: 3
|
||||||
|
door-texture: 1
|
||||||
|
under-door-texture: 3
|
||||||
|
exit-xp: 13
|
||||||
|
exit-xn: 9
|
||||||
|
exit-yn: 15
|
||||||
232
data/rooms/13.txt
Normal file
232
data/rooms/13.txt
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
width: 2
|
||||||
|
height: 2
|
||||||
|
door-height-xn: 1
|
||||||
|
door-height-yn: 1
|
||||||
|
color: CYAN
|
||||||
|
floor-texture: 0
|
||||||
|
wall-texture: 0
|
||||||
|
door-texture: 0
|
||||||
|
under-door-texture: 0
|
||||||
|
exit-xn: 12
|
||||||
|
exit-yn: 14
|
||||||
|
exit-zn: 18
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT18
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 8 8 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT17
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 8 16 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT19
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 16 8 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT31
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 96 160 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 16 16 0
|
||||||
|
size: 8 8 8
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT20
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 24 8 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT32
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 96 160 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 24 16 0
|
||||||
|
size: 8 8 8
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT21
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 32 8 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT33
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 96 160 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 32 16 0
|
||||||
|
size: 8 8 8
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT22
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 40 8 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT34
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 96 160 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 40 16 0
|
||||||
|
size: 8 8 8
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT23
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 48 8 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT35
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 96 160 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 48 16 0
|
||||||
|
size: 8 8 8
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT16
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 8 24 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT30
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 96 160 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 16 24 0
|
||||||
|
size: 8 8 8
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT13
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 8 32 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT29
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 96 160 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 16 32 0
|
||||||
|
size: 8 8 8
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT14
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 8 40 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT28
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 96 160 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 16 40 0
|
||||||
|
size: 8 8 8
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT15
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 160 128 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 8 48 0
|
||||||
|
size: 8 8 4
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
|
|
||||||
|
actor{
|
||||||
|
name: LIFT27
|
||||||
|
bmp: caixes.gif
|
||||||
|
bmp-rect: 96 160 32 32
|
||||||
|
bmp-offset: 0 32
|
||||||
|
pos: 16 48 0
|
||||||
|
size: 8 8 8
|
||||||
|
orient: ZP
|
||||||
|
movement: Z
|
||||||
|
}
|
||||||
11
data/rooms/14.txt
Normal file
11
data/rooms/14.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
width: 2
|
||||||
|
height: 2
|
||||||
|
door-height-xn: 0
|
||||||
|
door-height-yp: 0
|
||||||
|
color: WHITE
|
||||||
|
floor-texture: 0
|
||||||
|
wall-texture: 0
|
||||||
|
door-texture: 0
|
||||||
|
under-door-texture: 0
|
||||||
|
exit-xn: 15
|
||||||
|
exit-yp: 13
|
||||||
13
data/rooms/15.txt
Normal file
13
data/rooms/15.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
width: 2
|
||||||
|
height: 2
|
||||||
|
door-height-xp: 0
|
||||||
|
door-height-yp: 0
|
||||||
|
door-height-yn: 0
|
||||||
|
color: YELLOW
|
||||||
|
floor-texture: 0
|
||||||
|
wall-texture: 0
|
||||||
|
door-texture: 0
|
||||||
|
under-door-texture: 0
|
||||||
|
exit-xp: 14
|
||||||
|
exit-yp: 12
|
||||||
|
exit-yn: 16
|
||||||
9
data/rooms/16.txt
Normal file
9
data/rooms/16.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
width: 2
|
||||||
|
height: 2
|
||||||
|
door-height-yp: 0
|
||||||
|
color: PURPLE
|
||||||
|
floor-texture: 0
|
||||||
|
wall-texture: 0
|
||||||
|
door-texture: 0
|
||||||
|
under-door-texture: 0
|
||||||
|
exit-yp: 15
|
||||||
9
data/rooms/17.txt
Normal file
9
data/rooms/17.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
width: 2
|
||||||
|
height: 2
|
||||||
|
door-height-yn: 0
|
||||||
|
color: CYAN
|
||||||
|
floor-texture: 0
|
||||||
|
wall-texture: 0
|
||||||
|
door-texture: 0
|
||||||
|
under-door-texture: 0
|
||||||
|
exit-yn: 9
|
||||||
8
data/rooms/18.txt
Normal file
8
data/rooms/18.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
width: 2
|
||||||
|
height: 2
|
||||||
|
color: CYAN
|
||||||
|
floor-texture: 0
|
||||||
|
wall-texture: 0
|
||||||
|
door-texture: 0
|
||||||
|
under-door-texture: 0
|
||||||
|
exit-zp: 13
|
||||||
BIN
data/walls.gif
BIN
data/walls.gif
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -504,6 +504,17 @@ namespace draw
|
|||||||
sel_color = col;
|
sel_color = col;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void isoline(int x, int y, const int dx, const int dy, const int len)
|
||||||
|
{
|
||||||
|
for (int i=0; i<len; ++i)
|
||||||
|
{
|
||||||
|
pset(destination, x,y, sel_color);
|
||||||
|
x+=dx;
|
||||||
|
pset(destination, x,y, sel_color);
|
||||||
|
x+=dx; y+=dy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void hline(const int x, const int y, const int w)
|
void hline(const int x, const int y, const int w)
|
||||||
{
|
{
|
||||||
for (int i=x;i<x+w;++i) pset(destination, i, y, sel_color);
|
for (int i=x;i<x+w;++i) pset(destination, i, y, sel_color);
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ namespace draw
|
|||||||
void swapcol(const uint8_t c1, const uint8_t c2);
|
void swapcol(const uint8_t c1, const uint8_t c2);
|
||||||
void restorecol(const uint8_t c);
|
void restorecol(const uint8_t c);
|
||||||
void color(const uint8_t col);
|
void color(const uint8_t col);
|
||||||
|
void isoline(int x, int y, const int dx, const int dy, const int len);
|
||||||
void hline(const int x, const int y, const int w);
|
void hline(const int x, const int y, const int w);
|
||||||
void vline(const int x, const int y, const int h);
|
void vline(const int x, const int y, const int h);
|
||||||
void fillrect(const int x, const int y, const int w, const int h);
|
void fillrect(const int x, const int y, const int w, const int h);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace modules
|
|||||||
{
|
{
|
||||||
draw::surface *surf;
|
draw::surface *surf;
|
||||||
vec2_t scroll {0,0};
|
vec2_t scroll {0,0};
|
||||||
bool drawn[64];
|
int drawn[64];
|
||||||
int current_room;
|
int current_room;
|
||||||
|
|
||||||
struct miniroom_t
|
struct miniroom_t
|
||||||
@@ -23,6 +23,46 @@ namespace modules
|
|||||||
};
|
};
|
||||||
miniroom_t minirooms[64];
|
miniroom_t minirooms[64];
|
||||||
|
|
||||||
|
void drawLines(const int room, const int x, const int y)
|
||||||
|
{
|
||||||
|
if (drawn[room]) return;
|
||||||
|
drawn[room] = true;
|
||||||
|
if ( (x>=-32) && (x<520) && (y>=-16) && (y<240) )
|
||||||
|
{
|
||||||
|
draw::color(RED);
|
||||||
|
if (minirooms[room].exits[XN] != 255) { draw::isoline(x,y,-1,-1,14); /*draw::isoline(x,y-1,-1,-1,14);*/ draw::isoline(x,y+1,-1,-1,14); }
|
||||||
|
if (minirooms[room].exits[YN] != 255) { draw::isoline(x,y,+1,-1,14); /*draw::isoline(x,y-1,+1,-1,14);*/ draw::isoline(x,y+1,+1,-1,14); }
|
||||||
|
if (minirooms[room].exits[XP] != 255) { draw::isoline(x,y,+1,+1,14); /*draw::isoline(x,y-1,+1,+1,14);*/ draw::isoline(x,y+1,+1,+1,14); }
|
||||||
|
if (minirooms[room].exits[YP] != 255) { draw::isoline(x,y,-1,+1,14); /*draw::isoline(x,y-1,-1,+1,14);*/ draw::isoline(x,y+1,-1,+1,14); }
|
||||||
|
}
|
||||||
|
if (minirooms[room].exits[XN] != 255) drawLines(minirooms[room].exits[XN], x-24, y-12);
|
||||||
|
if (minirooms[room].exits[XP] != 255) drawLines(minirooms[room].exits[XP], x+24, y+12);
|
||||||
|
if (minirooms[room].exits[YN] != 255) drawLines(minirooms[room].exits[YN], x+24, y-12);
|
||||||
|
if (minirooms[room].exits[YP] != 255) drawLines(minirooms[room].exits[YP], x-24, y+12);
|
||||||
|
}
|
||||||
|
|
||||||
|
void drawRoom(const int room, const int x, const int y, const bool shadow=false)
|
||||||
|
{
|
||||||
|
if (drawn[room]) return;
|
||||||
|
drawn[room] = true;
|
||||||
|
if ( (x>=-32) && (x<520) && (y>=-16) && (y<240) )
|
||||||
|
{
|
||||||
|
draw::stencil::set(room);
|
||||||
|
draw::swapcol(1, !shadow ? minirooms[room].color : 2);
|
||||||
|
draw::draw(x-16, y-8, 32, 16, minirooms[room].w*32, minirooms[room].h*16);
|
||||||
|
|
||||||
|
if (!shadow)
|
||||||
|
{
|
||||||
|
char num[] = "00"; num[0] = 48+(room/10); num[1] = 48+(room%10);
|
||||||
|
draw::print(num, x-4, y-3, LIGHT+(room==current_room?YELLOW:WHITE), BLACK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (minirooms[room].exits[XN] != 255) drawRoom(minirooms[room].exits[XN], x-24, y-12, shadow);
|
||||||
|
if (minirooms[room].exits[XP] != 255) drawRoom(minirooms[room].exits[XP], x+24, y+12, shadow);
|
||||||
|
if (minirooms[room].exits[YN] != 255) drawRoom(minirooms[room].exits[YN], x+24, y-12, shadow);
|
||||||
|
if (minirooms[room].exits[YP] != 255) drawRoom(minirooms[room].exits[YP], x-24, y+12, shadow);
|
||||||
|
}
|
||||||
|
|
||||||
void loadMiniRoom()
|
void loadMiniRoom()
|
||||||
{
|
{
|
||||||
const int room = room::getCurrent();
|
const int room = room::getCurrent();
|
||||||
@@ -53,45 +93,31 @@ namespace modules
|
|||||||
current_room = room::getCurrent();
|
current_room = room::getCurrent();
|
||||||
loadMiniRoom();
|
loadMiniRoom();
|
||||||
room::load(current_room);
|
room::load(current_room);
|
||||||
|
|
||||||
|
for (int i=0;i<64;++i) drawn[i]=false;
|
||||||
|
draw::cls(2);
|
||||||
|
draw::setSource(surf);
|
||||||
|
|
||||||
|
drawLines(room::getCurrent(), scroll.x, scroll.y);
|
||||||
|
|
||||||
|
for (int y=-1; y<=1; ++y)
|
||||||
|
for (int x=-1; x<=1; ++x)
|
||||||
|
{
|
||||||
|
for (int i=0;i<64;++i) drawn[i]=false;
|
||||||
|
drawRoom(room::getCurrent(), scroll.x+x, scroll.y+y, true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawRoom(const int room, const int x, const int y)
|
|
||||||
{
|
|
||||||
if (drawn[room]) return;
|
|
||||||
drawn[room] = true;
|
|
||||||
if ( (x>=-32) && (x<520) && (y>=-16) && (y<240) )
|
|
||||||
{
|
|
||||||
draw::stencil::set(room);
|
|
||||||
draw::swapcol(1, minirooms[room].color);
|
|
||||||
draw::draw(x-16, y-8, 32, 16, minirooms[room].w*32, minirooms[room].h*16);
|
|
||||||
|
|
||||||
draw::swapcol(1, RED);
|
|
||||||
if (minirooms[room].exits[XN] != 255) draw::draw(x-4-(minirooms[room].w*2), y-5-(minirooms[room].w),4,5,0,64);
|
|
||||||
if (minirooms[room].exits[YN] != 255) draw::draw(x+(minirooms[room].h*2), y-5-(minirooms[room].h),4,5,3,64);
|
|
||||||
if (minirooms[room].exits[XP] != 255) draw::draw(x+(minirooms[room].w*2), y-3+(minirooms[room].w),4,5,0,64);
|
|
||||||
if (minirooms[room].exits[YP] != 255) draw::draw(x-4-(minirooms[room].h*2), y-3+(minirooms[room].h),4,5,3,64);
|
|
||||||
|
|
||||||
char num[] = "00"; num[0] = 48+(room/10); num[1] = 48+(room%10);
|
|
||||||
draw::print(num, x-4, y-3, LIGHT+(room==current_room?YELLOW:WHITE), BLACK);
|
|
||||||
}
|
|
||||||
if (minirooms[room].exits[XN] != 255) drawRoom(minirooms[room].exits[XN], x-24, y-12);
|
|
||||||
if (minirooms[room].exits[XP] != 255) drawRoom(minirooms[room].exits[XP], x+24, y+12);
|
|
||||||
if (minirooms[room].exits[YN] != 255) drawRoom(minirooms[room].exits[YN], x+24, y-12);
|
|
||||||
if (minirooms[room].exits[YP] != 255) drawRoom(minirooms[room].exits[YP], x-24, y+12);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool loop()
|
bool loop()
|
||||||
{
|
{
|
||||||
for (int i=0;i<64;++i) drawn[i]=false;
|
|
||||||
|
|
||||||
if (input::keyPressed(SDL_SCANCODE_ESCAPE) || input::keyPressed(SDL_SCANCODE_TAB)) return false;
|
if (input::keyPressed(SDL_SCANCODE_ESCAPE) || input::keyPressed(SDL_SCANCODE_TAB)) return false;
|
||||||
|
|
||||||
draw::cls(2);
|
|
||||||
draw::setSource(surf);
|
|
||||||
|
|
||||||
draw::stencil::enable();
|
draw::stencil::enable();
|
||||||
draw::stencil::clear(255);
|
draw::stencil::clear(255);
|
||||||
|
|
||||||
|
for (int i=0;i<64;++i) drawn[i]=false;
|
||||||
drawRoom(room::getCurrent(), scroll.x, scroll.y);
|
drawRoom(room::getCurrent(), scroll.x, scroll.y);
|
||||||
draw::render();
|
draw::render();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user