- No se, molts canvis i coses
This commit is contained in:
@@ -1,31 +1,45 @@
|
||||
#include "rooms.h"
|
||||
#include "enemies.h"
|
||||
#include "japi/draw.h"
|
||||
#include "japi/game.h"
|
||||
#include "images.h"
|
||||
#include "japi/font.h"
|
||||
#include "menu.h"
|
||||
|
||||
bool loop();
|
||||
|
||||
void game::init()
|
||||
{
|
||||
draw::init("DILEMMAKER v0.1", 320, 240, 2, false);
|
||||
draw::init("DILEMMAKER v0.1", 800, 600);
|
||||
game::setState(loop);
|
||||
enemies::load();
|
||||
rooms::load();
|
||||
images::loadPalette("./data/palette/zx-spectrum.pal");
|
||||
font::load("font/8bithud");
|
||||
}
|
||||
|
||||
bool loop()
|
||||
{
|
||||
draw::cls(4);
|
||||
draw::setTrans(255);
|
||||
//rooms::drawFullMap();
|
||||
|
||||
rooms::draw();
|
||||
draw::color(COLOR_BRIGHT_BLACK);
|
||||
/*for (int i=0; i<=32; ++i) draw::vline(64+i*16, 48, 256);
|
||||
for (int i=0; i<=16; ++i) draw::hline(64, 48+i*16, 512);
|
||||
*/
|
||||
draw::cls(0x00000000);
|
||||
|
||||
menu::start();
|
||||
if (menu::option("FILE")) {
|
||||
menu::popup::start();
|
||||
menu::popup::end();
|
||||
}
|
||||
if (menu::option("EDIT")) {
|
||||
menu::popup::start();
|
||||
menu::popup::end();
|
||||
}
|
||||
if (menu::option("SELECTION")) {
|
||||
menu::popup::start();
|
||||
menu::popup::end();
|
||||
}
|
||||
if (menu::option("VIEW")) {
|
||||
menu::popup::start();
|
||||
menu::popup::end();
|
||||
}
|
||||
|
||||
/*x1 += 6; x2 = x1 + font::len("FILE")+6;
|
||||
font::print("FILE", x1, 5); x1=x2;
|
||||
|
||||
font::print("EDIT", x, 5); x+= font::len("EDIT")+12;
|
||||
font::print("SELECTION", x, 5); x+= font::len("SELECTION")+12;
|
||||
font::print("VIEW", x, 5); x+= font::len("VIEW")+12;*/
|
||||
draw::render();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user