atm959

Bitmap

Sep 25th, 2018
595
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. void bitmapGraphicsTest(){
  2.     VBlankIntrWait();
  3.     SetMode( MODE_3 | BG2_ON);
  4.     u16 *temppointer;
  5.     temppointer = BG_COLORS;
  6.     for(i=0; i<9; i++) {
  7.         *temppointer++ = 0;
  8.     }
  9.     unsigned short* Screen = (unsigned short*)0x6000000;
  10.     for(u8 x=0;x<240;x++){
  11.         for(u8 y=0;y<160;y++){
  12.             Screen[(y * 240) + x] = RGB16(x % 32, y % 32, (x + y) % 32);
  13.         }
  14.     }
  15.     for(int i = 0; i < 256; i++) VBlankIntrWait();
  16.     SetMode( MODE_0 | BG0_ON | OBJ_ON);
  17.     loadTilesAndPalette();
  18.     initMenu();
  19.     currState = STATE_MENU;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment