- Commit perque git està loc

This commit is contained in:
2025-10-28 13:50:07 +01:00
parent 2de1afba8f
commit 692aae96b3

View File

@@ -6,15 +6,15 @@ int main(int argc, char *argv[])
draw::loadPalette("data/palette/sweetie-16.pal"); draw::loadPalette("data/palette/sweetie-16.pal");
auto tex = draw::getTexture("data/tilesets/standard.gif"); auto tex = draw::getTexture("data/tilesets/standard.gif");
draw::setSource(tex.texture); draw::setSource(tex.texture);
auto mapa = draw::createTexture("mapa", 256, 192, SDL_TEXTUREACCESS_TARGET); auto mapa = draw::createTexture("mapa", 256, 128, SDL_TEXTUREACCESS_TARGET);
draw::setDest(mapa.texture); draw::setDest(mapa.texture);
for (int y=0; y<24; ++y) for (int y=0; y<16; ++y)
for (int x=0; x<32; ++x) for (int x=0; x<32; ++x)
draw::draw(x*8, y*8, 8, 8, 0, 0, 8, 8); draw::draw(x*8, y*8, 8, 8, 0, 0, 8, 8);
draw::setDest(nullptr); draw::setDest(nullptr);
draw::fillRect(0,0,1280,960, 0, 0, 255, 255); draw::fillRect(0,0,1280,960, 0, 0, 255, 255);
draw::setSource(mapa.texture); draw::setSource(mapa.texture);
draw::draw(128, 96, 1024, 768, 0, 0, 256, 192); draw::draw(128, 224, 1024, 512, 0, 0, 256, 128);
draw::fillRect(0,100,40,760, 255, 255, 255, 128); draw::fillRect(0,100,40,760, 255, 255, 255, 128);
draw::present(); draw::present();