Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void UpdateScreen(void)
- {
- if (mode == CHIP8_SCREEN)
- {
- int screen_x = LCD_WIDTH_PX/2 - CHIP8scaleFactor*(64/2);
- int screen_y = LCD_HEIGHT_PX/2 - CHIP8scaleFactor*(32/2);
- for (int x = 0; x < 64; x++)
- {
- for(int y = 0; y < 32; y++)
- {
- if (CHIP8screen[64*y+x])
- CopySprite(CHIP8PixelOn,screen_x+(x*CHIP8scaleFactor),screen_y+(y*CHIP8scaleFactor),CHIP8scaleFactor,CHIP8scaleFactor);
- }
- }
- }
- else
- {
- int screen_x = LCD_WIDTH_PX/2 - SCHIP8scaleFactor*(128/2);
- int screen_y = LCD_HEIGHT_PX/2 - SCHIP8scaleFactor*(64/2);
- for (int x = 0; x < 128; x++)
- {
- for(int y = 0; y < 64; y++)
- {
- if (SCHIP8screen[128*y+x])
- CopySprite(SCHIP8PixelOn,screen_x+(x*SCHIP8scaleFactor),screen_y+(y*SCHIP8scaleFactor),SCHIP8scaleFactor,SCHIP8scaleFactor);
- }
- }
- }
- Bdisp_PutDisp_DD();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement