Nessuna descrizione

sots.h 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #ifndef _SOTS_HEADER
  2. #define _SOTS_HEADER
  3. #include "include/gba.h"
  4. #include "oam_types.h"
  5. // structs, maybe add an extra file for that
  6. // RoA Sounds
  7. #define EMPTYMOVESOUND 0x05
  8. #define TILEMOVESOUND 0x23
  9. #define ERRORSOUND 0x20
  10. #define TAKETILESOUND 0x24
  11. #define DROPTILESOUND 0x2C
  12. #define WINSONG 0x186
  13. extern u32 dummyAnimData;
  14. extern u32 dummyAnimRoutine;
  15. // Memory Locations
  16. extern u16 OAM_Mem[];
  17. extern u16 OBJ_PaletteMem[];
  18. extern u16 OBJ_PaletteMem2[];
  19. extern u16 BG_PaletteMem[];
  20. extern u16 BG_PaletteMem2[];
  21. // Key Stuffs
  22. extern u8 KEYS;
  23. extern u8 KEYSHOLD;
  24. extern u8 KEYSSCROLL;
  25. extern u8 KEYSLR;
  26. extern u8 KEYSHOLDLR;
  27. extern u8 KEYSSCROLLLR;
  28. // Variables and Such
  29. extern u16 LASTRESULT;
  30. extern u16 var8004;
  31. extern u8 fadeScreenDone;
  32. extern void *globalVars;
  33. extern void *boxInitStuff;
  34. extern void *nullCallback;
  35. // BPED Functions
  36. extern void *malloc(int size);
  37. extern void free(void *ptr);
  38. extern void fadeScreen(u32 palBitmask, int r1, int r2, int r3, u16 color); // TODO: find proper argument names
  39. extern void playSound(u16);
  40. extern void playFanfare(u16);
  41. extern int waitForFanfare();
  42. extern int waitForSound();
  43. extern void changeIO(int address, u16 registerValue); // addreess relative to 0x04000000
  44. extern void enableBG(u8 BG);
  45. extern void clearOAM();
  46. extern void loadPalette(Palette16Colors *palettePtr, u8 offset, u8 length);
  47. extern void initMapData(u8 r0, u32 r1, u8 r2); // TODO: find proper argument names
  48. extern void boxPrint(u8 foo, u8 font, u8 x, u8 y, u32 bar, u32 baz, TextStruct *textPtr); // TODO: find proper argument names
  49. extern void printBoxesToTilemap(u8 a, u8 b); // TODO: find proper argument names
  50. extern void forceNewBoxAndInitBG(u32 *addr); // TODO: Pointer to what kind of data? Add a proper type!
  51. extern void loadSpritePal(u32 *addr); // TODO: Pointer to what kind of data? Add a proper type!
  52. extern void storeCallback(int *callbackHandler);
  53. extern void storeCallback2(int *callbackHandler);
  54. // SOTS exclusive functions
  55. extern void initStuff();
  56. extern void updateEverything();
  57. extern void updateEverything2();
  58. extern void someExitFunc();
  59. extern void fadeScreenBlack();
  60. extern void fadeScreenNormal();
  61. extern Sprite *createSprite(void *addr, void *addr2, u16 XPos, u16 YPos, u8 i); //find out what "i" is
  62. extern void deleteSprite(Sprite *spritePtr);
  63. // BIOS functions
  64. extern void ResetSystem(); // Calls does multiple SVCs and resets the whole System
  65. extern void RegisterRamReset(int resetFlags); // SVC 0x1
  66. extern void VBlankIntrWait(); // SVC 0x5
  67. extern int Div(int number, int denom); // SVC 0x6
  68. extern u16 Sqrt(unsigned int x); // SVC 0x8
  69. extern u16 ArcTan2(u16 x, u16 y); // SVC 0xA
  70. extern void CpuSet(void *srcPtr, void *destPtr, int legnthMode); // SVC 0xB
  71. extern void CpuFastSet(void *srcPtr, void *destPtr, int lengthMode); // SVC 0xC
  72. extern void BgAffineSet(void *srcDataField, void *destDataField, int numCalc); // SVC 0xE
  73. extern void ObjAffineSet(void *srcDataField, void *destDataField, int numCalc, int parOffset); // SVC 0xF
  74. extern void LZ77UnCompWram(void *headerPtr, void *destPtr); // SVC 0x11
  75. extern void LZ77UnCompVram(void *headerPtr, void *destPtr); // SVC 0x12
  76. extern void RLUnCompWram(void *srcDataField, void *destAddr); // SVC 0x14
  77. extern void RLUnCompVram(void *srcDataField, void *destAddr); // SVC 0x15
  78. extern int MultiBoot(void *MultiBootParamPtr); // SVC 0x25
  79. #endif