Advertisement
Guest User

Untitled

a guest
Dec 18th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. /**
  2.   *lädt die Map
  3.   *[Anzahl Felder X] [Anzahl Felder Y]
  4.   *{{Pos Tileset X, Pos Tileset Y},{ ...
  5.   *usw
  6.   */
  7.  
  8. int map[3][3] = {
  9.     {{0, 16}, {0, 0}, {0, 0}},
  10.     {{0, 16}, {0, 0}, {16, 0}},
  11.     {{0, 0} , {0, 0}, {0, 0}}
  12. };
  13.  
  14. /**
  15.   *drawt die Map
  16.   */
  17. void drawMap(){
  18.     initGraphics();
  19.     Image* tile0 = loadImage("graphics/tiles/ts0.png");
  20.    
  21.     int i;
  22.     for(i=0; i<3; i++){
  23.         int j;
  24.         for(j=0; j<3; j++){
  25.             blitImageToScreen(map[i][i], map[j][j], i+16, j+16, tile0, i*16+nCamx, j*16+nCamy);
  26.         };
  27.     };
  28. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement