diff options
| author | camthesaxman <cameronghall@cox.net> | 2018-01-04 23:42:42 -0600 | 
|---|---|---|
| committer | camthesaxman <cameronghall@cox.net> | 2018-01-04 23:42:42 -0600 | 
| commit | 3d49abfecb20b9b86311cbd83ff92a20761ea256 (patch) | |
| tree | 9e65e0cf9a6ce4ba318f0e144553248e6709eb61 /include | |
| parent | 501482beadd05c5ade13f6919c3c2cd42c86952d (diff) | |
| parent | f5fbe5b66226f4e7e38fe5d4638831d1ce19b36b (diff) | |
fix merge conflicts
Diffstat (limited to 'include')
| -rwxr-xr-x | include/ewram.h | 5 | ||||
| -rw-r--r-- | include/field_effect.h | 1 | ||||
| -rw-r--r-- | include/global.h | 10 | ||||
| -rw-r--r-- | include/graphics.h | 57 | ||||
| -rw-r--r-- | include/heated_rock.h | 10 | ||||
| -rw-r--r-- | include/rom_8077ABC.h | 5 | ||||
| -rw-r--r-- | include/slot_machine.h | 75 | ||||
| -rw-r--r-- | include/sprite.h | 10 | 
8 files changed, 150 insertions, 23 deletions
| diff --git a/include/ewram.h b/include/ewram.h index eacc02cab..5a350840a 100755 --- a/include/ewram.h +++ b/include/ewram.h @@ -24,7 +24,7 @@ extern u8 gSharedMem[];  #define ewram0arr                       ((u8 (*)[32])gSharedMem)  #define eVoidSharedArr                  (void *)(ewram_addr + 0x0)  #define eVoidSharedArr2                 (u32)(ewram_addr) // ew(ram) -#define ewram0_8                        ((struct UnkStruct2000000 *)(gSharedMem + 0x0)) +#define eSlotMachine                    ((struct SlotMachineEwramStruct *)(gSharedMem + 0x0))  #define ewram0_9(i)                     (u8 *)(ewram_addr + (i * 0x20))  #define ewram0_10                       (*(struct UnknownPokenav0*)(gSharedMem + 0))  #define ewram0_11                       (*(struct UnknownPokenav0_1*)(gSharedMem + 0)) @@ -70,7 +70,7 @@ extern u8 gSharedMem[];  #define ewramF800                       (&gSharedMem[0xF800])  #define ewram_2010000                   (*(struct TradeEwramStruct *)(gSharedMem + 0x10000))  #define ewram10000                      (&gSharedMem[0x10000]) -#define ewram10000_2                    (void *)(gSharedMem + 0x10000) // slot machine +#define eSlotMachineGfxBuffer                    (void *)(gSharedMem + 0x10000) // slot machine  #define ePokedexPalAddr3                (void *)(gSharedMem + 0x10000)  #define ewram10800                      (&gSharedMem[0x10800])  #define ewram11000                      (&gSharedMem[0x11000]) @@ -78,6 +78,7 @@ extern u8 gSharedMem[];  #define ewram12000                      (&gSharedMem[0x12000])  #define ewram12800                      (&gSharedMem[0x12800])  #define ewram13000                      (&gSharedMem[0x13000]) +#define eSlotMachineReelTimeGfxBuffer                      (&gSharedMem[0x13200])  #define ewram13800                      (&gSharedMem[0x13800])  #define EWRAM_14000                     ((u8 *)(gSharedMem + 0x14000))  #define ewram14000                      (&gSharedMem[0x14000]) diff --git a/include/field_effect.h b/include/field_effect.h index 9f71efba1..bb859074f 100644 --- a/include/field_effect.h +++ b/include/field_effect.h @@ -252,6 +252,7 @@ void FreeResourcesAndDestroySprite(struct Sprite *sprite);  void MultiplyInvertedPaletteRGBComponents(u16, u8, u8, u8);  void sub_80878A8(void);  void sub_8087BA8(void); +void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b);  extern s32 gFieldEffectArguments[8]; diff --git a/include/global.h b/include/global.h index c7027eccf..0764718ca 100644 --- a/include/global.h +++ b/include/global.h @@ -5,7 +5,7 @@  #include "config.h"  // IDE support -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__CYGWIN__)  #define _(x) x  #define __(x) x  #define INCBIN_U8 {0} @@ -27,14 +27,6 @@ int     strcmp (const char *, const char *);  #define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided\n") -#define nonmatching(fndec, x) {\ -__attribute__((naked))\ -fndec\ -{\ -    asm_unified(x);\ -}\ -} -  #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))  #define POKEMON_SLOTS_NUMBER 412 diff --git a/include/graphics.h b/include/graphics.h index e869b88e9..42e6fd5c6 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2656,6 +2656,12 @@ extern const u8 gNamingScreenRightPointingTriangleTiles[];  extern const u8 gNamingScreenUnderscoreTiles[];  extern const u16 gNamingScreenPalettes[][16]; +extern const u8 gMenuWordGroupIndicator_Gfx[]; +extern const u8 gMenuWordGroupFrame_Gfx[]; +extern const u16 gMenuWordGroupIndicator_Pal[]; +extern const u16 gMenuWordGroupFrame1_Pal[]; +extern const u16 gMenuWordGroupFrame2_Pal[]; +  extern const u8 gUnknown_08E94510[];  extern const u8 gUnknown_08E94550[];  extern const u8 gUnknown_08E94590[]; @@ -2664,13 +2670,54 @@ extern const u8 gUnknown_08E94AD0[];  extern const u8 gUnknown_08E953D0[];  extern const u8 gUnknown_08E954B0[];  extern const u8 gUnknown_08E95774[]; +extern const u16 gUnknown_08E95A18[]; +extern const u16 gUnknown_08E95AB8[]; +extern const u16 gUnknown_08E95FB8[]; -extern const u8 gMenuWordGroupIndicator_Gfx[]; -extern const u8 gMenuWordGroupFrame_Gfx[]; -extern const u16 gMenuWordGroupIndicator_Pal[]; -extern const u16 gMenuWordGroupFrame1_Pal[]; -extern const u16 gMenuWordGroupFrame2_Pal[]; +extern const u16 gSlotMachineSpritePalette0[]; +extern const u16 gSlotMachineSpritePalette1[]; +extern const u16 gSlotMachineSpritePalette2[]; +extern const u16 gSlotMachineSpritePalette3[]; +extern const u16 gSlotMachineSpritePalette4[]; +extern const u16 gSlotMachineSpritePalette5[]; +extern const u16 gSlotMachineSpritePalette6[]; +extern const u8 gSlotMachine_Gfx[]; +extern const u8 gSlotMachineReelSymbol1Tiles[]; +extern const u8 gSlotMachineReelSymbol2Tiles[]; +extern const u8 gSlotMachineReelSymbol3Tiles[]; +extern const u8 gSlotMachineReelSymbol4Tiles[]; +extern const u8 gSlotMachineReelSymbol5Tiles[]; +extern const u8 gSlotMachineReelSymbol6Tiles[]; +extern const u8 gSlotMachineReelSymbol7Tiles[]; +extern const u8 gSlotMachineNumber0Tiles[]; +extern const u8 gSlotMachineNumber1Tiles[]; +extern const u8 gSlotMachineNumber2Tiles[]; +extern const u8 gSlotMachineNumber3Tiles[]; +extern const u8 gSlotMachineNumber4Tiles[]; +extern const u8 gSlotMachineNumber5Tiles[]; +extern const u8 gSlotMachineNumber6Tiles[]; +extern const u8 gSlotMachineNumber7Tiles[]; +extern const u8 gSlotMachineNumber8Tiles[]; +extern const u8 gSlotMachineNumber9Tiles[]; +extern const u8 gSpriteImage_8E98828[]; +extern const u8 gSpriteImage_8E98848[]; +extern const u8 gSpriteImage_8E98868[]; +extern const u8 gSpriteImage_8E988E8[]; +extern const u8 gSpriteImage_8E98968[]; +extern const u8 gSpriteImage_8E989E8[]; +extern const u8 gSpriteImage_8E98A68[]; +extern const u8 gSpriteImage_8E98AE8[]; +extern const u8 gSpriteImage_8E98B68[]; +extern const u8 gSpriteImage_8E98BE8[]; +extern const u8 gSpriteImage_8E98CE8[]; +extern const u8 gSpriteImage_8E98DE8[]; +extern const u8 gSpriteImage_8E98FE8[]; +extern const u8 gSpriteImage_8E991E8[]; +extern const u8 gSpriteImage_8E993E8[]; +extern const u8 gUnknownPalette_08E997E8[]; +extern const u8 gSpriteImage_8E99808[]; +extern const u8 gSlotMachineReelTimeLights_Gfx[];  extern const u8 gUnknown_08E99FB0[];  extern const u8 gUnknown_08E9A100[];  extern const u8 gUnknown_08E9A300[]; diff --git a/include/heated_rock.h b/include/heated_rock.h new file mode 100644 index 000000000..26856fe7f --- /dev/null +++ b/include/heated_rock.h @@ -0,0 +1,10 @@ +#ifndef GUARD_HEATED_ROCK_H +#define GUARD_HEATED_ROCK_H + +// heated_rock (moves heated rock sprites) +// Used in Eruption. + +u16 sub_80D5940(u8 spriteId); +void sub_80D5994(struct Sprite *sprite, s16 x, s16 y); + +#endif // GUARD_HEATED_ROCK_H
\ No newline at end of file diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h index 04d996a21..dda90c48f 100644 --- a/include/rom_8077ABC.h +++ b/include/rom_8077ABC.h @@ -46,6 +46,7 @@ void sub_8078E70(u8 sprite, u8);  void sub_8078F40(u8 sprite);  void sub_8078F9C(u8 sprite);  void sub_8079518(struct Sprite *sprite); +void sub_8079534(struct Sprite *sprite);  void sub_80796F8(u8 task);  void sub_80797EC(struct Task *task);  void sub_8079814(u8 taskId); @@ -53,6 +54,9 @@ void sub_8079A64(u8 sprite);  u16 sub_8079B10(u8 sprite);  void sub_8079BF4(s16 *bottom, s16 *top, const void *ptr);  void *sub_8079BFC(s16 bottom, s16 top); +// u8 a2 := u8 sprite +void sub_8079C08(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a7); +u8 sub_8079C74(struct Task *task);  void sub_8079E24();  u8 sub_8079E90(u8 slot);  u8 GetBankIdentity_permutated(u8 slot); @@ -77,6 +81,7 @@ void sub_80785E4(struct Sprite *sprite);  void sub_8078278(struct Sprite *sprite);  void sub_8078C00(struct Sprite *sprite);  void sub_8078114(struct Sprite *sprite); +void sub_8078174(struct Sprite *sprite);  void sub_80793C4(struct Sprite *sprite);  void sub_807A3FC(u8 slot, u8 a2, s16 *a3, s16 *a4);  u8 sub_8079ED4(u8 slot); diff --git a/include/slot_machine.h b/include/slot_machine.h index c39aa7ca8..f886d9239 100644 --- a/include/slot_machine.h +++ b/include/slot_machine.h @@ -1,8 +1,79 @@  #ifndef GUARD_SLOT_MACHINE_H  #define GUARD_SLOT_MACHINE_H -void PlaySlotMachine(u8, void *); +enum { +    SLOT_MACHINE_TAG_7_RED, +    SLOT_MACHINE_TAG_7_BLUE, +    SLOT_MACHINE_TAG_AZURILL, +    SLOT_MACHINE_TAG_LOTAD, +    SLOT_MACHINE_TAG_CHERRY, +    SLOT_MACHINE_TAG_POWER, +    SLOT_MACHINE_TAG_REPLAY +}; + +enum { +    SLOT_MACHINE_MATCHED_1CHERRY, +    SLOT_MACHINE_MATCHED_2CHERRY, +    SLOT_MACHINE_MATCHED_REPLAY, +    SLOT_MACHINE_MATCHED_LOTAD, +    SLOT_MACHINE_MATCHED_AZURILL, +    SLOT_MACHINE_MATCHED_POWER, +    SLOT_MACHINE_MATCHED_777_MIXED, +    SLOT_MACHINE_MATCHED_777_RED, +    SLOT_MACHINE_MATCHED_777_BLUE, +    SLOT_MACHINE_MATCHED_NONE +}; + +struct SlotMachineEwramStruct { +    /*0x00*/ u8 state; +    /*0x01*/ u8 unk01; +    /*0x02*/ u8 pikaPower; +    /*0x03*/ u8 unk03; +    /*0x04*/ u8 unk04; +    /*0x05*/ u8 unk05; +    /*0x06*/ u8 unk06; +    /*0x07*/ u8 unk07; +    /*0x08*/ u16 matchedSymbols; +    /*0x0A*/ u8 unk0A; +    /*0x0B*/ u8 unk0B; +    /*0x0C*/ s16 coins; +    /*0x0E*/ s16 payout; +    /*0x10*/ s16 unk10; +    /*0x12*/ s16 bet; +    /*0x14*/ s16 unk14; +    /*0x16*/ s16 unk16; +    /*0x18*/ s16 unk18; +    /*0x1A*/ s16 unk1A; +    /*0x1C*/ s16 unk1C[3]; +    /*0x22*/ u16 unk22[3]; +    /*0x28*/ s16 reelPositions[3]; +    /*0x2E*/ s16 unk2E[3]; +    /*0x34*/ s16 unk34[3]; +    /*0x3A*/ u8 reelTasks[3]; +    /*0x3D*/ u8 unk3D; +    /*0x3E*/ u8 unk3E; +    /*0x3F*/ u8 unk3F; +    /*0x40*/ u8 unk40; +    /*0x41*/ u8 unk41; +    /*0x42*/ u8 unk42; +    /*0x43*/ u8 unk43; +    /*0x44*/ u8 unk44[5]; +    /*0x49*/ u8 unk49[2]; +    /*0x49*/ u8 unk4B[3]; +    /*0x4E*/ u8 unk4E[2]; +    /*0x50*/ u8 unk50[2]; +    /*0x52*/ u8 unk52[2]; +    /*0x54*/ u8 unk54[4]; +    /*0x58*/ u16 win0h; +    /*0x5a*/ u16 win0v; +    /*0x5c*/ u16 winIn; +    /*0x5e*/ u16 winOut; +    /*0x60*/ u16 backupMapMusic; +    /*0x64*/ MainCallback prevMainCb; +}; + +void PlaySlotMachine(u8 arg0, MainCallback cb);  void sub_8104DA4(void); -u8 sub_8105BB4(u8, u8, s16); +u8 sub_8105BB4(u8 templateIdx, u8 cbAndCoordsIdx, s16 a2);  #endif // GUARD_SLOT_MACHINE_H diff --git a/include/sprite.h b/include/sprite.h index 13c76c84b..b72c09989 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -120,10 +120,6 @@ union AffineAnimCmd      {.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}}  #define AFFINEANIMCMD_END \      {.type = AFFINEANIMCMDTYPE_END} -#define AFFINEANIMCMD_LOOP(_count) \ -    {.loop = {.type = AFFINEANIMCMDTYPE_LOOP, .count = _count}} -#define AFFINEANIMCMD_JUMP(_target) \ -    {.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}}  struct AffineAnimState  { @@ -172,6 +168,8 @@ struct SpriteTemplate      void (*callback)(struct Sprite *);  }; +typedef void (*SpriteCallback)(struct Sprite *); +  struct Sprite  {      /*0x00*/ struct OamData oam; @@ -180,7 +178,7 @@ struct Sprite      /*0x10*/ const union AffineAnimCmd *const *affineAnims;      /*0x14*/ const struct SpriteTemplate *template;      /*0x18*/ const struct SubspriteTable *subspriteTables; -    /*0x1C*/ void (*callback)(struct Sprite *); +    /*0x1C*/ SpriteCallback callback;      /*0x20*/ struct Coords16 pos1;      /*0x24*/ struct Coords16 pos2; @@ -238,6 +236,8 @@ extern s16 gSpriteCoordOffsetX;  extern s16 gSpriteCoordOffsetY;  extern u8 gReservedSpritePaletteCount; +extern u8 gOamLimit; +  extern struct Sprite gSprites[];  void ResetSpriteData(void); | 
