- [NEW] Gestió més eficient de la memòria que usen els GIFs

This commit is contained in:
2024-07-02 13:19:16 +02:00
parent 77df278568
commit 2efbf6f717
6 changed files with 68 additions and 36 deletions

View File

@@ -55,7 +55,7 @@ void game::init()
draw::init("The Pool", 520, 240, 3);
//room::init();
surf = draw::loadSurface("test.gif");
surf = draw::getSurface("test.gif");
draw::setSource(surf);
draw::loadPalette("test.gif");
game::setUpdateTicks(64);
@@ -384,12 +384,6 @@ bool game::loop()
draw::print2(actor::hero::getBoostGod()/2, 2, 6, 28, col1, FONT_ZOOM_NONE);
draw::print2(actor::hero::getBoostRun()/2, 2, 9, 28, col2, FONT_ZOOM_NONE);
//print(10, 200, actor::hero::getBoostJump());
//print(30, 200, actor::hero::getBoostGod()/2);
//print(50, 200, actor::hero::getBoostRun()/2);
//draw::draw(148+sx*2-sy*2, 67+sx+sy,24,24,24,0);
/*
print(0,0,input::mouseX());
print(0,20,input::mouseY());
@@ -669,8 +663,8 @@ switch (section)
ui::label("BITMAP", 2, line, 96, 11, GRAY); line+=10;
if (btn_opt2("FILE", 2, line, act->bmp, gifs)) {
draw::freeSurface(act->surface);
act->surface = draw::loadSurface(act->bmp);
//draw::freeSurface(act->surface);
act->surface = draw::getSurface(act->bmp);
changed = true;
}
line+=10;