Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // from main
- load_bg(fgTiles, 0, fgTilesLen/2, fgMap, 27, fgMapLen/2, fgPal, fgPalLen/2);
- // from myLib.c
- void load_bg(u16 *tiles, int tilesDestination, int tilesSize, u16 *map, int mapDestination, int mapSize, u16 *pal, int palSize)
- {
- DMA[3].src = tiles;
- DMA[3].dst = &CHARBLOCKBASE[tilesDestination];
- DMA[3].cnt = DMA_ON | tilesSize;
- DMA[3].src = map;
- DMA[3].dst = &SCREENBLOCKBASE[mapDestination];
- DMA[3].cnt = DMA_ON | mapSize;
- DMA[3].src = pal;
- DMA[3].dst = PALETTE;
- DMA[3].cnt = DMA_ON | palSize;
- }
- // warning
- 1>main.c:24: warning: passing arg 1 of `load_bg' discards qualifiers from pointer target type
- 1>main.c:24: warning: passing arg 4 of `load_bg' discards qualifiers from pointer target type
- 1>main.c:24: warning: passing arg 7 of `load_bg' discards qualifiers from pointer target type
- // from the background's header
- #define fgTilesLen 47232
- extern const unsigned short fgTiles[23616];
- #define fgMapLen 4096
- extern const unsigned short fgMap[2048];
- #define fgPalLen 512
- extern const unsigned short fgPal[256];
Add Comment
Please, Sign In to add comment