- [CHG] Pujat el maxim d'habitacions per al prologo

This commit is contained in:
2024-10-07 13:56:09 +02:00
parent fa97ea79e8
commit 304f636a95
4 changed files with 22 additions and 22 deletions

View File

@@ -12,7 +12,7 @@ namespace modules
{
draw::surface *surf;
vec2_t scroll {0,0};
int drawn[64];
int drawn[MAX_ROOMS];
int current_room;
int previous_room;
@@ -25,7 +25,7 @@ namespace modules
uint32_t specials;
uint8_t editor_done;
};
miniroom_t minirooms[64];
miniroom_t minirooms[MAX_ROOMS];
void drawLines(const int room, const int x, const int y)
{
@@ -112,7 +112,7 @@ namespace modules
for (int i=0; i<=ZN; ++i) {
const int next_room = minirooms[room].exits[i];
if ( (next_room >= 0) && (next_room <= 64) && (!drawn[next_room]) ) {
if ( (next_room >= 0) && (next_room <= MAX_ROOMS) && (!drawn[next_room]) ) {
room::load(next_room);
loadMiniRoom();
}
@@ -124,14 +124,14 @@ namespace modules
surf = draw::getSurface("mapa.gif");
scroll = {260,120};
draw::resetViewport();
for (int i=0;i<64;++i) drawn[i]=false;
for (int i=0;i<MAX_ROOMS;++i) drawn[i]=false;
current_room = room::getCurrent();
previous_room = current_room;
loadMiniRoom();
room::load(42);
for (int i=0;i<64;++i) drawn[i]=false;
for (int i=0;i<MAX_ROOMS;++i) drawn[i]=false;
draw::cls(2);
draw::setSource(surf);
@@ -140,14 +140,14 @@ namespace modules
for (int y=-1; y<=1; ++y)
for (int x=-1; x<=1; ++x)
{
for (int i=0;i<64;++i) drawn[i]=false;
for (int i=0;i<MAX_ROOMS;++i) drawn[i]=false;
drawRoom(room::getCurrent(), scroll.x+x, scroll.y+y, true);
}
draw::stencil::enable();
draw::stencil::clear(255);
for (int i=0;i<64;++i) drawn[i]=false;
for (int i=0;i<MAX_ROOMS;++i) drawn[i]=false;
drawRoom(room::getCurrent(), scroll.x, scroll.y);
draw::render();
@@ -165,7 +165,7 @@ namespace modules
//draw::stencil::enable();
//draw::stencil::clear(255);
//for (int i=0;i<64;++i) drawn[i]=false;
//for (int i=0;i<MAX_ROOMS;++i) drawn[i]=false;
//drawRoom(room::getCurrent(), scroll.x, scroll.y);
const int hover = draw::stencil::query(input::mouseX(), input::mouseY());