Advertisement
EliteAnax17

you are dumb Game Freak

Apr 1st, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. struct BG3Cnt {
  2. u16 field_0:13;
  3. u16 field_d:1;
  4. u16 field_e:2;
  5. };
  6.  
  7. void sub_80789D4(bool8 a1)
  8. {
  9. // BUG: 8-bit access to an io reg is disallowed.
  10. #define BG3CNT (*(volatile struct BG3Cnt*)REG_ADDR_BG3CNT)
  11. if (!a1) {
  12. BG3CNT.field_e = 0;
  13. BG3CNT.field_d = 1;
  14. } else if (sub_8076BE0()) {
  15. BG3CNT.field_e = 0;
  16. BG3CNT.field_d = 1;
  17. } else {
  18. BG3CNT.field_e = 1;
  19. BG3CNT.field_d = 0;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement