- Llevat el tema dels shaders, que aci no fa falta
- Fent proves de visualització - Afegits un parell de bocetos
This commit is contained in:
@@ -229,7 +229,7 @@ namespace rooms
|
||||
tile--;
|
||||
room.thumbnail->pixels[x+y*32] = pixels[tile%24][tile/24];
|
||||
} else {
|
||||
room.thumbnail->pixels[x+y*32] = room.bgColor;
|
||||
room.thumbnail->pixels[x+y*32] = room.bgColor!=0 ? room.bgColor : 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -300,12 +300,12 @@ namespace rooms
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}*/
|
||||
room_t &room = rooms["01"];
|
||||
/*room_t &room = rooms["01"];
|
||||
for (int y=0; y<16; ++y) {
|
||||
for (int x=0; x<32; ++x)
|
||||
std::cout << std::to_string(room.tiles[x][y]) << ",";
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
void draw()
|
||||
@@ -343,30 +343,43 @@ namespace rooms
|
||||
draw::setDestination(nullptr);
|
||||
draw::setSource(map_surface);
|
||||
draw::cls(COLOR_BRIGHT_BLACK);
|
||||
draw::color(room.border);
|
||||
draw::fillrect(48, 32, 512+32, 256+32);
|
||||
draw::setViewport(64, 48, 512, 256);
|
||||
draw::draw(0, 0, 256, 128, 0, 0, 2);
|
||||
//draw::color(room.border);
|
||||
//draw::fillrect(48, 32, 512+32, 256+32);
|
||||
//draw::setViewport(64, 48, 512, 256);
|
||||
draw::setViewport(32, 24, 256, 128);
|
||||
draw::draw(0, 0);
|
||||
draw::resetViewport();
|
||||
|
||||
//draw::setSource(room.thumbnail);
|
||||
//draw::draw();
|
||||
}
|
||||
|
||||
uint8_t blinking = 0;
|
||||
void drawFullMap()
|
||||
{
|
||||
blinking = (blinking+1)%16;
|
||||
for (auto &item : rooms)
|
||||
{
|
||||
auto room = item.second;
|
||||
int x = ((full_map_x-room.map_x)*38)-1;
|
||||
int y = ((full_map_y-room.map_y)*22)-1;
|
||||
draw::resetViewport();
|
||||
draw::color(COLOR_WHITE);
|
||||
draw::rect(x, y, 34, 18);
|
||||
|
||||
if (item.first == "01") {
|
||||
draw::color(blinking);
|
||||
draw::rect(x-1, y-1, 36, 20);
|
||||
draw::color(COLOR_BLACK);
|
||||
draw::rect(x, y, 34, 18);
|
||||
} else {
|
||||
draw::color(COLOR_WHITE);
|
||||
draw::rect(x+1, y+1, 34, 18);
|
||||
draw::color(COLOR_BLACK);
|
||||
draw::rect(x, y, 34, 18);
|
||||
}
|
||||
draw::setSource(room.thumbnail);
|
||||
draw::draw(x+1, y+1, 32, 16, 0, 0);
|
||||
|
||||
if (room.roomUp != "0") draw::fillrect(x+15, y-4, 4, 4);
|
||||
//if (room.roomDown != "0") draw::fillrect(x+15, y+16, 4, 4);
|
||||
if (room.roomLeft != "0") draw::fillrect(x-4, y+7, 4, 4);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user