#include "draw.h" int main(int argc, char *argv[]) { draw::init(); draw::loadPalette("data/palette/sweetie-16.pal"); auto tex = draw::getTexture("data/tilesets/standard.gif"); draw::setSource(tex.texture); auto mapa = draw::createTexture("mapa", 256, 128, SDL_TEXTUREACCESS_TARGET); draw::setDest(mapa.texture); for (int y=0; y<16; ++y) for (int x=0; x<32; ++x) draw::draw(x*8, y*8, 8, 8, 0, 0, 8, 8); draw::setDest(nullptr); draw::fillRect(0,0,1280,960, 0, 0, 255, 255); draw::setSource(mapa.texture); draw::draw(128, 224, 1024, 512, 0, 0, 256, 128); draw::fillRect(0,100,40,760, 255, 255, 255, 128); draw::present(); SDL_Delay(2000); return 0; }