- ordenacio correcta
- tiles de 32 pixels
This commit is contained in:
@@ -15,9 +15,9 @@ void game::init()
|
||||
draw::loadPalette("test.gif");
|
||||
game::setUpdateTicks(64);
|
||||
|
||||
box = actor::create({0,0,0}, {6,6,6}, {24,0,24,24}, {0,24});
|
||||
box = actor::create({16,16,0}, {8,8,8}, {32,0,32,32}, {0,32});
|
||||
actor::setDirty(box);
|
||||
box = actor::create({6,0,0}, {6,6,6}, {24,0,24,24}, {0,24});
|
||||
box = actor::create({8,0,0}, {8,8,8}, {32,0,32,32}, {0,32});
|
||||
actor::setDirty(box);
|
||||
actor::reorder();
|
||||
}
|
||||
@@ -30,6 +30,8 @@ bool game::loop()
|
||||
if (input::keyDown(SDL_SCANCODE_RIGHT) && box->pos.x<42) { box->pos.x++; actor::setDirty(box); }
|
||||
if (input::keyDown(SDL_SCANCODE_UP) && box->pos.y>0) { box->pos.y--; actor::setDirty(box); }
|
||||
if (input::keyDown(SDL_SCANCODE_DOWN) && box->pos.y<42) { box->pos.y++; actor::setDirty(box); }
|
||||
if (input::keyDown(SDL_SCANCODE_Z) && box->pos.z>0) { box->pos.z--; actor::setDirty(box); }
|
||||
if (input::keyDown(SDL_SCANCODE_A) && box->pos.z<42) { box->pos.z++; actor::setDirty(box); }
|
||||
actor::reorder();
|
||||
|
||||
draw::cls(8);
|
||||
@@ -37,7 +39,7 @@ bool game::loop()
|
||||
{
|
||||
for (int x=0;x<8;++x)
|
||||
{
|
||||
draw::draw(148+x*12-y*12,80+x*6+y*6,24,11,0,13);
|
||||
draw::draw(148+x*16-y*16,76+x*8+y*8,32,15,0,1);
|
||||
}
|
||||
}
|
||||
actor::draw(actor::getFirst());
|
||||
|
||||
Reference in New Issue
Block a user