Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //u8 state_3d
- //u8 off3D
- void Check_3D() {
- if(state_3d != *(u8*)0x10144000) //If 3D slider state changed
- {
- u8 temp_3d = (*(u8*)0x10144000) * 5 / 255; //We calculate new 3D data
- if(temp_3d != off3D) { // We check if's different from the old
- off3D = temp_3d; //Change 3D offset with new value
- ClearScreen(0, 1); //Clear upper screen to redraw
- }
- }
- }
- /*...*/
- void main() {
- /*...*/
- state_3d = 0;
- off3D = 0;
- Check_3D();
- /*...*/
- while(game_loop) {
- Check_3D();
- /*...*/
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment