#include "jgame.h" #include "jdraw.h" #include "jinput.h" #include #include "actor.h" #include "room.h" draw::surface *surf; actor::actor_t *box; void game::init() { draw::init("The Pool", 320, 240, 3); surf = draw::loadSurface("test.gif"); draw::setSource(surf); draw::loadPalette("test.gif"); game::setUpdateTicks(64); room::load(1,3); box = actor::create({16,16,0}, {8,8,4}, {64,0,32,24}, {0,24}); box->flags = FLAG_MOVING; box->movement = MOV_Z; box->mov_push = PUSH_ZP; actor::setDirty(box, true); box = actor::create({32,32,16}, {8,8,8}, {32,0,32,32}, {0,32}); box->flags = FLAG_PUSHABLE | FLAG_GRAVITY; box->movement = MOV_CW; box->mov_push = PUSH_XN; actor::setDirty(box, true); box = actor::create({16,16,8}, {8,8,12}, {0,32,20,32}, {-6,38}); box->flags = FLAG_HERO | FLAG_PUSHABLE | FLAG_GRAVITY | FLAG_ORIENTABLE | FLAG_ANIMATED; actor::setDirty(box, true); actor::reorder(); } int sx=1, sy=0; bool game::loop() { actor::update(actor::getFirst()); actor::reorder(); draw::cls(8); room::draw(); actor::draw(actor::getFirst()); room::draw2(); //draw::draw(148+sx*2-sy*2, 67+sx+sy,24,24,24,0); draw::render(); return true; }