#include <DarkGDK.h>
void ResInit(void);
void DarkGDK(void)
{
dbSyncOn();
dbSyncRate(60);
ResInit();
//dbSetWindowSize(270,200);
while( LoopGDK())
{
dbPasteImage(36,0,0);
dbShowSprite(1);
dbSync();
}
return;
}
void ResInit(void)
{
dbLoadImage("map.bmp",36);//map size 270x200
dbCreateAnimatedSprite(1,"mario.bmp",4,1,1);//mario=1; 1
dbCreateAnimatedSprite(2,"crab2.bmp",2,1,2);//crab=2; 2-12
dbCreateAnimatedSprite(13,"spiny.bmp",2,1,3);//spiny=3; 13-23
dbCreateAnimatedSprite(24,"buzzbuzz.bmp",2,1,4);//buzz=4; 24-34
dbCreateAnimatedSprite(35,"floor.bmp",2,1,5);//floor=5; 35
dbSprite(1,90,160,1);
}
i already have the resources for this project and i have written this code, but the problem that arises is the window cannot be sized so that the bitmap isnt stretched if was to fill the entire window. i need it so that the window fits to the background exactly, and that i can see it (not too small) and if it was regular size and i moved a sprite 1 to the right it would move one pixel, then it was 4x the size and i moved it 1 to the right it would move 4 pixels and such. im not sure how to do this. Plz help!
"When you can create craters a mile wide, You don't need to aim too carefully!"