Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *lädt die Map
- *[Anzahl Felder X] [Anzahl Felder Y]
- *{{Pos Tileset X, Pos Tileset Y},{ ...
- *usw
- */
- int map[3][3] = {
- {{0, 16}, {0, 0}, {0, 0}},
- {{0, 16}, {0, 0}, {16, 0}},
- {{0, 0} , {0, 0}, {0, 0}}
- };
- /**
- *drawt die Map
- */
- void drawMap(){
- initGraphics();
- Image* tile0 = loadImage("graphics/tiles/ts0.png");
- int i;
- for(i=0; i<3; i++){
- int j;
- for(j=0; j<3; j++){
- blitImageToScreen(map[i][i], map[j][j], i+16, j+16, tile0, i*16+nCamx, j*16+nCamy);
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement