Guest User

Untitled

a guest
Jul 17th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. // from main
  2.  
  3. load_bg(fgTiles, 0, fgTilesLen/2, fgMap, 27, fgMapLen/2, fgPal, fgPalLen/2);
  4.  
  5.  
  6. // from myLib.c
  7.  
  8. void load_bg(u16 *tiles, int tilesDestination, int tilesSize, u16 *map, int mapDestination, int mapSize, u16 *pal, int palSize)
  9. {
  10. DMA[3].src = tiles;
  11. DMA[3].dst = &CHARBLOCKBASE[tilesDestination];
  12. DMA[3].cnt = DMA_ON | tilesSize;
  13.  
  14. DMA[3].src = map;
  15. DMA[3].dst = &SCREENBLOCKBASE[mapDestination];
  16. DMA[3].cnt = DMA_ON | mapSize;
  17.  
  18. DMA[3].src = pal;
  19. DMA[3].dst = PALETTE;
  20. DMA[3].cnt = DMA_ON | palSize;
  21.  
  22. }
  23.  
  24.  
  25. // warning
  26.  
  27. 1>main.c:24: warning: passing arg 1 of `load_bg' discards qualifiers from pointer target type
  28. 1>main.c:24: warning: passing arg 4 of `load_bg' discards qualifiers from pointer target type
  29. 1>main.c:24: warning: passing arg 7 of `load_bg' discards qualifiers from pointer target type
  30.  
  31.  
  32. // from the background's header
  33.  
  34. #define fgTilesLen 47232
  35. extern const unsigned short fgTiles[23616];
  36.  
  37. #define fgMapLen 4096
  38. extern const unsigned short fgMap[2048];
  39.  
  40. #define fgPalLen 512
  41. extern const unsigned short fgPal[256];
Add Comment
Please, Sign In to add comment