Removed trailing spaces and tabs

This commit is contained in:
Eduardo Quezada 2023-02-17 18:13:00 -03:00
parent 742999d0a1
commit 992091189e
84 changed files with 686 additions and 686 deletions

View File

@ -40,7 +40,7 @@ Before following the respective guides, please install devkitARM and ensure the
Msys2:
```console
export DEVKITPRO=C:/devkitPro
export DEVKITPRO=C:/devkitPro
export DEVKITARM=${DEVKITPRO}/devkitARM
```

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
.rodata
.public _0223F900

View File

@ -5,7 +5,7 @@
.include "global.inc"
.text
thumb_func_start ov12_0224E4FC
ov12_0224E4FC: ; 0x0224E4FC
push {r3, r4, r5, r6, r7, lr}
@ -21585,17 +21585,17 @@ _022587FC: .word 0x000080FF
thumb_func_end ov12_02258688
.rodata
ov12_0226CB48: ; 0x0226CB48
.byte 0x10, 0x08, 0x04, 0x03, 0x02, 0x00, 0x00, 0x00
ov12_0226CB50: ; 0x0226CB50
.byte 0x32, 0x6A, 0x7A, 0x75, 0x76, 0x79, 0x77, 0x78
ov12_0226CB58: ; 0x0226CB58
.byte 0x90, 0x00, 0x66, 0x00, 0xA6, 0x00, 0x77, 0x00
.byte 0xE3, 0x00, 0xA5, 0x00
ov12_0226CB64: ; 0x0226CB64
.byte 0x29, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0x90, 0x00, 0xE3, 0x00

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov12_02261FD4
ov12_02261FD4: ; 0x02261FD4
push {r4, lr}

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov12_02264824
ov12_02264824: ; 0x02264824
push {r4, r5, r6, r7, lr}
@ -2878,12 +2878,12 @@ _02265DEC:
thumb_func_end ov12_02265DC4
.rodata
ov12_0226D368: ; 0x0226D368
.byte 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0x00
.byte 0x40, 0x02, 0xC0, 0x00, 0x40, 0x03, 0xC0, 0x00, 0x00, 0x0A, 0xE0, 0x00, 0x00, 0x0B, 0xE0, 0x00
.byte 0x40, 0x04, 0xC0, 0x00, 0x40, 0x05, 0xC0, 0x00, 0x00, 0x0C, 0xE0, 0x00, 0x00, 0x0D, 0xE0, 0x00
ov12_0226D390: ; 0x0226D390
.byte 0x80, 0x04

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov12_02265E28
ov12_02265E28: ; 0x02265E28
push {r3, r4, r5, r6, r7, lr}
@ -256,7 +256,7 @@ ov12_02266008: ; 0x02266008
thumb_func_end ov12_02266008
.rodata
ov12_0226E0A0: ; 0x0226E0A0
.byte 0x88, 0x00, 0x92, 0x00, 0x82, 0x00, 0x98, 0x00, 0x8C, 0x00, 0x96, 0x00, 0x8E, 0x00, 0x86, 0x00
.byte 0x8A, 0x00, 0x90, 0x00, 0x94, 0x00, 0x94, 0x00, 0x9A, 0x00, 0x9C, 0x00, 0x9E, 0x00, 0xA0, 0x00

View File

@ -9847,7 +9847,7 @@ _0226ADDC:
mov r0, #0
pop {r3, pc}
thumb_func_end ov12_0226ADC4
.rodata
ov12_0226E1F8:
.byte 0x04, 0x00, 0x00, 0x00
@ -10066,7 +10066,7 @@ ov12_0226E580: ; 0x0226E580
.byte 0x03, 0x01, 0x1B, 0x01, 0x04, 0x01, 0x1C, 0x01, 0x05, 0x01, 0x1D, 0x01, 0x06, 0x01, 0x1E, 0x01
.byte 0x07, 0x01, 0x1F, 0x01, 0x20, 0x01, 0x21, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
.byte 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
ov12_0226E5DC: ; 0x0226E5DC
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0C, 0x00

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov12_0226ADE0
ov12_0226ADE0: ; 0x0226ADE0
push {r3, r4, r5, r6, r7, lr}
@ -1489,7 +1489,7 @@ _0226B8F8:
_0226B8FA:
bx lr
thumb_func_end ov12_0226B8C4
.rodata
ov12_0226EB18: ; 0x0226EB18
.byte 0x0E, 0x00, 0x32, 0x00, 0x32, 0x00, 0x00, 0x00

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov12_0226B8FC
ov12_0226B8FC: ; 0x0226B8FC
push {r3, r4, r5, r6, r7, lr}

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov12_0226BBC4
ov12_0226BBC4: ; 0x0226BBC4
push {r3, r4, r5, r6, r7, lr}

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov12_0226BEC4
ov12_0226BEC4: ; 0x0226BEC4
push {r3, r4, r5, lr}

View File

@ -5632,7 +5632,7 @@ ov12_02248654: ; 0x02248654
strh r2, [r1, r0]
bx lr
thumb_func_end ov12_02248654
.rodata
ov12_0226C2EC: ; 0x0226C2EC
@ -5647,9 +5647,9 @@ sTrumpCardPowerTable: ; 0x0226C2F0
sProtectSuccessChance: ; 0x0226C2F8
.byte 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x3F, 0xFF, 0x1F
.public sFlailDamageTable
sFlailDamageTable: ; 0x0226C300
.byte 0x01
.byte 0xC8, 0x05, 0x96, 0x0C, 0x64, 0x15, 0x50, 0x2A, 0x28, 0x40, 0x14
@ -5659,7 +5659,7 @@ sFlailDamageTable: ; 0x0226C300
sPickupTable2: ; 0x0226C30C
.short ITEM_HYPER_POTION, ITEM_NUGGET
.short ITEM_KINGS_ROCK,ITEM_FULL_RESTORE, ITEM_ETHER, ITEM_IRON_BALL, ITEM_TM56, ITEM_ELIXIR, ITEM_TM86, ITEM_LEFTOVERS
.short ITEM_TM26
.short ITEM_TM26
.byte 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00
.byte 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00
@ -5734,9 +5734,9 @@ sSecretPowerEffectTable: ; 0x0226C490
.byte 0x08, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x80, 0x16, 0x00, 0x00, 0x80
.byte 0x04, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x80, 0x18, 0x00, 0x00, 0x80, 0x1C, 0x00, 0x00, 0x80
.byte 0x05, 0x00, 0x00, 0x80
.public sPrizeMoneyTbl
sPrizeMoneyTbl: ; 0x0226C4C4
.byte 0x00, 0x00
.byte 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00
@ -5774,7 +5774,7 @@ sPrizeMoneyTbl: ; 0x0226C4C4
.byte 0x80, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x08, 0x00
.public sBattleScriptCommandTable;
sBattleScriptCommandTable: ; 0x0226C6C8
.word BtlCmd_PlayEncounterAnimation
.word BtlCmd_PokemonEncounter
@ -6007,7 +6007,7 @@ sBattleScriptCommandTable: ; 0x0226C6C8
sPickupWeightTable: ; 0x0226CA4C
.byte 0x1E, 0x28, 0x32, 0x3C
.byte 0x46, 0x50, 0x5A, 0x5E, 0x62, 0x00, 0x00, 0x00
.public sHoneyGatherChanceTable
sHoneyGatherChanceTable: ; 0x0226CA58

View File

@ -5,7 +5,7 @@
.include "global.inc"
.text
thumb_func_start ov12_02258800
ov12_02258800: ; 0x02258800
push {r4, r5, r6, r7, lr}
@ -19169,7 +19169,7 @@ _02261FA6:
thumb_func_end ov12_02261F38
.rodata
ov12_0226D010: ; 0x0226D010
.word ov12_02258EB0
.word ov12_02258EB4

View File

@ -5,7 +5,7 @@
.include "global.inc"
.text
thumb_func_start ov12_02248660
ov12_02248660: ; 0x02248660
push {r3, r4, r5, lr}
@ -10278,7 +10278,7 @@ ov12_0224D53C: ; 0x0224D53C
bx lr
.balign 4, 0
thumb_func_end ov12_0224D53C
thumb_func_start ov12_0224D540
ov12_0224D540: ; 0x0224D540
push {r4, r5, r6, r7, lr}
@ -12322,7 +12322,7 @@ _0224E4F8: .word 0x000021AC
thumb_func_end ov12_0224E414
.rodata
ov12_0226CA74: ; 0x0226CA74
.byte 0x21

View File

@ -664,7 +664,7 @@ ov25_02259D9C: ; 0x02259D9C
.word (0 << 0) | (0 << 5) | (0 << 10) | (0 << 15) | (0 << 20) | (0 << 25)
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x02, 0x00, 0x00, 0x00, 0x00
.short 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF
.short SPECIES_NONE

View File

@ -1251,9 +1251,9 @@ ov80_0222A840: ; 0x0222A840
bl sub_02039F68
pop {r3, pc}
thumb_func_end ov80_0222A840
.rodata
_0223B620: ; 0x0223B620
.byte 0xD5, 0x00, 0x9D, 0x00, 0xEA, 0x00, 0xD9, 0x00

View File

@ -354,9 +354,9 @@ ov80_0222AEF4: ; 0x0222AEF4
bx lr
.balign 4, 0
thumb_func_end ov80_0222AEF4
.rodata
ov80_0223B724: ; 0x0223B724
.byte 0x00, 0x00, 0x00, 0x00

View File

@ -1613,7 +1613,7 @@ _0222BA6E:
pop {r3, r4, r5, pc}
.balign 4, 0
thumb_func_end ov80_0222BA5C
thumb_func_start ov80_0222BA7C
ov80_0222BA7C: ; 0x0222BA7C
push {r4, lr}

View File

@ -7438,7 +7438,7 @@ ov80_0222F5EC: ; 0x0222F5EC
bx lr
.balign 4, 0
thumb_func_end ov80_0222F5EC
.rodata
ov80_0223B9CC: ; 0x0223B9CC

View File

@ -1392,6 +1392,6 @@ _02231BF4: .word 0x3FE00000
thumb_func_end ov80_02231A14
.bss
ov80_0223DD44: ; 0x0223DD44
.space 0x4

View File

@ -2173,9 +2173,9 @@ _0223367A:
_02233680: .word ov80_0223BE54
_02233684: .word ov80_0223BE60
thumb_func_end ov80_02233648
.bss
ov80_0223DD48: ; 0x0223DD48
.space 0x4

View File

@ -2479,7 +2479,7 @@ ov80_02235364: ; 0x02235364
thumb_func_end ov80_02235364
.data
ov80_0223DCA0: ; 0x0223DCA0
.word ov80_0223BEA8
.word ov80_0223BF32
@ -2523,6 +2523,6 @@ ov80_0223DCB8: ; 0x0223DCB8
.word ov80_02235318
.bss
ov80_0223DD4C: ; 0x0223DD4C
.space 0x4

View File

@ -605,12 +605,12 @@ ov80_0223641C: ; 0x0223641C
thumb_func_end ov80_0223641C
.rodata
ov80_0223D4C0: ; 0x0223D4C0
.byte 0x00, 0x0A, 0x0B, 0x0D, 0x0C, 0x0F, 0x01, 0x03, 0x04, 0x02, 0x0E, 0x06, 0x05, 0x07, 0x10, 0x11
.byte 0x08, 0xFE, 0xFE, 0x09
.bss
ov80_0223DD50: ; 0x0223DD50
.space 0x10

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov80_02236450
ov80_02236450: ; 0x02236450
push {r3, r4, r5, r6, r7, lr}

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov80_02236B78
ov80_02236B78: ; 0x02236B78
push {r3, r4, r5, lr}
@ -1000,6 +1000,6 @@ _022372D4: .word 0x0000057E
thumb_func_end ov80_022372B4
.data
ov80_0223DD38: ; 0x0223DD38
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

View File

@ -782,7 +782,7 @@ _02238030: .word 0x0000270F
thumb_func_end ov80_02237FA4
.rodata
ov80_0223D4D4: ; 0x0223D4D4
.byte 0x00, 0x00

View File

@ -644,7 +644,7 @@ _022384D4:
thumb_func_end ov80_022384BC
.rodata
ov80_0223D514: ; 0x0223D514
.byte 0x00, 0x00

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov80_02238648
ov80_02238648: ; 0x02238648
push {r3, r4, r5, r6, r7, lr}
@ -2315,7 +2315,7 @@ _0223995C:
thumb_func_end ov80_02239938
.rodata
ov80_0223D554: ; 0x0223D554
.byte 0x00, 0x03, 0x00, 0x05, 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00

View File

@ -134,7 +134,7 @@ _02239BEC: .word sub_0200D9DC
thumb_func_end ov80_02239BE8
.rodata
ov80_0223DA54: ; 0x0223DA54
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00

View File

@ -225,7 +225,7 @@ _02239D6A:
thumb_func_end ov80_02239C80
.rodata
ov80_0223DB24: ; 0x0223DB24
.byte 0x00, 0x00, 0x00, 0x00
.word ov80_02239C80

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov80_02239D74
ov80_02239D74: ; 0x02239D74
push {r3, r4, r5, r6, lr}
@ -326,6 +326,6 @@ _0223A006:
thumb_func_end ov80_02239FA8
.rodata
ov80_0223DB2C: ; 0x0223DB2C
.byte 0x14, 0x00, 0x15, 0x00

View File

@ -1555,7 +1555,7 @@ _0223AC20:
thumb_func_end ov80_0223AB94
.rodata
ov80_0223DB30: ; 0x0223DB30
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00, 0xDA, 0x07, 0x00, 0x00, 0xD2, 0x07, 0x00, 0x00, 0xD2, 0x07, 0x00, 0x00

View File

@ -3,7 +3,7 @@
.include "global.inc"
.text
thumb_func_start ov80_0223AC24
ov80_0223AC24: ; 0x0223AC24
push {r3, r4, r5, r6, r7, lr}
@ -1373,7 +1373,7 @@ _0223B616:
thumb_func_end ov80_0223B60C
.rodata
ov80_0223DBE0: ; 0x0223DBE0
.byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00

View File

@ -29,10 +29,10 @@
{ "baseSpecies": "SPECIES_ZUBAT", "evos": [ { "method": "EVO_LEVEL", "param": 22, "target": "SPECIES_GOLBAT" } ] },
{ "baseSpecies": "SPECIES_GOLBAT", "evos": [ { "method": "EVO_FRIENDSHIP", "param": 0, "target": "SPECIES_CROBAT" } ] },
{ "baseSpecies": "SPECIES_ODDISH", "evos": [ { "method": "EVO_LEVEL", "param": 21, "target": "SPECIES_GLOOM" } ] },
{ "baseSpecies": "SPECIES_GLOOM", "evos":
{ "baseSpecies": "SPECIES_GLOOM", "evos":
[
{ "method": "EVO_STONE", "param": "ITEM_LEAF_STONE", "target": "SPECIES_VILEPLUME" },
{ "method": "EVO_STONE", "param": "ITEM_SUN_STONE", "target": "SPECIES_BELLOSSOM" }
{ "method": "EVO_STONE", "param": "ITEM_LEAF_STONE", "target": "SPECIES_VILEPLUME" },
{ "method": "EVO_STONE", "param": "ITEM_SUN_STONE", "target": "SPECIES_BELLOSSOM" }
]
},
{ "baseSpecies": "SPECIES_PARAS", "evos": [ { "method": "EVO_LEVEL", "param": 24, "target": "SPECIES_PARASECT" } ] },
@ -43,10 +43,10 @@
{ "baseSpecies": "SPECIES_MANKEY", "evos": [ { "method": "EVO_LEVEL", "param": 28, "target": "SPECIES_PRIMEAPE" } ] },
{ "baseSpecies": "SPECIES_GROWLITHE", "evos": [ { "method": "EVO_STONE", "param": "ITEM_FIRE_STONE", "target": "SPECIES_ARCANINE" } ] },
{ "baseSpecies": "SPECIES_POLIWAG", "evos": [ { "method": "EVO_LEVEL", "param": 25, "target": "SPECIES_POLIWHIRL" } ] },
{ "baseSpecies": "SPECIES_POLIWHIRL", "evos":
{ "baseSpecies": "SPECIES_POLIWHIRL", "evos":
[
{ "method": "EVO_STONE", "param": "ITEM_WATER_STONE", "target": "SPECIES_POLIWRATH" },
{ "method": "EVO_TRADE_ITEM", "param": "ITEM_KINGS_ROCK", "target": "SPECIES_POLITOED" }
{ "method": "EVO_STONE", "param": "ITEM_WATER_STONE", "target": "SPECIES_POLIWRATH" },
{ "method": "EVO_TRADE_ITEM", "param": "ITEM_KINGS_ROCK", "target": "SPECIES_POLITOED" }
]
},
{ "baseSpecies": "SPECIES_ABRA", "evos": [ { "method": "EVO_LEVEL", "param": 16, "target": "SPECIES_KADABRA" } ] },
@ -60,7 +60,7 @@
{ "baseSpecies": "SPECIES_GEODUDE", "evos": [ { "method": "EVO_LEVEL", "param": 25, "target": "SPECIES_GRAVELER" } ] },
{ "baseSpecies": "SPECIES_GRAVELER", "evos": [ { "method": "EVO_TRADE", "param": 0, "target": "SPECIES_GOLEM" } ] },
{ "baseSpecies": "SPECIES_PONYTA", "evos": [ { "method": "EVO_LEVEL", "param": 40, "target": "SPECIES_RAPIDASH" } ] },
{ "baseSpecies": "SPECIES_SLOWPOKE", "evos":
{ "baseSpecies": "SPECIES_SLOWPOKE", "evos":
[
{ "method": "EVO_LEVEL", "param": 37, "target": "SPECIES_SLOWBRO" },
{ "method": "EVO_TRADE_ITEM", "param": "ITEM_KINGS_ROCK", "target": "SPECIES_SLOWKING" }
@ -94,7 +94,7 @@
{ "baseSpecies": "SPECIES_ELECTABUZZ", "evos": [ { "method": "EVO_TRADE_ITEM", "param": "ITEM_ELECTIRIZER", "target": "SPECIES_ELECTIVIRE" } ] },
{ "baseSpecies": "SPECIES_MAGMAR", "evos": [ { "method": "EVO_TRADE_ITEM", "param": "ITEM_MAGMARIZER", "target": "SPECIES_MAGMORTAR" } ] },
{ "baseSpecies": "SPECIES_MAGIKARP", "evos": [ { "method": "EVO_LEVEL", "param": 20, "target": "SPECIES_GYARADOS" } ] },
{ "baseSpecies": "SPECIES_EEVEE", "evos":
{ "baseSpecies": "SPECIES_EEVEE", "evos":
[
{ "method": "EVO_ETERNA", "param": 0, "target": "SPECIES_LEAFEON" },
{ "method": "EVO_ROUTE217", "param": 0, "target": "SPECIES_GLACEON" },
@ -153,12 +153,12 @@
{ "baseSpecies": "SPECIES_HOUNDOUR", "evos": [ { "method": "EVO_LEVEL", "param": 24, "target": "SPECIES_HOUNDOOM" } ] },
{ "baseSpecies": "SPECIES_PHANPY", "evos": [ { "method": "EVO_LEVEL", "param": 25, "target": "SPECIES_DONPHAN" } ] },
{ "baseSpecies": "SPECIES_PORYGON2", "evos": [ { "method": "EVO_TRADE_ITEM", "param": "ITEM_DUBIOUS_DISC", "target": "SPECIES_PORYGON_Z" } ] },
{ "baseSpecies": "SPECIES_TYROGUE", "evos":
[
{ "baseSpecies": "SPECIES_TYROGUE", "evos":
[
{ "method": "EVO_LEVEL_ATK_LT_DEF", "param": "20", "target": "SPECIES_HITMONCHAN" },
{ "method": "EVO_LEVEL_ATK_GT_DEF", "param": "20", "target": "SPECIES_HITMONLEE" },
{ "method": "EVO_LEVEL_ATK_EQ_DEF", "param": "20", "target": "SPECIES_HITMONTOP" }
]
]
},
{ "baseSpecies": "SPECIES_SMOOCHUM", "evos": [ { "method": "EVO_LEVEL", "param": 30, "target": "SPECIES_JYNX" } ] },
{ "baseSpecies": "SPECIES_ELEKID", "evos": [ { "method": "EVO_LEVEL", "param": 30, "target": "SPECIES_ELECTABUZZ" } ] },
@ -177,11 +177,11 @@
{ "baseSpecies": "SPECIES_POOCHYENA", "evos": [ { "method": "EVO_LEVEL", "param": 18, "target": "SPECIES_MIGHTYENA" } ] },
{ "baseSpecies": "SPECIES_ZIGZAGOON", "evos": [ { "method": "EVO_LEVEL", "param": 20, "target": "SPECIES_LINOONE" } ] },
{ "baseSpecies": "SPECIES_WURMPLE", "evos":
[
{ "baseSpecies": "SPECIES_WURMPLE", "evos":
[
{ "method": "EVO_LEVEL_PID_LO", "param": 7, "target": "SPECIES_SILCOON" },
{ "method": "EVO_LEVEL_PID_HI", "param": 7, "target": "SPECIES_CASCOON" }
]
]
},
{ "baseSpecies": "SPECIES_SILCOON", "evos": [ { "method": "EVO_LEVEL", "param": 10, "target": "SPECIES_BEAUTIFLY" } ] },
{ "baseSpecies": "SPECIES_CASCOON", "evos": [ { "method": "EVO_LEVEL", "param": 10, "target": "SPECIES_DUSTOX" } ] },
@ -189,11 +189,11 @@
{ "baseSpecies": "SPECIES_LOMBRE", "evos": [ { "method": "EVO_STONE", "param": "ITEM_WATER_STONE", "target": "SPECIES_LUDICOLO" } ] },
{ "baseSpecies": "SPECIES_SEEDOT", "evos": [ { "method": "EVO_LEVEL", "param": 14, "target": "SPECIES_NUZLEAF" } ] },
{ "baseSpecies": "SPECIES_NUZLEAF", "evos": [ { "method": "EVO_STONE", "param": "ITEM_LEAF_STONE", "target": "SPECIES_SHIFTRY" } ] },
{ "baseSpecies": "SPECIES_NINCADA", "evos":
[
{ "baseSpecies": "SPECIES_NINCADA", "evos":
[
{ "method": "EVO_LEVEL_NINJASK", "param": 20, "target": "SPECIES_NINJASK" },
{ "method": "EVO_LEVEL_SHEDINJA", "param": 20, "target": "SPECIES_SHEDINJA" }
]
]
},
{ "baseSpecies": "SPECIES_TAILLOW", "evos": [ { "method": "EVO_LEVEL", "param": 22, "target": "SPECIES_SWELLOW" } ] },
{ "baseSpecies": "SPECIES_SHROOMISH", "evos": [ { "method": "EVO_LEVEL", "param": 23, "target": "SPECIES_BRELOOM" } ] },
@ -215,7 +215,7 @@
{ "baseSpecies": "SPECIES_SPHEAL", "evos": [ { "method": "EVO_LEVEL", "param": 32, "target": "SPECIES_SEALEO" } ] },
{ "baseSpecies": "SPECIES_SEALEO", "evos": [ { "method": "EVO_LEVEL", "param": 44, "target": "SPECIES_WALREIN" } ] },
{ "baseSpecies": "SPECIES_CACNEA", "evos": [ { "method": "EVO_LEVEL", "param": 32, "target": "SPECIES_CACTURNE" } ] },
{ "baseSpecies": "SPECIES_SNORUNT", "evos":
{ "baseSpecies": "SPECIES_SNORUNT", "evos":
[
{ "method": "EVO_LEVEL", "param": 42, "target": "SPECIES_GLALIE" },
{ "method": "EVO_STONE_FEMALE", "param": "ITEM_DAWN_STONE", "target": "SPECIES_FROSLASS" }
@ -234,8 +234,8 @@
{ "baseSpecies": "SPECIES_GULPIN", "evos": [ { "method": "EVO_LEVEL", "param": 26, "target": "SPECIES_SWALOT" } ] },
{ "baseSpecies": "SPECIES_WHISMUR", "evos": [ { "method": "EVO_LEVEL", "param": 20, "target": "SPECIES_LOUDRED" } ] },
{ "baseSpecies": "SPECIES_LOUDRED", "evos": [ { "method": "EVO_LEVEL", "param": 40, "target": "SPECIES_EXPLOUD" } ] },
{ "baseSpecies": "SPECIES_CLAMPERL", "evos":
[
{ "baseSpecies": "SPECIES_CLAMPERL", "evos":
[
{ "method": "EVO_TRADE_ITEM", "param": "ITEM_DEEPSEATOOTH", "target": "SPECIES_HUNTAIL" },
{ "method": "EVO_TRADE_ITEM", "param": "ITEM_DEEPSEASCALE", "target": "SPECIES_GOREBYSS" }
]
@ -246,8 +246,8 @@
{ "baseSpecies": "SPECIES_LILEEP", "evos": [ { "method": "EVO_LEVEL", "param": 40, "target": "SPECIES_CRADILY" } ] },
{ "baseSpecies": "SPECIES_ANORITH", "evos": [ { "method": "EVO_LEVEL", "param": 40, "target": "SPECIES_ARMALDO" } ] },
{ "baseSpecies": "SPECIES_RALTS", "evos": [ { "method": "EVO_LEVEL", "param": 20, "target": "SPECIES_KIRLIA" } ] },
{ "baseSpecies": "SPECIES_KIRLIA", "evos":
[
{ "baseSpecies": "SPECIES_KIRLIA", "evos":
[
{ "method": "EVO_LEVEL", "param": 30, "target": "SPECIES_GARDEVOIR" },
{ "method": "EVO_STONE_MALE", "param": "ITEM_DAWN_STONE", "target": "SPECIES_GALLADE" }
]
@ -274,7 +274,7 @@
{ "baseSpecies": "SPECIES_BUDEW", "evos": [ { "method": "EVO_FRIENDSHIP_DAY", "param": 0, "target": "SPECIES_ROSELIA" } ] },
{ "baseSpecies": "SPECIES_CRANIDOS", "evos": [ { "method": "EVO_LEVEL", "param": 30, "target": "SPECIES_RAMPARDOS" } ] },
{ "baseSpecies": "SPECIES_SHIELDON", "evos": [ { "method": "EVO_LEVEL", "param": 30, "target": "SPECIES_BASTIODON" } ] },
{ "baseSpecies": "SPECIES_BURMY", "evos":
{ "baseSpecies": "SPECIES_BURMY", "evos":
[
{ "method": "EVO_LEVEL_FEMALE", "param": 20, "target": "SPECIES_WORMADAM" },
{ "method": "EVO_LEVEL_MALE", "param": 20, "target": "SPECIES_MOTHIM" }

View File

@ -124,33 +124,33 @@ typedef struct UnkBtlCtxSub_76 {
} UnkBtlCtxSub_76;
typedef struct UnkBattlemonSub {
u32 disabledTurns:3,
encoredTurns:3,
unk0_6:2,
u32 disabledTurns:3,
encoredTurns:3,
unk0_6:2,
unk0_8:3,
protectSuccessTurns:2,
perishSongTurns:2,
rolloutCount:3,
protectSuccessTurns:2,
perishSongTurns:2,
rolloutCount:3,
furyCutterCount:3,
unk0_15:3,
unk0_18:3,
unk0_1A:3,
trauntFlag:1,
unk0_15:3,
unk0_18:3,
unk0_1A:3,
trauntFlag:1,
unk0_1E:1;
u32 battlerIdLockOn:2,
mimicedMoveIndex:4,
battlerIdBinding:2,
u32 battlerIdLockOn:2,
mimicedMoveIndex:4,
battlerIdBinding:2,
unk4_8:2,
lastResortCount:3,
unk4_D:3,
unk4_10:3,
lastResortCount:3,
unk4_D:3,
unk4_10:3,
unk4_13:3,
unk4_16:1,
unk4_17:4,
unk4_2B:1,
unk4_16:1,
unk4_17:4,
unk4_2B:1,
unk4_2C:1,
unk4_2D:1,
meFirstFlag:1,
unk4_2D:1,
meFirstFlag:1,
unk4_2F:1;
int unk;
int unk8;
@ -176,33 +176,33 @@ typedef struct BATTLEMON {
u16 unk8;
u16 unkA;
u16 moves[4];
u32 hpIV:5,
atkIV:5,
defIV:5,
spdIV:5,
spatkIV:5,
spdefIV:5,
isEgg:1,
u32 hpIV:5,
atkIV:5,
defIV:5,
spdIV:5,
spatkIV:5,
spdefIV:5,
isEgg:1,
isNicknamed:1;
s8 statChanges[8];
int weight;
u8 type1;
u8 type2;
u8 forme:5,
unk26_5:1,
u8 forme:5,
unk26_5:1,
unk26_6:2;
u8 ability;
u32 unk28_0:1,
intimidateFlag:1,
traceFlag:1,
downloadFlag:1,
anticipationFlag:1,
forewarnFlag:1,
slowStartFlag:1,
u32 unk28_0:1,
intimidateFlag:1,
traceFlag:1,
downloadFlag:1,
anticipationFlag:1,
forewarnFlag:1,
slowStartFlag:1,
slowStartEnded:1,
friskFlag:1,
moldBreakerFlag:1,
pressureFlag:1,
friskFlag:1,
moldBreakerFlag:1,
pressureFlag:1,
unk28_B:21;
u8 movePPCur[4];
u8 movePP[4];
@ -224,7 +224,7 @@ typedef struct BATTLEMON {
u16 item;
u16 unk76;
u16 unk78;
u8 gender:4,
u8 gender:4,
unk7A_4:4;
u8 unk7B;
u32 moveEffectFlags;
@ -493,7 +493,7 @@ struct BattleSystem {
u32 unk20;
u32 unk24;
u32 unk28;
u32 battleTypeFlags;
u32 battleTypeFlags;
BATTLECONTEXT *ctx;
OpponentData *opponentData[4];
int unk44; //offset labels wrong from here until unk23E8
@ -535,7 +535,7 @@ struct BattleSystem {
u8 unk1238[0x1000];
u16 unk2238[0x70];
u16 unk2318[0x70];
u16 unk23E8; //labeling may be wrong before here
u16 unk23E8; //labeling may be wrong before here
u16 unk23EA;
u16 unk23EC;
u16 unk23EE;
@ -550,7 +550,7 @@ struct BattleSystem {
int unk2400;
int unk2404;
int unk2408;
u32 unk240C;
u32 unk240C;
int unk2410;
int safariBallCnt;
u8 unk2418[4];

View File

@ -37,7 +37,7 @@ typedef struct GAME_BOARD_ARGS {
PARTY *playerParty;
PARTY *opponentParty;
u16 returnWork;
void *work;
void *work;
u16 unk;
u8 randomFlag;
u8 dummy1;
@ -73,7 +73,7 @@ typedef struct GAME_BOARD_WORK {
u8 substate;
u8 type;
u8 unkA;
u8 wait;
u8 wait;
u8 randomFlag;
u8 cursorPos;
u8 unkE;

View File

@ -50,15 +50,15 @@ enum Terrain {
#define BATTLE_TYPE_6 (1 << 6)
#define BATTLE_TYPE_7 (1 << 7)
#define BATTLE_TYPE_9 (1 << 9)
#define BATTLE_TYPE_DEMO (1 << 10)
#define BATTLE_TYPE_DEMO (1 << 10)
//Move Effects
#define MOVE_EFFECT_0 (1 << 0)
#define MOVE_EFFECT_1 (1 << 1)
#define MOVE_EFFECT_LEECH_SEED (1 << 2)
#define MOVE_EFFECT_3 (1 << 3)
#define MOVE_EFFECT_0 (1 << 0)
#define MOVE_EFFECT_1 (1 << 1)
#define MOVE_EFFECT_LEECH_SEED (1 << 2)
#define MOVE_EFFECT_3 (1 << 3)
#define MOVE_EFFECT_4 (1 << 4)
#define MOVE_EFFECT_PERISH_SONG (1 << 5)
#define MOVE_EFFECT_PERISH_SONG (1 << 5)
#define MOVE_EFFECT_YAWN (1 << 12)
#define MOVE_EFFECT_IMPRISON_USER (1 << 13)
#define MOVE_EFFECT_14 (1 << 14)

View File

@ -27,7 +27,7 @@
#define PLAYER_STATE_SURFING 2
#define PLAYER_STATE_ROCKET 3
#define PLAYER_STATE_UNK_SP 4
#define PLAYER_STATE_UNK_WATER 5
#define PLAYER_STATE_UNK_WATER 5
#define PLAYER_STATE_POKEATHLON 6
#define PLAYER_STATE_FISHING 7
#define PLAYER_STATE_UNK_POKE 8

View File

@ -2,7 +2,7 @@
#define POKEHEARTGOLD_MAP_OBJECT_MANAGER_H
typedef struct MapObjectMan MapObjectMan;
typedef struct FieldSystem FieldSystem;
typedef struct FieldSystem FieldSystem;
FieldSystem *MapObjectMan_GetFieldSysPtr(MapObjectMan *mapObjectMan);

View File

@ -9,4 +9,4 @@ BOOL ov01_021E6E00(Unk_0203E15C *a0, FieldSystem *fsys);
BOOL ov01_021E6EFC(Unk_0203E15C *a0, FieldSystem *fsys);
BOOL ov01_021E6FD4(Unk_0203E15C *a0, FieldSystem *fsys);
#endif
#endif

View File

@ -3,4 +3,4 @@
void ov01_021EFACC(u32 a0);
#endif
#endif

View File

@ -5,4 +5,4 @@
void ov01_021F3DFC(FieldSystem *fsys, int a1);
#endif
#endif

View File

@ -5,4 +5,4 @@
void ov01_021F6830(FieldSystem *fsys, int a1, int a2);
#endif
#endif

View File

@ -14,90 +14,90 @@ u32 ov06_0221BB14(u32 szByte, BOOL is4x4comp);
u32 ov06_0221BB30(u32 szByte, BOOL is4pltt);
static const u16 ov06_0221BD8C[] = {
0x75CD, 0x7FFF, 0x3ADF, 0x2A9F, 0x1A5F, 0x019C, 0x0159, 0x0514,
0x00CF, 0x473F, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D,
0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D,
0x75CD, 0x7FFF, 0x3ADF, 0x2A9F, 0x1A5F, 0x019C, 0x0159, 0x0514,
0x00CF, 0x473F, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D,
0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D, 0x002D,
};
static const u16 ov06_0221BD6C[] = {
0x75CD, 0x7FFF, 0x7EAF, 0x7E4A, 0x7DE6, 0x7140, 0x5D01, 0x48E2,
0x34C3, 0x7EF3, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x7EAF, 0x7E4A, 0x7DE6, 0x7140, 0x5D01, 0x48E2,
0x34C3, 0x7EF3, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BD4C[] = {
0x75CD, 0x7FFF, 0x7E1A, 0x7D7A, 0x7CDA, 0x7016, 0x6032, 0x4C4F,
0x3C8B, 0x7E7C, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x7E1A, 0x7D7A, 0x7CDA, 0x7016, 0x6032, 0x4C4F,
0x3C8B, 0x7E7C, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BD2C[] = {
0x75CD, 0x7FFF, 0x32DE, 0x229C, 0x123A, 0x01D8, 0x0195, 0x0131,
0x04ED, 0x3F1F, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x32DE, 0x229C, 0x123A, 0x01D8, 0x0195, 0x0131,
0x04ED, 0x3F1F, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BD0C[] = {
0x75CD, 0x7FFF, 0x4276, 0x3635, 0x2E14, 0x1990, 0x154F, 0x150C,
0x10CA, 0x4ABA, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x4276, 0x3635, 0x2E14, 0x1990, 0x154F, 0x150C,
0x10CA, 0x4ABA, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BCEC[] = {
0x75CD, 0x7FFF, 0x373A, 0x26F9, 0x12B8, 0x0256, 0x01F2, 0x01AF,
0x054B, 0x3F7C, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x373A, 0x26F9, 0x12B8, 0x0256, 0x01F2, 0x01AF,
0x054B, 0x3F7C, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BCCC[] = {
0x75CD, 0x7FFF, 0x50D9, 0x48D5, 0x3CD2, 0x30EE, 0x30CD, 0x24AB,
0x20A9, 0x597A, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x50D9, 0x48D5, 0x3CD2, 0x30EE, 0x30CD, 0x24AB,
0x20A9, 0x597A, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BCAC[] = {
0x75CD, 0x7FFF, 0x6B9C, 0x6339, 0x5AD6, 0x4E52, 0x4210, 0x31AD,
0x256B, 0x6FBD, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x6B9C, 0x6339, 0x5AD6, 0x4E52, 0x4210, 0x31AD,
0x256B, 0x6FBD, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BC8C[] = {
0x75CD, 0x7FFF, 0x5A7A, 0x4E17, 0x45B5, 0x3D72, 0x3130, 0x28ED,
0x20CB, 0x66FB, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x5A7A, 0x4E17, 0x45B5, 0x3D72, 0x3130, 0x28ED,
0x20CB, 0x66FB, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BC6C[] = {
0x75CD, 0x7FFF, 0x3A3F, 0x299E, 0x18FD, 0x087C, 0x0C78, 0x1493,
0x1CAE, 0x469F, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x3A3F, 0x299E, 0x18FD, 0x087C, 0x0C78, 0x1493,
0x1CAE, 0x469F, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BB4C[] = {
0x75CD, 0x7FFF, 0x6AD7, 0x6675, 0x6233, 0x518F, 0x456D, 0x394C,
0x2D2A, 0x7319, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x6AD7, 0x6675, 0x6233, 0x518F, 0x456D, 0x394C,
0x2D2A, 0x7319, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BC2C[] = {
0x75CD, 0x7FFF, 0x23AF, 0x1B6C, 0x0F09, 0x02C6, 0x0666, 0x09E6,
0x0D86, 0x3BD5, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x23AF, 0x1B6C, 0x0F09, 0x02C6, 0x0666, 0x09E6,
0x0D86, 0x3BD5, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BC0C[] = {
0x75CD, 0x7FFF, 0x37BF, 0x2B9F, 0x1B3C, 0x02FA, 0x0297, 0x0214,
0x05B0, 0x4FDF, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x37BF, 0x2B9F, 0x1B3C, 0x02FA, 0x0297, 0x0214,
0x05B0, 0x4FDF, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BBEC[] = {
0x75CD, 0x7FFF, 0x7DFF, 0x719F, 0x613E, 0x50FD, 0x48B9, 0x4474,
0x3C4F, 0x7EDF, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x7DFF, 0x719F, 0x613E, 0x50FD, 0x48B9, 0x4474,
0x3C4F, 0x7EDF, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BBCC[] = {
0x75CD, 0x7FFF, 0x7F94, 0x7B51, 0x770D, 0x72AA, 0x6229, 0x4DA9,
0x4588, 0x7FF7, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x7F94, 0x7B51, 0x770D, 0x72AA, 0x6229, 0x4DA9,
0x4588, 0x7FF7, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BC4C[] = {
0x75CD, 0x7FFF, 0x7792, 0x730C, 0x6A86, 0x6200, 0x51A0, 0x3D20,
0x28C1, 0x77B6, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x7792, 0x730C, 0x6A86, 0x6200, 0x51A0, 0x3D20,
0x28C1, 0x77B6, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BB8C[] = {
0x75CD, 0x7FFF, 0x3DD5, 0x35B2, 0x316F, 0x294C, 0x210B, 0x1CCB,
0x18AA, 0x4617, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x3DD5, 0x35B2, 0x316F, 0x294C, 0x210B, 0x1CCB,
0x18AA, 0x4617, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 ov06_0221BB6C[] = {
0x3F05, 0x7FFF, 0x7FBD, 0x777B, 0x6F39, 0x62D6, 0x5A73, 0x4E11,
0x41AE, 0x779C, 0x2108, 0x7C2B, 0x318C, 0x4631, 0x5AD6, 0x0000,
0x3F05, 0x7FFF, 0x7FBD, 0x777B, 0x6F39, 0x62D6, 0x5A73, 0x4E11,
0x41AE, 0x779C, 0x2108, 0x7C2B, 0x318C, 0x4631, 0x5AD6, 0x0000,
};
static const u16 ov06_0221BBAC[] = {
0x75CD, 0x7FFF, 0x6DF2, 0x6DAF, 0x696D, 0x652A, 0x5CE8, 0x50A7,
0x4486, 0x7652, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
0x75CD, 0x7FFF, 0x6DF2, 0x6DAF, 0x696D, 0x652A, 0x5CE8, 0x50A7,
0x4486, 0x7652, 0x18C6, 0x0000, 0x318C, 0x52F9, 0x637C, 0x0000,
};
static const u16 *const ov06_0221BDD0[] = {
ov06_0221BB4C, ov06_0221BD8C, ov06_0221BD6C, ov06_0221BD4C,
ov06_0221BD2C, ov06_0221BD0C, ov06_0221BCEC, ov06_0221BCCC,
ov06_0221BCAC, ov06_0221BC8C, ov06_0221BC6C, ov06_0221BC4C,
ov06_0221BC2C, ov06_0221BC0C, ov06_0221BBEC, ov06_0221BBCC,
ov06_0221BBAC, ov06_0221BB8C,
static const u16 *const ov06_0221BDD0[] = {
ov06_0221BB4C, ov06_0221BD8C, ov06_0221BD6C, ov06_0221BD4C,
ov06_0221BD2C, ov06_0221BD0C, ov06_0221BCEC, ov06_0221BCCC,
ov06_0221BCAC, ov06_0221BC8C, ov06_0221BC6C, ov06_0221BC4C,
ov06_0221BC2C, ov06_0221BC0C, ov06_0221BBEC, ov06_0221BBCC,
ov06_0221BBAC, ov06_0221BB8C,
};
#endif //POKEHEARTGOLD_OVERLAY_06_H

View File

@ -33,7 +33,7 @@ typedef struct PartyMenuStruct {
UnkStruct_Overlay_94_B* unk654; //0x654
u8 unk658[0x167];
MSGDATA* msgData; //0x7c0
MSGFMT* unk7c4;
MSGFMT* unk7c4;
STRING* unk7c8;
u8 unk7cc[0x498];
u8 unkc64;

View File

@ -2,7 +2,7 @@
#define POKEHEARTGOLD_SAVE_FRONTIER_H
typedef struct FRONTIER_SAVE {
} FRONTIER_SAVE;
#endif

View File

@ -11,10 +11,10 @@ typedef struct {
typedef struct {
PokeathlonFriendshipRoomStatueData friendshipRoomStatues[3];
u8 unk[0x1C];
u8 unk[0x1C];
} SavePokeathlonFriendshipRecords;
u32 sub_02031AF0(void);
u32 sub_02031AF0(void);
void sub_02031AF4(SavePokeathlonFriendshipRecords* unk);
SavePokeathlonFriendshipRecords* sub_02031B00(SAVEDATA* savedata);

View File

@ -11,11 +11,11 @@ typedef struct FieldFadeEnvironment {
u16 colour;
u16 unk12;
u32 duration;
int framesPer;
int framesPer;
HeapID heapID;
} FieldFadeEnvironment;
typedef struct FieldTransitionEnvironment {
typedef struct FieldTransitionEnvironment {
u8 state;
u8 unk1;
u16 transitionState;

View File

@ -574,7 +574,7 @@ Overlay OVY_12
Object asm/overlay_12_battle_controller.o
Object asm/overlay_12_02264824.o
Object asm/overlay_12_02265E28.o
Object asm/overlay_12_02266024.o
Object asm/overlay_12_02266024.o
Object asm/overlay_12_0226ADE0.o
Object asm/overlay_12_0226B8FC.o
Object asm/overlay_12_0226BBC4.o

View File

@ -84,13 +84,13 @@ BOOL BattleArcadeGameBoard_InitOverlay(OVY_MANAGER *man, int *state) {
int i;
GAME_BOARD_WORK *work;
GAME_BOARD_ARGS *args;
HandleLoadOverlay(FS_OVERLAY_ID(OVY_80), 2);
BattleArcadeGameBoard_InitSub();
CreateHeap(3, HEAP_ID_GAME_BOARD, 0x20000);
work = OverlayManager_CreateAndGetData(man, sizeof(GAME_BOARD_WORK), HEAP_ID_GAME_BOARD);
memset(work, 0, sizeof(GAME_BOARD_WORK));
work->bgConfig = BgConfig_Alloc(HEAP_ID_GAME_BOARD);
work->man = man;
args = (GAME_BOARD_ARGS *) OverlayManager_GetArgs(man);
@ -114,42 +114,42 @@ BOOL BattleArcadeGameBoard_InitOverlay(OVY_MANAGER *man, int *state) {
work->unk24 = args->unk14;
work->unk18 = 900;
work->randomFlag = args->randomFlag;
for (i = 0; i < 32; i++) {
work->unk44[i] = 32;
}
work->boardHeight = 4;
work->boardWidth = 4;
work->boardArea = 16;
work->multiCursorPos = 0;
*work->unk24 = BattleArcade_Random(work);
work->cursorPosStart = LCRandom() % 16;
BattleArcadeGameBoard_InitObjects(work);
if (BattleArcade_MultiplayerCheck(work->type) == TRUE) {
sub_02096910(work);
}
*state = 0;
s_0223FA20[0] = 0;
s_0223FA20[1] = 0;
return TRUE;
}
BOOL BattleArcadeGameBoard_Main(OVY_MANAGER *man, int *state) {
GAME_BOARD_WORK *work = OverlayManager_GetData(man);
if (work->unkE != 0xff && *state == 1) {
ov84_0223F28C(work);
work->unk14 = ov84_0223EC88(work->boardArea, work->unkE);
BattleArcadeGameBoard_SetState(work, state, 2);
}
switch (*state) {
case 0:
if (BattleArcadeGameBoard_Init(work) == TRUE) {
@ -162,7 +162,7 @@ BOOL BattleArcadeGameBoard_Main(OVY_MANAGER *man, int *state) {
BattleArcadeGameBoard_SetState(work, state, 2);
} else if (BattleArcade_MultiplayerCheck(work->type) == TRUE) {
BattleArcadeGameBoard_SetState(work, state, 3);
} else {
} else {
BattleArcadeGameBoard_SetState(work, state, 4);
}
}
@ -183,30 +183,30 @@ BOOL BattleArcadeGameBoard_Main(OVY_MANAGER *man, int *state) {
}
break;
}
work->unk13_1++;
if (work->unk13_1 >= 4) {
work->unk13_1 = 0;
work->unk13_0 ^= 1;
}
sub_0202457C(work->unk3E8.spriteList);
return FALSE;
}
BOOL ov84_0223DFF0(OVY_MANAGER *man, int *state) {
int i;
GAME_BOARD_WORK *work = OverlayManager_GetData(man);
*work->returnWork = work->cursorPos;
GF_DestroyVramTransferManager();
BattleArcadeGameBoard_Delete(work);
OverlayManager_FreeData(man);
Main_SetVBlankIntrCB(NULL, NULL);
DestroyHeap(HEAP_ID_GAME_BOARD);
UnloadOverlayByID(FS_OVERLAY_ID(OVY_80));
@ -285,7 +285,7 @@ static BOOL BattleArcadeGameBoard_Init(GAME_BOARD_WORK *work) {
}
} else {
work->substate++;
}
}
break;
case 9:
if (IsPaletteFadeFinished() == TRUE) {
@ -484,13 +484,13 @@ static void BattleArcadeGameBoard_Delete(GAME_BOARD_WORK *work) {
if (work->button != NULL) {
BattleArcadeObj_Delete(work->button);
}
for (i = 0; i < 16; i++) {
if (work->panel[i] != NULL) {
BattleArcadeObj_Delete(work->panel[i]);
}
}
max = BattleArcade_GetMonCount(work->type, 1);
for (i = 0; i < max; i++) {
if (work->iconA[i] != NULL) {
@ -506,26 +506,26 @@ static void BattleArcadeGameBoard_Delete(GAME_BOARD_WORK *work) {
BattleArcadeObj_Delete(work->itemB[i]);
}
}
sub_0203A914();
PaletteData_FreeBuffers(work->unk3D4, 2);
PaletteData_FreeBuffers(work->unk3D4, 0);
PaletteData_Free(work->unk3D4);
work->unk3D4 = NULL;
ov84_0223F418(&work->unk3E8);
DestroyMsgData(work->msgData);
ScrStrBufs_delete(work->msgFmt);
String_dtor(work->unk70);
String_dtor(work->unk74);
for (i = 0; i < 2; i++) {
String_dtor(work->unk78[i]);
}
ov84_0223F8E4(work->window);
ov84_0223E958(work->bgConfig);
NARC_dtor(work->narc);
@ -544,33 +544,33 @@ static void BattleArcadeGameBoard_InitObjects(GAME_BOARD_WORK *work) {
u8 max;
u16 x, y, yOffset, yOffset2;
int i, var;
work->narc = NARC_ctor(183, HEAP_ID_GAME_BOARD);
ov84_0223E8DC(work);
ov84_0223E934(work);
work->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0425_bin, HEAP_ID_GAME_BOARD);
work->msgFmt = ScrStrBufs_new(HEAP_ID_GAME_BOARD);
work->unk70 = String_ctor(600, HEAP_ID_GAME_BOARD);
work->unk74 = String_ctor(600, HEAP_ID_GAME_BOARD);
for (i = 0; i < 2; i++) {
work->unk78[i] = String_ctor(32, HEAP_ID_GAME_BOARD);
}
LoadFontPal0(0, 416, HEAP_ID_GAME_BOARD);
LoadFontPal1(0, 384, HEAP_ID_GAME_BOARD);
ov84_0223F8B4(work->bgConfig, work->window);
work->cursor = BattleArcadeObject_Create(&work->unk3E8, 1, 1, 1, 35, 68, 36, 0, 2, 0);
BattleArcadeObj_SetVisible(work->cursor, 0);
for (i = 0; i < 16; i++) {
work->panel[i] = BattleArcadeObject_Create(&work->unk3E8, 1, 1, 1, 32, 68 + 40*(i%4), 36 + 40*(i/4), 1, 2, 0);
BattleArcadeObj_SetVisible(work->panel[i], 0);
}
max = BattleArcade_GetMonCount(work->type, 1);
if (BattleArcade_MultiplayerCheck(work->type) == FALSE) {
yOffset = 46;
yOffset2 = 50;
@ -578,7 +578,7 @@ static void BattleArcadeGameBoard_InitObjects(GAME_BOARD_WORK *work) {
yOffset = 22;
yOffset2 = 26;
}
for (i = 0; i < max; i++) {
work->itemA[i] = BattleArcadeObject_Create(&work->unk3E8, 2, 2, 2, 0, 24, yOffset2 + i*40, 0, 2, 0);
work->itemB[i] = BattleArcadeObject_Create(&work->unk3E8, 2, 2, 2, 0, 246, yOffset2 + i*40, 0, 2, 0);
@ -589,29 +589,29 @@ static void BattleArcadeGameBoard_InitObjects(GAME_BOARD_WORK *work) {
ov84_0223F8A8(work->iconA[i], 0);
ov84_0223F8A8(work->iconB[i], 0);
}
ov84_0223F1BC(work);
work->button = BattleArcadeObject_Create(&work->unk3E8, 0, 0, 0, 2, 128, 96, 0, 0, 1);
if (sub_02037474()) {
sub_02009FE8(1, 16);
sub_0200A080(1);
sub_0203A880();
}
Main_SetVBlankIntrCB(BattleArcade_VBlank, work);
}
static void ov84_0223E8DC(GAME_BOARD_WORK *work) {
BattleArcade_SetVramBanks();
ov84_0223E9E4(work->bgConfig);
work->unk3D4 = PaletteData_Init(HEAP_ID_GAME_BOARD);
PaletteData_AllocBuffers(work->unk3D4, 2, 0x200, HEAP_ID_GAME_BOARD);
PaletteData_AllocBuffers(work->unk3D4, 0, 0x200, HEAP_ID_GAME_BOARD);
ov84_0223EAAC(work, 3);
ov84_0223EB44();
ov84_0223EB78(work, 4);
@ -632,11 +632,11 @@ static void ov84_0223E958(BGCONFIG *config) {
static void BattleArcade_VBlank(void *_work) {
GAME_BOARD_WORK *work = _work;
if (work->unk3D4 != NULL) {
sub_0200398C(work->unk3D4);
}
BgConfig_HandleScheduledScrollAndTransferOps(work->bgConfig);
GF_RunVramTransferTasks();
OamManager_ApplyAndResetBuffers();
@ -658,60 +658,60 @@ extern BGTEMPLATE ov84_0223F948;
static void ov84_0223E9E4(BGCONFIG *config) {
GFBgModeSet bgModeSet = ov84_0223F924;
SetBothScreensModesAndDisable(&bgModeSet);
BGTEMPLATE template = ov84_0223F964;
InitBgFromTemplate(config, 1, &template, 0);
BG_ClearCharDataRange(1, 32, 0, HEAP_ID_GAME_BOARD);
BgClearTilemapBufferAndCommit(config, 1);
BGTEMPLATE template2 = ov84_0223F980;
InitBgFromTemplate(config, 3, &template2, 0);
BgClearTilemapBufferAndCommit(config, 3);
BGTEMPLATE template3 = ov84_0223F948;
InitBgFromTemplate(config, 4, &template3, 0);
BgClearTilemapBufferAndCommit(config, 4);
G2_SetBG0Priority(0);
GX_EngineAToggleLayers(1, 0);
}
static void ov84_0223EAAC(GAME_BOARD_WORK *work, u32 a1) {
u32 var;
GfGfxLoader_LoadCharDataFromOpenNarc(work->narc, 124, work->bgConfig, a1, 0, 0, 1, HEAP_ID_GAME_BOARD);
if (BattleArcade_MultiplayerCheck(work->type) == FALSE) {
var = 120;
} else {
var = 122;
}
GfGfxLoader_LoadScrnDataFromOpenNarc(work->narc, var, work->bgConfig, a1, 0, 0, 1, HEAP_ID_GAME_BOARD);
GfGfxLoader_LoadScrnDataFromOpenNarc(work->narc, var, work->bgConfig, a1, 0, 0, 1, HEAP_ID_GAME_BOARD);
}
static void ov84_0223EB08(GAME_BOARD_WORK *work, u32 a1) {
u32 var;
if (BattleArcade_MultiplayerCheck(work->type) == FALSE) {
var = 121;
} else {
var = 123;
}
GfGfxLoader_LoadScrnDataFromOpenNarc(work->narc, var, work->bgConfig, a1, 0, 0, 1, HEAP_ID_GAME_BOARD);
GfGfxLoader_LoadScrnDataFromOpenNarc(work->narc, var, work->bgConfig, a1, 0, 0, 1, HEAP_ID_GAME_BOARD);
}
static void ov84_0223EB44(void) {
void *buffer;
NNSG2dPaletteData *dat;
buffer = GfGfxLoader_GetPlttData(183, 186, &dat, HEAP_ID_GAME_BOARD);
DC_FlushRange(dat->pRawData, 224);
GX_LoadBGPltt(dat->pRawData, 0, 224);
FreeToHeap(buffer);
}
@ -731,7 +731,7 @@ extern u8 ov84_0223F913[8][2];
static void ov84_0223EBE8(GAME_BOARD_WORK *work, int key) {
u8 level = *work->cursorSpeed;
work->unk10++;
if (work->unk10 >= ov84_0223F913[level][0]) {
work->unk10 = 0;
if (work->randomFlag == 1) {
@ -739,15 +739,15 @@ static void ov84_0223EBE8(GAME_BOARD_WORK *work, int key) {
} else {
work->cursorPos++;
}
PlaySE(SEQ_SE_DP_BUTTON3);
if (work->cursorPos >= work->boardArea) {
work->cursorPos = 0;
}
BattleArcadeGameBoard_SetCursorPos(work, work->cursorPos);
}
}
}
static void BattleArcadeGameBoard_SetCursorPos(GAME_BOARD_WORK *work, u8 cursorPos) {
@ -767,17 +767,17 @@ static u8 ov84_0223EC88(u8 area, u8 a2) {
static u16 BattleArcade_GetWinstreak(GAME_BOARD_WORK *work) {
u16 winstreak = work->winstreak;
if (BattleArcade_MultiplayerCheck(work->type) == TRUE && work->multiWinstreak > work->winstreak) {
winstreak = work->multiWinstreak;
}
return winstreak;
}
static BOOL ov84_0223ECBC(GAME_BOARD_WORK *work, u16 type, u16 a2) {
int unkA;
switch (type) {
case 30:
unkA = 71;
@ -792,25 +792,25 @@ static BOOL ov84_0223ECBC(GAME_BOARD_WORK *work, u16 type, u16 a2) {
ov84_0223EDF8(work, type);
break;
}
return (sub_02037030(unkA, work->sendBuffer, 40) == TRUE);
}
static void ov84_0223ED00(GAME_BOARD_WORK *work, u16 type) {
int i, offset;
Sav2_PlayerData_GetProfileAddr(work->savedata);
work->sendBuffer[0] = type;
offset = 2;
for (i = 0; i < 16; i++) {
work->sendBuffer[offset + i] = work->unk34[i];
}
offset += 16;
work->sendBuffer[offset] = work->cursorPosStart;
}
@ -818,42 +818,42 @@ void ov84_0223ED34(int a0, int size, void *data, void *_work) {
int i, offset;
GAME_BOARD_WORK *work = _work;
const u16 *recv = data;
work->unkF++;
if (sub_0203769C() == a0) {
return;
}
if (sub_0203769C() != 0) {
offset = 2;
for (i = 0; i < 16; i++) {
work->unk34[i] = (u8) recv[offset + i];
}
offset += 16;
work->cursorPosStart = recv[offset];
}
}
static void ov84_0223ED6C(GAME_BOARD_WORK *work, u16 type, u16 a2) {
int offset = 0;
work->sendBuffer[offset] = type;
offset++;
work->sendBuffer[offset] = a2;
offset++;
if (sub_0203769C() == 0 && work->unkE == 255) {
work->unkE = a2;
}
work->sendBuffer[offset] = work->unkE;
offset++;
work->sendBuffer[offset] = *work->unk24;
}
@ -863,17 +863,17 @@ static u16 BattleArcade_Random(GAME_BOARD_WORK *work) {
void ov84_0223EDA8(int a0, int size, void *data, void *_work) {
GAME_BOARD_WORK *work = _work;
u16 *recv = data;
work->unkF++;
if (sub_0203769C() == a0) {
return;
}
work->multiSelectPos = recv[1];
if (sub_0203769C() == 0) {
if (work->unkE != 255) {
work->multiSelectPos = 0;
@ -894,29 +894,29 @@ static void ov84_0223EDF8(GAME_BOARD_WORK *work, u16 type) {
void ov84_0223EE08(int a0, int size, void *data, void *_work) {
GAME_BOARD_WORK *work = _work;
const u16 *recv = data;
if (sub_0203769C() == a0) {
return;
}
work->multiCursorPos = (u8) recv[1];
}
static void BattleArcadeGameBoard_StopCursor(GAME_BOARD_WORK *work, u8 type) {
int i;
u8 offset = work->boardArea;
u8 pos = ov84_0223EC88(offset, type);
u8 panelId = work->unk34[pos];
*work->unk20 = panelId;
for (i = 0; i < 16; i++) {
if (work->panel[i] != NULL) {
BattleArcadeObj_SetAnimation(work->panel[i], panelId);
}
}
BattleArcadeGameBoard_SetCursorPos(work, pos);
PlaySE(SEQ_SE_DP_PIRORIRO2);
}
@ -939,7 +939,7 @@ static void ov84_0223EE74(GAME_BOARD_WORK *work) {
int i;
u16 winstreak, var;
u8 flag, challenge;
for (i = 0; i < NELEMS(ov84_0223F99C); i++) {
switch (work->unk2A) {
case 0:
@ -964,10 +964,10 @@ static void ov84_0223EE74(GAME_BOARD_WORK *work) {
flag = ov84_0223F99C[i].flag6;
break;
}
if (flag == 1) {
challenge = 0xff;
switch (i) {
case 27:
challenge = 0;
@ -991,15 +991,15 @@ static void ov84_0223EE74(GAME_BOARD_WORK *work) {
challenge = 6;
break;
}
winstreak = BattleArcade_GetWinstreak(work);
var = winstreak % 7;
if (winstreak >= 9999) {
var = 6;
}
if (challenge != 255) {
switch (var) {
case 0:
@ -1032,7 +1032,7 @@ static void ov84_0223EE74(GAME_BOARD_WORK *work) {
} else {
flag = 1;
}
if (flag == 1) {
work->unk44[work->unk64] = i;
work->unk64++;
@ -1045,15 +1045,15 @@ extern const u8 _0223F900[4];
static void ov84_0223EFE0(GAME_BOARD_WORK *work) {
int i;
for (i = 0; i < NELEMS(_0223F900); i++) {
if (work->unk12 >= _0223F900[i]) {
break;
}
}
work->unk11 = i;
for (i = 0; i < work->unk64; i++) {
if (ov80_022384BC(work->unk44[i]) == 0) {
work->unk30[0]++;
@ -1071,7 +1071,7 @@ static void ov84_0223F094(GAME_BOARD_WORK *work) {
int cnt, i, offset, range;
u16 rand0;
u8 rand, color;
for (i = 0; i < 16; i++) {
color = ov84_0223F178(work, work->unk11);
offset = 0;
@ -1089,13 +1089,13 @@ static void ov84_0223F094(GAME_BOARD_WORK *work) {
offset += work->unk30[1];
offset += work->unk30[2];
}
rand0 = LCRandom() % range;
rand0 += offset;
rand = rand0;
cnt = 0;
while (TRUE) {
if (cnt >= 50) {
GF_ASSERT(FALSE);
@ -1103,19 +1103,19 @@ static void ov84_0223F094(GAME_BOARD_WORK *work) {
cnt = 0;
break;
}
if (ov80_022384BC(work->unk44[rand]) == color) {
work->unk34[i] = work->unk44[rand];
break;
}
rand++;
cnt++;
if (rand >= work->unk64) {
rand = 0;
}
if (rand == rand0) {
color++;
if (color >= 4) {
@ -1131,32 +1131,32 @@ extern const u8 ov84_0223F934[4][4];
static u8 ov84_0223F178(GAME_BOARD_WORK *work, u8 a1) {
u8 cnt, i;
u16 rand;
cnt = 0;
rand = LCRandom() % 100;
for (i = 0; i < 4; i++) {
cnt += ov84_0223F934[a1][i];
if (rand < cnt) {
break;
}
}
if (i >= 4) {
GF_ASSERT(FALSE);
i = 0;
}
return i;
}
static void ov84_0223F1BC(GAME_BOARD_WORK *work) {
u8 partyCount, opponentPartyCount, i;
POKEMON *mon;
partyCount = BattleArcade_GetMonCount(work->type, 1);
opponentPartyCount = BattleArcade_GetOpponentMonCount(work->type, 1);
for (i = 0; i < partyCount; i++) {
mon = GetPartyMonByIndex(work->playerParty, i);
if (GetMonData(mon, 6, NULL) == 0) {
@ -1165,7 +1165,7 @@ static void ov84_0223F1BC(GAME_BOARD_WORK *work) {
BattleArcadeObj_SetVisible(work->itemA[i], 1);
}
}
for (i = 0; i < opponentPartyCount; i++) {
mon = GetPartyMonByIndex(work->opponentParty, i);
if (GetMonData(mon, 6, NULL) == 0) {
@ -1180,12 +1180,12 @@ extern STRUCT_0223F90B ov84_0223F90B[2];
static BOOL BattleArcadeGameBoard_CheckButtonPress(GAME_BOARD_WORK *work) {
int var = sub_0202529C(ov84_0223F90B);
if (var == 0) {
ov84_0223F28C(work);
return TRUE;
}
return FALSE;
}
@ -1199,32 +1199,32 @@ extern u8 ov84_0223F9E4[4];
static void ov84_0223F2B4(GAME_BOARD_SUB_3E8 *work, PARTY *playerParty, PARTY *opponentParty, u8 type) {
int i;
GF_CreateVramTransferManager(32, HEAP_ID_GAME_BOARD);
ov84_0223F480();
NNS_G2dInitOamManagerModule();
OamManager_Create(0, 128, 0, 32, 0, 128, 0, 32, HEAP_ID_GAME_BOARD);
work->spriteList = G2dRenderer_Init(34, &work->render, HEAP_ID_GAME_BOARD);
for (i = 0; i < 4; i++) {
work->resourceMan[i] = Create2DGfxResObjMan(ov84_0223F9E4[i], i, HEAP_ID_GAME_BOARD);
}
ov84_0223F714(work);
ov84_0223F4B4(work);
ov84_0223F538(work);
ov84_0223F5E4(work, playerParty, opponentParty, type);
for (i = 0; i < 11; i++) {
sub_0200ACF0(work->resourceObj[i][0]);
}
for (i = 0; i < 4; i++) {
sub_0200AF94(work->resourceObj[i][1]);
}
GX_EngineBToggleLayers(16, 1);
GX_EngineAToggleLayers(16, 1);
}
@ -1233,9 +1233,9 @@ static Sprite *ov84_0223F374(GAME_BOARD_SUB_3E8 *work, u32 chara, u32 pal, u32 c
int i;
struct SpriteResourcesHeader resourceHeader;
Sprite *sprite;
CreateSpriteResourcesHeader(&resourceHeader, chara, pal, cell, cell, -1, -1, 0, bgPrio, work->resourceMan[0], work->resourceMan[1], work->resourceMan[2], work->resourceMan[3], NULL, NULL);
{
SpriteTemplate template;
template.spriteList = work->spriteList;
@ -1249,14 +1249,14 @@ static Sprite *ov84_0223F374(GAME_BOARD_SUB_3E8 *work, u32 chara, u32 pal, u32 c
template.rotation = 0;
template.priority = prio;
template.heapId = HEAP_ID_GAME_BOARD;
if (display == 0) {
template.whichScreen = 1;
} else {
template.whichScreen = 2;
template.position.y += (192 * FX32_ONE);
}
sprite = CreateSprite(&template);
Set2dSpriteAnimActiveFlag(sprite, 1);
sub_02024868(sprite, 1 * FX32_ONE);
@ -1268,19 +1268,19 @@ static Sprite *ov84_0223F374(GAME_BOARD_SUB_3E8 *work, u32 chara, u32 pal, u32 c
static void ov84_0223F418(GAME_BOARD_SUB_3E8 *work) {
u8 i;
for (i = 0; i < 11; i++) {
sub_0200AEB0(work->resourceObj[i][0]);
}
for (i = 0; i < 4; i++) {
sub_0200B0A8(work->resourceObj[i][1]);
}
for (i = 0; i < 4; i++) {
Destroy2DGfxResObjMan(work->resourceMan[i]);
}
sub_02024504(work->spriteList);
OamManager_Free();
sub_0202168C();
@ -1306,12 +1306,12 @@ static void ov84_0223F4B4(GAME_BOARD_SUB_3E8 *work) {
static void ov84_0223F538(GAME_BOARD_SUB_3E8 *work) {
NARC *narc = NARC_ctor(21, HEAP_ID_GAME_BOARD);
work->resourceObj[2][0] = AddCharResObjFromOpenNarc(work->resourceMan[0], narc, sub_0207CA9C(), FALSE, 2, 1, HEAP_ID_GAME_BOARD);
work->resourceObj[2][1] = AddPlttResObjFromNarc(work->resourceMan[1], 21, sub_0207CAA0(), FALSE, 2, 1, 3, HEAP_ID_GAME_BOARD);
work->resourceObj[2][2] = AddCellOrAnimResObjFromOpenNarc(work->resourceMan[2], narc, sub_0207CAA4(), FALSE, 2, 2, HEAP_ID_GAME_BOARD);
work->resourceObj[2][3] = AddCellOrAnimResObjFromOpenNarc(work->resourceMan[3], narc, sub_0207CAA8(), FALSE, 2, 3, HEAP_ID_GAME_BOARD);
NARC_dtor(narc);
}
@ -1320,11 +1320,11 @@ static void ov84_0223F5E4(GAME_BOARD_SUB_3E8 *work, PARTY *playerParty, PARTY *o
POKEMON *playerMon;
POKEMON *opponentMon;
NARC *narc = NARC_ctor(20, HEAP_ID_GAME_BOARD);
work->resourceObj[3][1] = AddPlttResObjFromNarc(work->resourceMan[1], 20, sub_02074490(), FALSE, 3, 1, 3, HEAP_ID_GAME_BOARD);
work->resourceObj[3][2] = AddCellOrAnimResObjFromOpenNarc(work->resourceMan[2], narc, sub_02074498(), FALSE, 3, 2, HEAP_ID_GAME_BOARD);
work->resourceObj[3][3] = AddCellOrAnimResObjFromOpenNarc(work->resourceMan[3], narc, sub_020744A4(), FALSE, 3, 3, HEAP_ID_GAME_BOARD);
for (i = 0; i < 4; i++) {
if (i == 3) {
if (type == FALSE) {
@ -1338,11 +1338,11 @@ static void ov84_0223F5E4(GAME_BOARD_SUB_3E8 *work, PARTY *playerParty, PARTY *o
playerMon = GetPartyMonByIndex(playerParty, i);
opponentMon = GetPartyMonByIndex(opponentParty, i);
}
work->resourceObj[3 + i][0] = AddCharResObjFromOpenNarc(work->resourceMan[0], narc, Pokemon_GetIconNaix(playerMon), FALSE, 3 + i, 1, HEAP_ID_GAME_BOARD);
work->resourceObj[7 + i][0] = AddCharResObjFromOpenNarc(work->resourceMan[0], narc, Pokemon_GetIconNaix(opponentMon), FALSE, 7 + i, 1, HEAP_ID_GAME_BOARD);
}
NARC_dtor(narc);
}
@ -1350,36 +1350,36 @@ static void ov84_0223F714(GAME_BOARD_SUB_3E8 *work) {
work->resourceObj[0][0] = AddCharResObjFromNarc(work->resourceMan[0], 184, 21, TRUE, 0, 2, HEAP_ID_GAME_BOARD);
work->resourceObj[0][1] = AddPlttResObjFromNarc(work->resourceMan[1], 184, 57, FALSE, 0, 2, 2, HEAP_ID_GAME_BOARD);
work->resourceObj[0][2] = AddCellOrAnimResObjFromNarc(work->resourceMan[2], 184, 23, TRUE, 0, 2, HEAP_ID_GAME_BOARD);
work->resourceObj[0][3] = AddCellOrAnimResObjFromNarc(work->resourceMan[3], 184, 22, TRUE, 0, 3, HEAP_ID_GAME_BOARD);
work->resourceObj[0][3] = AddCellOrAnimResObjFromNarc(work->resourceMan[3], 184, 22, TRUE, 0, 3, HEAP_ID_GAME_BOARD);
}
static BATTLE_ARCADE_OBJECT *BattleArcadeObject_Create(GAME_BOARD_SUB_3E8 *work, u32 chara, u32 pal, u32 cell, u32 anim, u16 x, u16 y, u32 priority, int bgPrio, u8 display) {
BATTLE_ARCADE_OBJECT *obj;
VecFx32 vec;
u32 i;
obj = AllocFromHeap(HEAP_ID_GAME_BOARD, sizeof(BATTLE_ARCADE_OBJECT));
u8 *temp = (u8*) obj;
for (i = sizeof(BATTLE_ARCADE_OBJECT); i; i--) {
*temp++ = 0;
}
obj->sprite = ov84_0223F374(work, chara, pal, cell, anim, priority, bgPrio, display);
obj->x0 = x;
obj->y0 = y;
obj->display = display;
vec.x = x * FX32_ONE;
vec.y = y * FX32_ONE;
if (display == 1) {
vec.y += (192 * FX32_ONE);
}
sub_020247D4(obj->sprite, &vec);
return obj;
}
@ -1398,11 +1398,11 @@ static void BattleArcadeObj_SetPos(BATTLE_ARCADE_OBJECT *obj, u16 x, u16 y) {
vec = *sub_020248AC(obj->sprite);
vec.x = x * FX32_ONE;
vec.y = y * FX32_ONE;
if (obj->display == 1) {
vec.y += (192 * FX32_ONE);
}
sub_020247D4(obj->sprite, &vec);
}
@ -1424,7 +1424,7 @@ extern WINDOWTEMPLATE ov84_0223F9F8[2];
static void ov84_0223F8B4(BGCONFIG *config, WINDOW *window) {
u8 i;
WINDOWTEMPLATE *dat = ov84_0223F9F8;
for (i = 0; i < 2; i++) {
AddWindow(config, &window[i], &dat[i]);
FillWindowPixelBuffer(&window[i], 0);
@ -1433,7 +1433,7 @@ static void ov84_0223F8B4(BGCONFIG *config, WINDOW *window) {
static void ov84_0223F8E4(WINDOW *window) {
u16 i;
for (i = 0; i < 2; i++) {
RemoveWindow(&window[i]);
}

View File

@ -28,11 +28,11 @@ extern BtlCmdFunc sBattleScriptCommandTable[];
BOOL RunBattleScript(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL ret;
do {
ret = sBattleScriptCommandTable[ctx->battleScriptWork[ctx->scriptSeqNo]](bsys, ctx);
} while(ctx->battleContinueFlag == 0 && (BattleSys_GetBattleType(bsys) & BATTLE_TYPE_2) == 0);
ctx->battleContinueFlag = 0;
return ret;
@ -64,7 +64,7 @@ BOOL BtlCmd_PokemonEncounter(BattleSystem *bsys, BATTLECONTEXT *ctx) {
opponentData = BattleSys_GetOpponentDataByBattlerId(bsys, battlerId);
if (opponentData->unk195 & 1) {
BattleController_EmitPokemonEncounter(bsys, battlerId);
PokedexSetBattlerSeen(bsys, battlerId);
PokedexSetBattlerSeen(bsys, battlerId);
}
}
break;
@ -471,7 +471,7 @@ BOOL BtlCmd_TrainerSlideOut(BattleSystem *bsys, BATTLECONTEXT *ctx) {
}
break;
}
return FALSE;
}
@ -554,7 +554,7 @@ BOOL BtlCmd_TrainerSlideIn(BattleSystem *bsys, BATTLECONTEXT *ctx) {
}
break;
}
return FALSE;
}
@ -647,7 +647,7 @@ BOOL BtlCmd_HealthbarSlideInDelay(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleController_EmitHealthbarSlideIn(bsys, ctx, GetBattlerIDBySide(bsys, ctx, side), 0);
break;
}
return FALSE;
}
@ -685,7 +685,7 @@ BOOL BtlCmd_HealthbarSlideOut(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleController_EmitHealthbarSlideOut(bsys, GetBattlerIDBySide(bsys, ctx, side));
break;
}
return FALSE;
}
@ -738,7 +738,7 @@ static void DamageCalcDefault(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_DamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
DamageCalcDefault(bsys, ctx);
ctx->damage = ov12_02257C30(bsys, ctx, ctx->damage);
ctx->damage *= -1;
@ -748,7 +748,7 @@ BOOL BtlCmd_DamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_DamageCalcRaw(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
DamageCalcDefault(bsys, ctx);
ctx->damage *= -1;
@ -761,8 +761,8 @@ BOOL BtlCmd_PrintAttackMessage(BattleSystem *bsys, BATTLECONTEXT *ctx) {
if ((ctx->linkStatus & 1) == FALSE) {
BattleController_EmitPrintAttackMessage(bsys, ctx);
}
ctx->linkStatus |= 1;
ctx->linkStatus |= 1;
ctx->linkStatus2 |= 4;
return FALSE;
@ -771,9 +771,9 @@ BOOL BtlCmd_PrintAttackMessage(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_PrintMessage(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BATTLEMSGDATA msgdata;
BATTLEMSG msg;
BattleScriptIncrementPointer(ctx, 1);
InitBattleMsgData(ctx, &msgdata);
InitBattleMsg(bsys, ctx, &msgdata, &msg);
BattleController_EmitPrintMessage(bsys, ctx, &msg);
@ -805,7 +805,7 @@ BOOL BtlCmd_PrintBufferedMessage(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_BufferMessage(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BATTLEMSGDATA msgdata;
BattleScriptIncrementPointer(ctx, 1);
InitBattleMsgData(ctx, &msgdata);
@ -835,7 +835,7 @@ BOOL BtlCmd_BufferMessageSide(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_PlayMoveAnimation(BattleSystem *bsys, BATTLECONTEXT *ctx) {
u16 move;
BattleScriptIncrementPointer(ctx, 1);
u32 battler = BattleScriptReadWord(ctx);
@ -859,7 +859,7 @@ BOOL BtlCmd_PlayMoveAnimation(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_PlayMoveAnimation2(BattleSystem *bsys, BATTLECONTEXT *ctx) {
u16 move;
BattleScriptIncrementPointer(ctx, 1);
u32 battler = BattleScriptReadWord(ctx);
u32 attackerSide = BattleScriptReadWord(ctx);
@ -888,7 +888,7 @@ BOOL BtlCmd_PlayMoveAnimation2(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_MonFlicker(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
u32 side = BattleScriptReadWord(ctx);
BattleController_EmitMonFlicker(bsys, GetBattlerIDBySide(bsys, ctx, side), ctx->moveStatusFlag);
@ -898,7 +898,7 @@ BOOL BtlCmd_MonFlicker(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_HealthbarDataUpdate(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
u8 battlerId = GetBattlerIDBySide(bsys, ctx, BattleScriptReadWord(ctx));
if ((ctx->battleMons[battlerId].hp + ctx->hpCalcWork) <= 0) {
@ -926,7 +926,7 @@ BOOL BtlCmd_HealthbarDataUpdate(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_HealthbarUpdate(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
BattleController_EmitHealthbarUpdate(bsys, ctx, GetBattlerIDBySide(bsys, ctx, BattleScriptReadWord(ctx)));
return FALSE;
@ -973,7 +973,7 @@ BOOL BtlCmd_Wait(BattleSystem *bsys, BATTLECONTEXT *ctx) {
ctx->unk_F0 = waitFrames;
}
}
if (bsys->battleTypeFlags & BATTLE_TYPE_2 && !(bsys->unk240C & 16)) {
waitIncrement = 2;
} else {
@ -1257,9 +1257,9 @@ BOOL BtlCmd_GetExp(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_GetExpLoop(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
BattleScriptReadWord(ctx);
return FALSE;
}
@ -1344,7 +1344,7 @@ BOOL BtlCmd_SwitchInDataUpdate(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
int side = BattleScriptReadWord(ctx);
int battlerId;
switch (side) {
@ -1361,7 +1361,7 @@ BOOL BtlCmd_SwitchInDataUpdate(BattleSystem *bsys, BATTLECONTEXT *ctx) {
ctx->unk_13C[battlerId] &= ~1;
ctx->unk_3108 &= (MaskOfFlagNo(battlerId)^~0);
ctx->selectedMonIndex[battlerId] = ctx->unk_21A0[battlerId];
ctx->selectedMonIndex[battlerId] = ctx->unk_21A0[battlerId];
ctx->unk_21A0[battlerId] = 6;
ov12_0224E4FC(bsys, ctx, battlerId, ctx->selectedMonIndex[battlerId]);
@ -1377,7 +1377,7 @@ BOOL BtlCmd_SwitchInDataUpdate(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_JumpIfCantSwitch(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int battlerId;
int maxBattlers = BattleSys_GetMaxBattlers(bsys);
BattleScriptIncrementPointer(ctx, 1);
u32 adrs = BattleScriptReadWord(ctx);
@ -1418,7 +1418,7 @@ BOOL BtlCmd_GetPokemon(BattleSystem *bsys, BATTLECONTEXT *ctx) {
}
ctx->battleContinueFlag = 1;
return FALSE;
}
@ -1442,7 +1442,7 @@ BOOL BtlCmd_SetMultiHit(BattleSystem *bsys, BATTLECONTEXT *ctx) {
ctx->multiHitCountTemp = cnt;
ctx->checkMultiHit = checkMultiHit;
}
return FALSE;
}
@ -1513,7 +1513,7 @@ BOOL BtlCmd_ChangeVar(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_BufferStatChangeMsg(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int change, stat;
BATTLEMON *mon = &ctx->battleMons[ctx->battlerIdStatChange];
BattleScriptIncrementPointer(ctx, 1);
int unkA = BattleScriptReadWord(ctx);
@ -1637,7 +1637,7 @@ BOOL BtlCmd_BufferStatChangeMsg(BattleSystem *bsys, BATTLECONTEXT *ctx) {
unkD = 1;
} else if (ctx->battleMons[ctx->battlerIdStatChange].status2 & STATUS2_24){
unkD = 2;
}
}
} else if (mon->statChanges[1 + stat] == 0) {
ctx->linkStatus |= (1 << 17);
if (ctx->unk_88 == 2 || ctx->unk_88 == 3) {
@ -1674,7 +1674,7 @@ BOOL BtlCmd_BufferStatChangeMsg(BattleSystem *bsys, BATTLECONTEXT *ctx) {
ctx->buffMsg.id = (change == -1) ? 0x2FA:0x2FD;
ctx->buffMsg.tag = 12;
ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange);
ctx->buffMsg.param[1] = stat + 1;
ctx->buffMsg.param[1] = stat + 1;
}
mon->statChanges[stat + 1] += change;
if (mon->statChanges[stat + 1] < 0) {
@ -1787,9 +1787,9 @@ BOOL BtlCmd_ToggleVanish(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_CheckAbility(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int battlerId;
BattleScriptIncrementPointer(ctx, 1);
int unkA = BattleScriptReadWord(ctx);
int side = BattleScriptReadWord(ctx);
int ability = BattleScriptReadWord(ctx);
@ -2041,7 +2041,7 @@ BOOL BtlCmd_ResetAllStatChanges(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int stat, battlerId;
BattleScriptIncrementPointer(ctx, 1);
int battlersMax = BattleSys_GetMaxBattlers(bsys);
for (battlerId = 0; battlerId < battlersMax; battlerId++) {
@ -2056,7 +2056,7 @@ BOOL BtlCmd_ResetAllStatChanges(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_64(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
LockBattlerIntoCurrentMove(bsys, ctx, GetBattlerIDBySide(bsys, ctx, BattleScriptReadWord(ctx)));
return FALSE;
@ -2064,7 +2064,7 @@ BOOL BtlCmd_64(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_65(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
UnlockBattlerOutOfCurrentMove(bsys, ctx, GetBattlerIDBySide(bsys, ctx, BattleScriptReadWord(ctx)));
return FALSE;
@ -2152,7 +2152,7 @@ u32 CalcPrizeMoney(BattleSystem *bsys, BATTLECONTEXT *ctx, int trainerIndex) {
prizeMoney = level*4*ctx->prizeMoneyValue*sPrizeMoneyTbl[i][1];
break;
}
} while (TRUE);
FreeToHeap(trPoke);
@ -2212,7 +2212,7 @@ BOOL BtlCmd_CopyStatus2Effect(BattleSystem *bsys, BATTLECONTEXT *ctx) {
if (BattleSys_AreBattleAnimationsOn(bsys) == TRUE || status == 15 || status == 16 || status == 26 || status == 25) {
int battlerIdA = GetBattlerIDBySide(bsys, ctx, sideA);
int battlerIdB = GetBattlerIDBySide(bsys, ctx, sideB);
int battlerIdB = GetBattlerIDBySide(bsys, ctx, sideB);
if (CheckStatusEffectsSubstitute(ctx, battlerIdA, status) == TRUE && CheckStatusEffectsSubstitute(ctx, battlerIdB, status) == TRUE) {
BattleController_EmitCopyStatus2Effect(bsys, ctx, battlerIdA, battlerIdB, status);
}
@ -2546,7 +2546,7 @@ BOOL BtlCmd_TryMist(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_TryOHKO(BattleSystem *bsys, BATTLECONTEXT *ctx) {
u16 hitChance;
BattleScriptIncrementPointer(ctx, 1);
ctx->linkStatus |= (1 << 10);
@ -2579,7 +2579,7 @@ BOOL BtlCmd_TryOHKO(BattleSystem *bsys, BATTLECONTEXT *ctx) {
}
ctx->moveStatusFlag |= 1 << 10;
}
if (hitChance) {
ctx->damage = -ctx->battleMons[ctx->battlerIdTarget].hp;
ctx->moveStatusFlag |= 1 << 5;
@ -2649,7 +2649,7 @@ BOOL BtlCmd_TryMimic(BattleSystem *bsys, BATTLECONTEXT *ctx) {
for (moveIndex = 0; moveIndex < LEARNED_MOVES_MAX; moveIndex++) {
if (ctx->battleMons[ctx->battlerIdAttacker].moves[moveIndex] == ctx->moveNoBattlerPrev[ctx->battlerIdTarget]) {
break;
}
}
if (ctx->battleMons[ctx->battlerIdAttacker].moves[moveIndex] == MOVE_MIMIC && mimicIndex == -1) {
mimicIndex = moveIndex;
}
@ -2815,7 +2815,7 @@ BOOL BtlCmd_TryEncore(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_TryConversion2(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int i, moveType;
BattleScriptIncrementPointer(ctx, 1);
int adrs = BattleScriptReadWord(ctx);
@ -2898,7 +2898,7 @@ BOOL BtlCmd_TrySketch(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_TrySleepTalk(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int moveIndex, nonSelectableMoves;
BattleScriptIncrementPointer(ctx, 1);
int adrs = BattleScriptReadWord(ctx);
@ -2925,7 +2925,7 @@ BOOL BtlCmd_TrySleepTalk(BattleSystem *bsys, BATTLECONTEXT *ctx) {
} while (MaskOfFlagNo(moveIndex) & nonSelectableMoves);
ctx->moveWork = ctx->battleMons[ctx->battlerIdAttacker].moves[moveIndex];
}
return FALSE;
}
@ -2944,7 +2944,7 @@ BOOL BtlCmd_FlailDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
break;
}
}
ctx->movePower = sFlailDamageTable[i][1];
return FALSE;
@ -2995,7 +2995,7 @@ BOOL BtlCmd_HealBell(BattleSystem *bsys, BATTLECONTEXT *ctx) {
ctx->calcWork |= 5;
}
if (battleType & BATTLE_TYPE_DOUBLES) {
if (battleType & BATTLE_TYPE_DOUBLES) {
battlerId = GetBattlerIDBySide(bsys, ctx, B_SIDE_16);
if (!(ctx->unk_3108 & MaskOfFlagNo(battlerId))) {
if (!CheckBattlerAbilityIfNotIgnored(ctx, ctx->battlerIdAttacker, battlerId, ABILITY_SOUNDPROOF)) {
@ -3003,7 +3003,7 @@ BOOL BtlCmd_HealBell(BattleSystem *bsys, BATTLECONTEXT *ctx) {
ctx->battleMons[battlerId].status2 &= ~STATUS2_27;
} else {
ctx->battlerIdWork = battlerId;
ctx->calcWork |= 10;
ctx->calcWork |= 10;
}
}
} else {
@ -3016,7 +3016,7 @@ BOOL BtlCmd_HealBell(BattleSystem *bsys, BATTLECONTEXT *ctx) {
battlerId = GetBattlerIDBySide(bsys, ctx, B_SIDE_16);
if (!(ctx->unk_3108 & MaskOfFlagNo(battlerId))) {
ctx->battleMons[battlerId].status = 0;
ctx->battleMons[battlerId].status2 &= ~STATUS2_27;
ctx->battleMons[battlerId].status2 &= ~STATUS2_27;
}
} else {
ctx->calcWork |= 8;
@ -3085,7 +3085,7 @@ BOOL BtlCmd_TryProtect(BattleSystem *bsys, BATTLECONTEXT *ctx) {
if (ctx->unk_334.moveData[ctx->moveNoCur].effect == 116) {
ctx->turnData[ctx->battlerIdAttacker].unk0_9 = TRUE;
ctx->buffMsg.id = 442;
}
ctx->buffMsg.tag = 2;
ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdAttacker);
@ -3137,7 +3137,7 @@ BOOL BtlCmd_TryWhirlwind(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int monIndexA, monIndexB;
party = BattleSys_GetParty(bsys, ctx->battlerIdTarget);
partySize = BattleSys_GetPartySize(bsys, ctx->battlerIdTarget);
partySize = BattleSys_GetPartySize(bsys, ctx->battlerIdTarget);
if (battleType & BATTLE_TYPE_MULTI || battleType & BATTLE_TYPE_INGAME_PARTNER && BattleSys_GetFieldSide(bsys, ctx->battlerIdTarget)) {
index0 = 0;
@ -3159,7 +3159,7 @@ BOOL BtlCmd_TryWhirlwind(BattleSystem *bsys, BATTLECONTEXT *ctx) {
maxRand = partySize;
cntMax = 1;
monIndexA = ctx->selectedMonIndex[ctx->battlerIdTarget];
monIndexB = ctx->selectedMonIndex[ctx->battlerIdTarget];
monIndexB = ctx->selectedMonIndex[ctx->battlerIdTarget];
}
for (monIndex = index0; monIndex < indexEnd; monIndex++) {
@ -3233,7 +3233,7 @@ BOOL BtlCmd_Transform(BattleSystem *bsys, BATTLECONTEXT *ctx) {
ctx->battleMons[ctx->battlerIdAttacker].movePPCur[i] = 5;
}
}
return FALSE;
}
@ -3279,7 +3279,7 @@ BOOL BtlCmd_TryPerishSong(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int adrs = BattleScriptReadWord(ctx);
int maxBattlers = BattleSys_GetMaxBattlers(bsys);
ctx->calcWork = maxBattlers;
int cnt = 0;
@ -3301,7 +3301,7 @@ BOOL BtlCmd_TryPerishSong(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_SetTurnOrderBySpeed(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
u32 *unkPtr = BattleScriptGetVarPointer(bsys, ctx, BattleScriptReadWord(ctx));
*unkPtr = ctx->unk_21EC[ctx->unk_3104];
@ -3361,7 +3361,7 @@ BOOL BtlCmd_WeatherDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
if (ctx->battleMons[battlerId].hp < ctx->battleMons[battlerId].maxHp) {
ctx->hpCalcWork = DamageDivide(ctx->battleMons[battlerId].maxHp, 16);
}
} else if (type1 != TYPE_ICE && type2 != TYPE_ICE &&
} else if (type1 != TYPE_ICE && type2 != TYPE_ICE &&
GetBattlerAbility(ctx, battlerId) != ABILITY_SNOW_CLOAK) {
ctx->moveWork = MOVE_HAIL;
ctx->hpCalcWork = DamageDivide(ctx->battleMons[battlerId].maxHp * -1, 16);
@ -3373,12 +3373,12 @@ BOOL BtlCmd_WeatherDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
if (ctx->battleMons[battlerId].hp && ctx->battleMons[battlerId].hp < ctx->battleMons[battlerId].maxHp &&
GetBattlerAbility(ctx, battlerId) == ABILITY_RAIN_DISH) {
ctx->hpCalcWork = DamageDivide(ctx->battleMons[battlerId].maxHp, 16);
}
}
if (ctx->battleMons[battlerId].hp && ctx->battleMons[battlerId].hp < ctx->battleMons[battlerId].maxHp &&
GetBattlerAbility(ctx, battlerId) == ABILITY_DRY_SKIN) {
ctx->hpCalcWork = DamageDivide(ctx->battleMons[battlerId].maxHp, 8);
}
if (ctx->battleMons[battlerId].hp && (u8)ctx->battleMons[battlerId].status &&
}
if (ctx->battleMons[battlerId].hp && (u8)ctx->battleMons[battlerId].status &&
GetBattlerAbility(ctx, battlerId) == ABILITY_HYDRATION) {
if (ctx->battleMons[battlerId].status & 7) { //sleep
ctx->msgWork = 0;
@ -3453,7 +3453,7 @@ BOOL BtlCmd_TryAttract(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int adrs = BattleScriptReadWord(ctx);
if (ctx->battleMons[ctx->battlerIdWork].gender == ctx->battleMons[ctx->battlerIdStatChange].gender ||
ctx->battleMons[ctx->battlerIdStatChange].status2 & STATUS2_ATTRACT_ALL ||
ctx->battleMons[ctx->battlerIdStatChange].status2 & STATUS2_ATTRACT_ALL ||
ctx->battleMons[ctx->battlerIdWork].gender == 2 || ctx->battleMons[ctx->battlerIdStatChange].gender == 2) {
BattleScriptIncrementPointer(ctx, adrs);
} else {
@ -3507,7 +3507,7 @@ BOOL BtlCmd_MagnitudeDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
if (ctx->magnitude == 0) {
ctx->magnitude = BattleSys_Random(bsys) % 100;
ctx->magnitude = BattleSys_Random(bsys) % 100;
if (ctx->magnitude < 5) {
ctx->movePower = 10;
ctx->magnitude = 4;
@ -3575,7 +3575,7 @@ BOOL BtlCmd_RapidSpin(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptGotoSubscript(ctx, 1, 117);
return FALSE;
}
//Spikes
if(ctx->fieldSideConditionData[side].spikesLayers) {
ctx->fieldSideConditionFlags[side] &= ~SIDE_CONDITION_SPIKES;
@ -3665,7 +3665,7 @@ BOOL BtlCmd_TryFutureSight(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleScriptIncrementPointer(ctx, 1);
int adrs = BattleScriptReadWord(ctx);
if (ctx->fieldConditionData.futureSightTurns[ctx->battlerIdTarget] == 0) {
int side = BattleSys_GetFieldSide(bsys, ctx->battlerIdTarget);
ctx->fieldSideConditionFlags[side] |= SIDE_CONDITION_FUTURE_SIGHT;
@ -3675,7 +3675,7 @@ BOOL BtlCmd_TryFutureSight(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int damage = CalcMoveDamage(bsys, ctx, ctx->moveNoCur, ctx->fieldSideConditionFlags[side], ctx->fieldCondition, 0, 0, ctx->battlerIdAttacker, ctx->battlerIdTarget, 1) * -1;
ctx->fieldConditionData.futureSightDamage[ctx->battlerIdTarget] = ov12_02257C30(bsys, ctx, damage);
if (ctx->turnData[ctx->battlerIdAttacker].helpingHandFlag) {
ctx->fieldConditionData.futureSightDamage[ctx->battlerIdTarget] = ctx->fieldConditionData.futureSightDamage[ctx->battlerIdTarget]*15/10;
ctx->fieldConditionData.futureSightDamage[ctx->battlerIdTarget] = ctx->fieldConditionData.futureSightDamage[ctx->battlerIdTarget]*15/10;
}
} else {
BattleScriptIncrementPointer(ctx, adrs);
@ -3691,7 +3691,7 @@ BOOL BtlCmd_CheckHitRate(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int sideTarget = BattleScriptReadWord(ctx);
int move = BattleScriptReadWord(ctx);
int adrs = BattleScriptReadWord(ctx);
int battlerIdAttacker = GetBattlerIDBySide(bsys, ctx, sideAttacker);
int battlerIdTarget = GetBattlerIDBySide(bsys, ctx, sideTarget);
int moveMsgNo = GetMoveMessageNo(ctx, move);
@ -3722,7 +3722,7 @@ BOOL BtlCmd_BeatUpDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int forme;
int level;
POKEMON *mon;
BattleScriptIncrementPointer(ctx, 1);
int monCnt = BattleSys_GetPartySize(bsys, ctx->battlerIdAttacker);
@ -3734,7 +3734,7 @@ BOOL BtlCmd_BeatUpDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
while (TRUE) {
mon = BattleSystem_GetPartyMon(bsys, ctx->battlerIdAttacker, ctx->beatUpCount);
if (ctx->beatUpCount == ctx->selectedMonIndex[ctx->battlerIdAttacker] ||
if (ctx->beatUpCount == ctx->selectedMonIndex[ctx->battlerIdAttacker] ||
(GetMonData(mon, MON_DATA_HP, 0) && GetMonData(mon, MON_DATA_SPECIES2, 0) && GetMonData(mon, MON_DATA_SPECIES2, 0) != 0x1ee && GetMonData(mon, MON_DATA_STATUS, 0) == 0)) {
break;
}
@ -3770,7 +3770,7 @@ BOOL BtlCmd_BeatUpDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
if (ctx->beatUpCount < monCnt) {
while (TRUE) {
mon = BattleSystem_GetPartyMon(bsys, ctx->battlerIdAttacker, ctx->beatUpCount);
if (ctx->beatUpCount == ctx->selectedMonIndex[ctx->battlerIdAttacker] ||
if (ctx->beatUpCount == ctx->selectedMonIndex[ctx->battlerIdAttacker] ||
(GetMonData(mon, MON_DATA_HP, 0) && GetMonData(mon, MON_DATA_SPECIES2, 0) && GetMonData(mon, MON_DATA_SPECIES2, 0) != 0x1ee && GetMonData(mon, MON_DATA_STATUS, 0) == 0)) {
break;
}
@ -3783,7 +3783,7 @@ BOOL BtlCmd_BeatUpDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
} else {
ctx->multiHitCount = 1;
}
return FALSE;
}
@ -3833,7 +3833,7 @@ BOOL BtlCmd_TryTrick(BattleSystem *bsys, BATTLECONTEXT *ctx) {
if (BattleSys_GetFieldSide(bsys, ctx->battlerIdAttacker) && (battleType & (BATTLE_TYPE_2 | BATTLE_TYPE_7)) == 0) {
BattleScriptIncrementPointer(ctx, adrsA);
} else if ((ctx->fieldSideConditionData[sideAttacker].battlerBitKnockedOffItem & MaskOfFlagNo(ctx->selectedMonIndex[ctx->battlerIdAttacker])) ||
} else if ((ctx->fieldSideConditionData[sideAttacker].battlerBitKnockedOffItem & MaskOfFlagNo(ctx->selectedMonIndex[ctx->battlerIdAttacker])) ||
(ctx->fieldSideConditionData[sideTarget].battlerBitKnockedOffItem & MaskOfFlagNo(ctx->selectedMonIndex[ctx->battlerIdTarget]))) {
BattleScriptIncrementPointer(ctx, adrsA);
} else if ((ctx->battleMons[ctx->battlerIdAttacker].item == 0 && ctx->battleMons[ctx->battlerIdTarget].item == 0) ||
@ -4003,7 +4003,7 @@ BOOL BtlCmd_TryKnockOff(BattleSystem *bsys, BATTLECONTEXT *ctx) {
ctx->buffMsg.tag = 33;
ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdAttacker);
ctx->buffMsg.param[1] = CreateNicknameTag(ctx, ctx->battlerIdTarget);
ctx->buffMsg.param[2] = ctx->battleMons[ctx->battlerIdTarget].item;
ctx->buffMsg.param[2] = ctx->battleMons[ctx->battlerIdTarget].item;
ctx->battleMons[ctx->battlerIdTarget].item = 0;
ctx->fieldSideConditionData[side].battlerBitKnockedOffItem |= MaskOfFlagNo(ctx->selectedMonIndex[ctx->battlerIdTarget]);
} else {
@ -4214,7 +4214,7 @@ _0224313C:
add sp, #0x18
pop {r3, r4, r5, r6, r7, pc}
nop
}
}
#endif
BOOL BtlCmd_TryGrudge(BattleSystem *bsys, BATTLECONTEXT *ctx) {
@ -4226,7 +4226,7 @@ BOOL BtlCmd_TryGrudge(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BattleSys_GetFieldSide(bsys, ctx->battlerIdTarget);
if (ctx->battleMons[ctx->battlerIdFainted].moveEffectFlags & MOVE_EFFECT_14 &&
if (ctx->battleMons[ctx->battlerIdFainted].moveEffectFlags & MOVE_EFFECT_14 &&
BattleSys_GetFieldSide(bsys, ctx->battlerIdAttacker) != BattleSys_GetFieldSide(bsys, ctx->battlerIdFainted) &&
ctx->battleMons[ctx->battlerIdAttacker].hp && ctx->moveNoTemp != 165) {
pos = ctx->movePos[ctx->battlerIdAttacker];
@ -4309,7 +4309,7 @@ BOOL BtlCmd_WeatherBallDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
} else {
ctx->movePower = ctx->unk_334.moveData[ctx->moveNoCur].power;
}
}
}
return FALSE;
}
@ -4323,7 +4323,7 @@ BOOL BtlCmd_TryPursuit(BattleSystem *bsys, BATTLECONTEXT *ctx) {
maxBattlers = BattleSys_GetMaxBattlers(bsys);
for (battlerId = 0; battlerId < maxBattlers; battlerId++) {
if (ctx->unk_21A8[battlerId][0] != 40 && ctx->battleMons[battlerId].hp && !(ctx->battleMons[battlerId].status & 39) &&
if (ctx->unk_21A8[battlerId][0] != 40 && ctx->battleMons[battlerId].hp && !(ctx->battleMons[battlerId].status & 39) &&
!ov12_02252C40(ctx, battlerId) && BattleSys_GetFieldSide(bsys, battlerId) != BattleSys_GetFieldSide(bsys, ctx->battlerIdSwitch)) {
if (ctx->battleMons[battlerId].unk88.encoredMove && ctx->battleMons[battlerId].unk88.encoredMove == ctx->battleMons[battlerId].moves[ctx->battleMons[battlerId].unk88.encoredMoveIndex]) {
moveNo = ctx->battleMons[battlerId].unk88.encoredMove;
@ -4353,7 +4353,7 @@ BOOL BtlCmd_TryPursuit(BattleSystem *bsys, BATTLECONTEXT *ctx) {
if (battlerId == maxBattlers) {
BattleScriptIncrementPointer(ctx, adrs);
} else {
} else {
int itemEffect = GetBattlerHeldItemEffect(ctx, ctx->battlerIdAttacker);
ov12_02255844(ctx, ctx->battlerIdAttacker, 0);
@ -4376,7 +4376,7 @@ BOOL BtlCmd_TypeEffectivenessCheck(BattleSystem *bsys, BATTLECONTEXT *ctx) {
//TODO: Rename to BtlCmd_CheckTurnDataFlag
BOOL BtlCmd_PokemonEncounter44(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int ret = FALSE;
BattleScriptIncrementPointer(ctx, 1);
int side = BattleScriptReadWord(ctx);
@ -4609,7 +4609,7 @@ BOOL BtlCmd_PunishmentDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_TrySuckerPunch(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int move;
BattleScriptIncrementPointer(ctx, 1);
int adrs = BattleScriptReadWord(ctx);
@ -4856,7 +4856,7 @@ BOOL BtlCmd_Pickup(BattleSystem *bsys, BATTLECONTEXT *ctx) {
u16 species, item;
u8 ability, lvl;
POKEMON *mon;
BattleScriptIncrementPointer(ctx, 1);
for (i = 0; i < BattleSys_GetPartySize(bsys, 0); i++) {
@ -4940,7 +4940,7 @@ BOOL BtlCmd_CheckItemEffect(BattleSystem *bsys, BATTLECONTEXT *ctx) {
} else if (GetBattlerHeldItemEffect(ctx, battlerId) != itemEffect) {
BattleScriptIncrementPointer(ctx, adrs);
}
return FALSE;
}
@ -4966,7 +4966,7 @@ BOOL BtlCmd_GetItemHoldEffect(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int *var = BattleScriptGetVarPointer(bsys, ctx, varId);
u16 item = GetBattlerHeldItem(ctx, GetBattlerIDBySide(bsys, ctx, side));
*var = GetItemHoldEffect(ctx, item, 2);
return FALSE;
}
@ -4980,8 +4980,8 @@ BOOL BtlCmd_TryCamouflage(BattleSystem *bsys, BATTLECONTEXT *ctx) {
if (GetBattlerAbility(ctx, ctx->battlerIdAttacker) == ABILITY_MULTITYPE) {
BattleScriptIncrementPointer(ctx, adrs);
return FALSE;
}
}
int terrain = BattleSys_GetTerrainId(bsys);
if (terrain > TERRAIN_MAX-1) {
terrain = TERRAIN_MAX-1;
@ -5023,7 +5023,7 @@ BOOL BtlCmd_SecretPower(BattleSystem *bsys, BATTLECONTEXT *ctx) {
terrain = 12;
}
ctx->unk_2174 = sSecretPowerEffectTable[terrain];
return FALSE;
}
@ -5054,7 +5054,7 @@ BOOL BtlCmd_TryPluck(BattleSystem *bsys, BATTLECONTEXT *ctx) {
} else if ((ctx->battleMons[ctx->battlerIdTarget].item && ctx->battleMons[ctx->battlerIdTarget].unk88.unk4_2C) || CanEatOpponentBerry(bsys, ctx, ctx->battlerIdTarget) != TRUE) {
BattleScriptIncrementPointer(ctx, adrs2);
}
return FALSE;
}
@ -5080,7 +5080,7 @@ BOOL BtlCmd_YesNoBox(BattleSystem *bsys, BATTLECONTEXT *ctx) {
BOOL BtlCmd_YesNoBoxWait(BattleSystem *bsys, BATTLECONTEXT *ctx) {
u8 selection = ov12_0225682C(ctx, 0);
if (selection) {
BattleScriptIncrementPointer(ctx, 1);
@ -5202,17 +5202,17 @@ BOOL BtlCmd_CheckEffectActivation(BattleSystem *bsys, BATTLECONTEXT *ctx) {
}
BattleScriptIncrementPointer(ctx, adrs);
return FALSE;
}
BOOL BtlCmd_CheckChatterActivation(BattleSystem *bsys, BATTLECONTEXT *ctx) {
u16 effectChance;
BattleScriptIncrementPointer(ctx, 1);
int adrs = BattleScriptReadWord(ctx);
int param;
if (ctx->battleMons[ctx->battlerIdAttacker].species == SPECIES_CHATOT && ctx->battleMons[ctx->battlerIdTarget].hp && !(ctx->battleMons[ctx->battlerIdAttacker].status2 & (1 << 21))) {
@ -5406,7 +5406,7 @@ BOOL BtlCmd_198(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int battlerId;
OpponentData *opponentData;
int maxBattlers = BattleSys_GetMaxBattlers(bsys);
BattleScriptIncrementPointer(ctx, 1);
int side = BattleScriptReadWord(ctx);
@ -5441,7 +5441,7 @@ BOOL BtlCmd_199(BattleSystem *bsys, BATTLECONTEXT *ctx) {
int battlerId;
OpponentData *opponentData;
int maxBattlers = BattleSys_GetMaxBattlers(bsys);
BattleScriptIncrementPointer(ctx, 1);
int side = BattleScriptReadWord(ctx);
@ -5507,7 +5507,7 @@ BOOL BtlCmd_CheckWhiteout(BattleSystem *bsys, BATTLECONTEXT *ctx) {
mon = GetPartyMonByIndex(party2, i);
if (GetMonData(mon, MON_DATA_SPECIES2, 0) != 0 && GetMonData(mon, MON_DATA_SPECIES2, 0) != SPECIES_EGG) {
partyHp += GetMonData(mon, MON_DATA_HP, 0);
}
}
}
if (partyHp == 0) {
@ -5515,14 +5515,14 @@ BOOL BtlCmd_CheckWhiteout(BattleSystem *bsys, BATTLECONTEXT *ctx) {
}
} else {
PARTY *party = BattleSys_GetParty(bsys, battlerId);
BattleSys_GetOpponentDataByBattlerId(bsys, battlerId);
for (i = 0; i < GetPartyCount(party); i++) {
mon = GetPartyMonByIndex(party, i);
if (GetMonData(mon, MON_DATA_SPECIES2, 0) != 0 && GetMonData(mon, MON_DATA_SPECIES2, 0) != SPECIES_EGG) {
partyHp += GetMonData(mon, MON_DATA_HP, 0);
}
}
}
if (partyHp == 0) {
@ -5716,7 +5716,7 @@ BOOL BtlCmd_CheckItemEffectOnUTurn(BattleSystem *bsys, BATTLECONTEXT *ctx) {
if (!CheckItemEffectOnUTurn(bsys, ctx, &ctx->tempWork)) {
BattleScriptIncrementPointer(ctx, adrs);
}
}
return FALSE;
}

View File

@ -1936,11 +1936,11 @@ void CopyGlyphToWindow(WINDOW *window, u8 *glyphPixels, u16 srcWidth, u16 srcHei
u16 destWidth, destHeight;
int srcRight, srcBottom;
u8 glyphSizeParam;
windowPixels = (u8 *)window->pixelBuffer;
destWidth = (u16)(window->width * 8);
destHeight = (u16)(window->height * 8);
// Don't overflow the window
if (destWidth - dstX < srcWidth) {
srcRight = destWidth - dstX;
@ -1962,7 +1962,7 @@ void CopyGlyphToWindow(WINDOW *window, u8 *glyphPixels, u16 srcWidth, u16 srcHei
if (srcBottom > 8) {
glyphSizeParam |= 2; // 2 high
}
if (window->colorMode == GF_BG_CLR_4BPP) {
switch (glyphSizeParam) {
case 0: // 1x1

View File

@ -542,7 +542,7 @@ static void ov76_021E62B4(CreditsAppWork *work) {
static void InitSprites(CreditsAppWork *work) {
SpriteResourcesHeader header;
SpriteTemplate tmpl;
u8 yIdx;
SceneWork *ptr = &work->sceneWork;
@ -557,7 +557,7 @@ static void InitSprites(CreditsAppWork *work) {
yIdx = i - 3;
tmpl.position.x = 240 * FX32_ONE;
}
tmpl.position.y = (yIdx * 80 + 16) * FX32_ONE;
tmpl.priority = 1;
ptr->pokemon[i] = CreateSprite(&tmpl);

View File

@ -16,7 +16,7 @@ const MonthDay DiamondDustDates[] = {
u32 Fsys_GetWeather_HandleDiamondDust(FieldSystem* fsys, u32 mapId) {
u8 c;
u32 weatherType = MapHeader_GetWeatherType(mapId);
if (mapId != MAP_D41R0108) {
return weatherType;
@ -25,7 +25,7 @@ u32 Fsys_GetWeather_HandleDiamondDust(FieldSystem* fsys, u32 mapId) {
for (c = 0; c < NELEMS(DiamondDustDates); c++) {
u8 month = DiamondDustDates[c].month;
u8 day = DiamondDustDates[c].day;
if ((sysinfo_rtc->date.month == month) && (sysinfo_rtc->date.day == day)) {
if ((sysinfo_rtc->date.month == month) && (sysinfo_rtc->date.day == day)) {
if (!sub_02055670(fsys)) {
weatherType = MAP_WEATHER_DIAMOND_DUST;
}

View File

@ -24,7 +24,7 @@ static BOOL sub_02050660(TaskManager *man) {
FieldSystem *fsys = TaskManager_GetSys(man);
BATTLE_SETUP *battleSetup = TaskManager_GetEnv(man);
int *state = TaskManager_GetStatePtr(man);
switch (*state) {
case 0:
sub_0203E3C4(fsys, battleSetup);
@ -80,7 +80,7 @@ static BOOL sub_02050738(TaskManager *man) {
FieldSystem *fsys = TaskManager_GetSys(man);
ENCOUNTER *encounter = TaskManager_GetEnv(man);
int *state = TaskManager_GetStatePtr(man);
switch (*state) {
case 0:
MapObjectMan_PauseAllMovement(fsys->mapObjectMan);
@ -101,10 +101,10 @@ static BOOL sub_02050738(TaskManager *man) {
sub_02093070(fsys);
sub_020930C4(fsys);
}
fsys->unk7E = 0;
fsys->unk7C = 0;
if (sub_020506F4(encounter, fsys) == 0) {
if (encounter->setup->flags & (1 << 11)) {
HealParty(SavArray_PlayerParty_get(fsys->savedata));
@ -113,11 +113,11 @@ static BOOL sub_02050738(TaskManager *man) {
return TRUE;
}
}
if (ScriptState_CheckHaveFollower(SavArray_Flags_get(fsys->savedata))) {
HealParty(SavArray_PlayerParty_get(fsys->savedata));
}
sub_02051660(fsys, encounter->setup);
sub_020552A4(man);
(*state)++;
@ -131,7 +131,7 @@ static BOOL sub_02050738(TaskManager *man) {
Encounter_Delete(encounter);
return TRUE;
}
return FALSE;
}
@ -150,7 +150,7 @@ static void sub_0205087C(int a0, FieldSystem *fsys) {
case 5:
sub_02034AC0(fsys->savedata, -1);
break;
}
}
@ -158,7 +158,7 @@ static BOOL sub_020508B8(TaskManager *man) {
FieldSystem *fsys = TaskManager_GetSys(man);
ENCOUNTER *encounter = TaskManager_GetEnv(man);
int *state = TaskManager_GetStatePtr(man);
switch (*state) {
case 0:
sub_02055218(man, encounter->effect, encounter->bgm);
@ -192,7 +192,7 @@ static BOOL sub_02050960(TaskManager *man) {
FieldSystem *fsys = TaskManager_GetSys(man);
ENCOUNTER *encounter = TaskManager_GetEnv(man);
int *state = TaskManager_GetStatePtr(man);
switch (*state) {
case 0:
sub_02004AD8(0);
@ -219,7 +219,7 @@ static BOOL sub_020509F0(TaskManager *man) {
FieldSystem *fsys = TaskManager_GetSys(man);
ENCOUNTER *encounter = TaskManager_GetEnv(man);
int *state = TaskManager_GetStatePtr(man);
switch (*state) {
case 0:
sub_02055218(man, encounter->effect, encounter->bgm);
@ -235,14 +235,14 @@ static BOOL sub_020509F0(TaskManager *man) {
break;
case 3:
sub_02052444(encounter->setup, fsys);
if (fsys->unkA0 != NULL) {
sub_02067484(fsys, &encounter->setup->unk78);
}
sub_020506F4(encounter, fsys);
sub_020552A4(man);
(*state)++;
break;
case 4:
@ -283,11 +283,11 @@ static BOOL Task_SafariEncounter(TaskManager *man);
static BOOL Task_BugContestEncounter(TaskManager *man);
static BOOL Task_WildEncounter(TaskManager *man);
void sub_02050B08(FieldSystem *fsys, BATTLE_SETUP *setup) {
void sub_02050B08(FieldSystem *fsys, BATTLE_SETUP *setup) {
SCRIPT_STATE *flags = SavArray_Flags_get(fsys->savedata);
int a0 = sub_020517E8(setup);
int a1 = sub_020517FC(setup);
if (ScriptState_CheckSafariSysFlag(flags)) {
ENCOUNTER *encounter = Encounter_New(setup, a0, a1, NULL);
FieldSys_CreateTask(fsys, Task_SafariEncounter, encounter);
@ -304,7 +304,7 @@ void sub_02050B90(FieldSystem *fsys, TaskManager *man, BATTLE_SETUP *setup) {
SCRIPT_STATE *flags = SavArray_Flags_get(fsys->savedata);
int a0 = sub_020517E8(setup);
int a1 = sub_020517FC(setup);
if (ScriptState_CheckSafariSysFlag(flags)) {
ENCOUNTER *encounter = Encounter_New(setup, a0, a1, NULL);
TaskManager_Jump(man, Task_SafariEncounter, encounter);
@ -320,7 +320,7 @@ void sub_02050B90(FieldSystem *fsys, TaskManager *man, BATTLE_SETUP *setup) {
static BOOL Task_WildEncounter(TaskManager *man) {
FieldSystem *fsys = TaskManager_GetSys(man);
WILD_ENCOUNTER *encounter = TaskManager_GetEnv(man);
switch (encounter->state) {
case 0:
MapObjectMan_PauseAllMovement(fsys->mapObjectMan);
@ -340,20 +340,20 @@ static BOOL Task_WildEncounter(TaskManager *man) {
sub_02050724(encounter->setup, fsys);
sub_02093070(fsys);
sub_020930C4(fsys);
if (IsBattleResultWin(encounter->setup->winFlag) == FALSE) {
WildEncounter_Delete(encounter);
TaskManager_Jump(man, Task_BlackOut, NULL);
return FALSE;
}
if (ScriptState_CheckHaveFollower(SavArray_Flags_get(fsys->savedata))) {
HealParty(SavArray_PlayerParty_get(fsys->savedata));
}
sub_02051660(fsys, encounter->setup);
sub_020552A4(man);
encounter->state++;
break;
case 4:
@ -375,7 +375,7 @@ static BOOL Task_SafariEncounter(TaskManager *man) {
ENCOUNTER *encounter = TaskManager_GetEnv(man);
int *state = TaskManager_GetStatePtr(man);
u16 *safariBall = FlyPoints_GetSafariBallsCounter(Save_FlyPoints_get(fsys->savedata));
switch (*state) {
case 0:
MapObjectMan_PauseAllMovement(fsys->mapObjectMan);
@ -399,9 +399,9 @@ static BOOL Task_SafariEncounter(TaskManager *man) {
sub_02093070(fsys);
sub_020930C4(fsys);
}
sub_02051660(fsys, encounter->setup);
if (*safariBall == 0 && encounter->setup->winFlag != 4) {
Location *loc = FlyPoints_GetDynamicWarp(Save_FlyPoints_get(fsys->savedata));
sub_020537A8(man, loc);
@ -409,7 +409,7 @@ static BOOL Task_SafariEncounter(TaskManager *man) {
*state = 5;
return FALSE;
}
(*state)++;
break;
case 4:
@ -426,7 +426,7 @@ static BOOL Task_SafariEncounter(TaskManager *man) {
(*state)++;
break;
case 7:
if (*safariBall == 0) {
if (*safariBall == 0) {
if(encounter->setup->winFlag == 4) {
QueueScript(man, std_safari_balls_out, NULL, NULL);
}
@ -452,7 +452,7 @@ static BOOL Task_BugContestEncounter(TaskManager *man) {
BUGCONTEST *contest = FieldSys_BugContest_get(fsys);
int *state = TaskManager_GetStatePtr(man);
u16 *sportBall = BugContest_GetSportBallsAddr(contest);
switch (*state) {
case 0:
MapObjectMan_PauseAllMovement(fsys->mapObjectMan);
@ -475,9 +475,9 @@ static BOOL Task_BugContestEncounter(TaskManager *man) {
TaskManager_Jump(man, sub_0205298C, NULL);
return FALSE;
}
sub_02051660(fsys, encounter->setup);
if (encounter->setup->winFlag == 4) {
sub_0206DB94(man, encounter->setup->unk1C8);
sub_02093070(fsys);
@ -517,13 +517,13 @@ void SetupAndStartWildBattle(TaskManager *man, u16 mon, u8 level, int *winFlag,
setup = BattleSetup_New(HEAP_ID_FIELDMAP, 0);
BattleSetup_InitFromFsys(setup, fsys);
ov02_02247F30(fsys, mon, level, shiny, setup);
if (canFlee) {
setup->unkCC |= 8;
}
GameStats_Inc(Sav2_GameStats_get(fsys->savedata), 8);
sub_0205085C(man, setup, sub_020517E8(setup), sub_020517FC(setup), winFlag);
}
@ -531,23 +531,23 @@ void sub_02051090(TaskManager *man, u16 species, u8 level, int *winFlag, BOOL ca
BATTLE_SETUP *setup;
FieldSystem *fsys;
int var;
fsys = TaskManager_GetSys(man);
setup = BattleSetup_New(HEAP_ID_FIELDMAP, 0);
BattleSetup_InitFromFsys(setup, fsys);
ov02_02247F30(fsys, species, level, 0, setup);
var = 1;
SetMonData(GetPartyMonByIndex(setup->party[1], 0), 110, &var);
if (canRun) {
setup->unkCC |= 8;
}
GameStats_Inc(Sav2_GameStats_get(fsys->savedata), 8);
sub_0205085C(man, setup, sub_020517E8(setup), sub_020517FC(setup), winFlag);
}
@ -555,7 +555,7 @@ static BOOL Task_PalParkEncounter(TaskManager *man) {
FieldSystem *fsys = TaskManager_GetSys(man);
ENCOUNTER *encounter = TaskManager_GetEnv(man);
int *state = TaskManager_GetStatePtr(man);
switch(*state) {
case 0:
MapObjectMan_PauseAllMovement(fsys->mapObjectMan);
@ -606,13 +606,13 @@ void sub_02051228(TaskManager *man, u16 species, u8 level) {
FieldSystem *fsys = TaskManager_GetSys(man);
BATTLE_SETUP *setup = BattleSetup_New(HEAP_ID_FIELDMAP, 0);
BattleSetup_InitFromFsys(setup, fsys);
ov02_02247F30(fsys, species, level, 0, setup);
setup->unkCC = 1;
GameStats_Inc(Sav2_GameStats_get(fsys->savedata), 8);
sub_0205085C(man, setup, sub_020517E8(setup), sub_020517FC(setup), NULL);
}
@ -620,7 +620,7 @@ static BOOL Task_TutorialBattle(TaskManager *man) {
ENCOUNTER *encounter = TaskManager_GetEnv(man);
FieldSystem *fsys = TaskManager_GetSys(man);
int *state = TaskManager_GetStatePtr(man);
switch(*state) {
case 0:
MapObjectMan_PauseAllMovement(fsys->mapObjectMan);
@ -658,11 +658,11 @@ void SetupAndStartTutorialBattle(TaskManager *man) {
ENCOUNTER *encounter;
BATTLE_SETUP *setup;
FieldSystem *fsys;
fsys = TaskManager_GetSys(man);
setup = sub_02051AAC(HEAP_ID_FIELDMAP, fsys);
encounter = Encounter_New(setup, sub_020517E8(setup), sub_020517FC(setup), NULL);
TaskManager_Call(man, Task_TutorialBattle, encounter);
}
@ -671,7 +671,7 @@ void SetupAndStartTrainerBattle(TaskManager *man, u32 opponentTrainer1, u32 oppo
ENCOUNTER *encounter;
BATTLE_SETUP *setup;
FieldSystem *fsys = TaskManager_GetSys(man);
if (opponentTrainer2 != 0 && opponentTrainer1 != opponentTrainer2) {
if (followerTrainerNum == 0) {
battleFlags = 0x13;
@ -686,7 +686,7 @@ void SetupAndStartTrainerBattle(TaskManager *man, u32 opponentTrainer1, u32 oppo
battleFlags |= (1 << 11);
}
}
setup = BattleSetup_New(HEAP_ID_FIELDMAP, battleFlags);
BattleSetup_InitFromFsys(setup, fsys);
@ -695,9 +695,9 @@ void SetupAndStartTrainerBattle(TaskManager *man, u32 opponentTrainer1, u32 oppo
setup->trainerId[2] = followerTrainerNum;
EnemyTrainerSet_Init(setup, fsys->savedata, heapId);
GameStats_Inc(Sav2_GameStats_get(fsys->savedata), 9);
if (a5) {
if (battleFlags & 8) {
setup->unk1CE = 0;
@ -705,7 +705,7 @@ void SetupAndStartTrainerBattle(TaskManager *man, u32 opponentTrainer1, u32 oppo
setup->unk1CD = 0;
}
}
sub_0205085C(man, setup, sub_020517E8(setup), sub_020517FC(setup), winFlag);
}
@ -715,12 +715,12 @@ void sub_02051428(TaskManager *man, void *a1, int battleFlags) {
FieldSystem *fsys;
ENCOUNTER *encounter;
BATTLE_SETUP *setup;
fsys = TaskManager_GetSys(man);
setup = BattleSetup_New(HEAP_ID_FIELDMAP, battleFlags);
sub_020522F0(setup, fsys, a1);
encounter = Encounter_New(setup, sub_020517E8(setup), sub_020517FC(setup), NULL);
TaskManager_Call(man, sub_020508B8, encounter);
}
@ -728,7 +728,7 @@ void sub_02051428(TaskManager *man, void *a1, int battleFlags) {
static int sub_02051474(void *a0, int battleFlags) {
int var = sub_02029264(a0);
int mode;
if (battleFlags & 8) {
mode = 14;
} else if (battleFlags & 2) {
@ -736,7 +736,7 @@ static int sub_02051474(void *a0, int battleFlags) {
} else {
mode = 0;
}
if (var != 255) {
mode += 1 + ov03_02256B40(var);
}
@ -748,9 +748,9 @@ void sub_020514A4(TaskManager *man, int target, int maxLevel, int flag) {
ENCOUNTER *encounter;
BATTLE_SETUP *setup;
int result, mode;
fsys = TaskManager_GetSys(man);
if (flag == 0) {
setup = BattleSetup_New(HEAP_ID_FIELDMAP, 5);
mode = 0;
@ -759,23 +759,23 @@ void sub_020514A4(TaskManager *man, int target, int maxLevel, int flag) {
mode = 7;
} else {
setup = BattleSetup_New(HEAP_ID_FIELDMAP, 143);
setup->trainerId[1] = 1;
setup->trainerId[3] = 2;
EnemyTrainerSet_Init(setup, fsys->savedata, HEAP_ID_FIELDMAP);
mode = 14;
}
sub_02051F2C(setup, fsys, maxLevel);
sub_0202FBF0(fsys->savedata, HEAP_ID_FIELDMAP, &result);
setup->unk1B2 = mode;
encounter = Encounter_New(setup, sub_020517E8(setup), sub_020517FC(setup), NULL);
encounter = Encounter_New(setup, sub_020517E8(setup), sub_020517FC(setup), NULL);
encounter->unkC = target;
TaskManager_Call(man, sub_02050960, encounter);
}
@ -783,7 +783,7 @@ static BOOL sub_02051540(TaskManager *man) {
FieldSystem *fsys = TaskManager_GetSys(man);
ENCOUNTER *encounter = TaskManager_GetEnv(man);
int *state = TaskManager_GetStatePtr(man);
switch (*state) {
case 0:
TaskManager_Call(man, sub_020508B8, encounter);
@ -803,15 +803,15 @@ void sub_02051598(FieldSystem *fsys, void *a1, int battleFlags) {
ENCOUNTER *encounter;
BATTLE_SETUP *setup;
int var;
setup = BattleSetup_New(HEAP_ID_FIELDMAP, battleFlags);
sub_020522F0(setup, fsys, a1);
sub_0202FBF0(fsys->savedata, HEAP_ID_FIELDMAP, &var);
setup->unk1B2 = sub_02051474(fsys->unkA4, battleFlags);
encounter = Encounter_New(setup, sub_020517E8(setup), sub_020517FC(setup), NULL);
FieldSys_CreateTask(fsys, sub_02051540, encounter);
}
@ -819,15 +819,15 @@ void sub_020515FC(FieldSystem *fsys, PARTY *party, int battleFlags) {
ENCOUNTER *encounter;
BATTLE_SETUP *setup;
int var;
setup = BattleSetup_New(HEAP_ID_FIELDMAP, battleFlags);
sub_020520B0(setup, fsys, party, NULL);
sub_0202FBF0(fsys->savedata, HEAP_ID_FIELDMAP, &var);
setup->unk1B2 = sub_02051474(fsys->unkA4, battleFlags);
encounter = Encounter_New(setup, sub_020517E8(setup), sub_020517FC(setup), NULL);
FieldSys_CreateTask(fsys, sub_02051540, encounter);
}
@ -835,11 +835,11 @@ static void sub_02051660(FieldSystem *fsys, BATTLE_SETUP *setup) {
POKEMON *mon;
u32 battleFlags = setup->flags;
int winFlag = setup->winFlag;
if (battleFlags & 4 || battleFlags & 0x80) {
return;
}
if (battleFlags == 0 || battleFlags == 0x100 || battleFlags == 0x4A) {
if (winFlag == 1) {
GameStats_AddSpecial(Sav2_GameStats_get(fsys->savedata), 9);
@ -853,7 +853,7 @@ static void sub_02051660(FieldSystem *fsys, BATTLE_SETUP *setup) {
}
} else if ((battleFlags & 1) || (battleFlags & 0x10)) {
if (winFlag == 1) {
GameStats_AddSpecial(Sav2_GameStats_get(fsys->savedata), 12);
GameStats_AddSpecial(Sav2_GameStats_get(fsys->savedata), 12);
}
} else if ((battleFlags & 0x20 || battleFlags & 0x200) && winFlag == 4) {
mon = GetPartyMonByIndex(setup->party[1], 0);

View File

@ -684,7 +684,7 @@ void sub_0205CAA4(FIELD_PLAYER_AVATAR* avatar, u8 unkA) {
if (unkA == 1) {
sub_0205C728(avatar, 8);
}
else {
else {
sub_0205C730(avatar, 8);
}
}

View File

@ -35,7 +35,7 @@ static const u32 sRoamerLocations[ROAMER_LOC_COUNT] = {
MAP_R44,
MAP_R45,
MAP_R46,
// Kanto
MAP_R01,
MAP_R02,
@ -82,7 +82,7 @@ static const struct RoamerAdjacency sRoamerAdjacencyTable[ROAMER_LOC_COUNT] = {
{3, {ROAMER_LOC_R42, ROAMER_LOC_R43, ROAMER_LOC_R46, -1,-1,-1}},
{2, {ROAMER_LOC_R44, ROAMER_LOC_R46, -1,-1,-1,-1}},
{2, {ROAMER_LOC_R29, ROAMER_LOC_R45, -1,-1,-1,-1}},
// Kanto
{2, {ROAMER_LOC_R02, ROAMER_LOC_R22, -1,-1,-1,-1}},
{3, {ROAMER_LOC_R01, ROAMER_LOC_R22, ROAMER_LOC_R03, -1,-1,-1}},

View File

@ -47,7 +47,7 @@ static BOOL FieldSys_Main(FieldSystem *fsys);
BOOL Field_Continue_AppInit(OVY_MANAGER *man, int *unused) {
FsysInitWork *args = OverlayManager_GetArgs(man);
sFieldSysPtr = FieldSys_New(man);
if (args->unk4) {
CallFieldTask_ContinueGame_CommError(sFieldSysPtr);
} else {
@ -99,7 +99,7 @@ void sub_0203DF34(FieldSystem *fsys) {
u8 sub_0203DF3C(FieldSystem *fsys) {
GF_ASSERT(fsys->unk_110 == 0 || fsys->unk_110 == 1);
return fsys->unk_110;
}
@ -135,7 +135,7 @@ FieldSystem *FieldSys_New(OVY_MANAGER *man) {
FieldSystem *fsys = OverlayManager_CreateAndGetData(man, sizeof(FieldSystem), 11);
MI_CpuFill8(fsys, 0, sizeof(FieldSystem));
fsys->unk0 = AllocFromHeap(11, sizeof(struct FieldSystemUnkSub0));
fsys->unk0->unk0 = NULL;
fsys->unk0->unk4 = NULL;
fsys->unk0->unk8 = FALSE;
@ -244,7 +244,7 @@ void sub_0203E15C(FieldSystem *fsys) {
}
if (gSystem.newKeys & PAD_BUTTON_A) {
ov01_021EFACC(fsys->unk4->unk8);
}
}
flag = 0;
if (sub_0203E324()) {
flag = ov35_02259DB8();

View File

@ -193,32 +193,32 @@ BOOL MetatileBehavior_IsWhirlpool(u8 tile) {
}
BOOL sub_0205B8F4(u8 tile) {
return tile == TILE_BEHAVIOR_50 ||
tile == TILE_BEHAVIOR_52 ||
tile == TILE_BEHAVIOR_53 ||
tile == TILE_BEHAVIOR_60 ||
return tile == TILE_BEHAVIOR_50 ||
tile == TILE_BEHAVIOR_52 ||
tile == TILE_BEHAVIOR_53 ||
tile == TILE_BEHAVIOR_60 ||
tile == TILE_BEHAVIOR_73;
}
BOOL sub_0205B918(u8 tile) {
return tile == TILE_BEHAVIOR_51 ||
tile == TILE_BEHAVIOR_54 ||
tile == TILE_BEHAVIOR_55 ||
tile == TILE_BEHAVIOR_61 ||
return tile == TILE_BEHAVIOR_51 ||
tile == TILE_BEHAVIOR_54 ||
tile == TILE_BEHAVIOR_55 ||
tile == TILE_BEHAVIOR_61 ||
tile == TILE_BEHAVIOR_73;
}
BOOL sub_0205B93C(u8 tile) {
return tile == TILE_BEHAVIOR_49 ||
tile == TILE_BEHAVIOR_53 ||
tile == TILE_BEHAVIOR_55 ||
return tile == TILE_BEHAVIOR_49 ||
tile == TILE_BEHAVIOR_53 ||
tile == TILE_BEHAVIOR_55 ||
tile == TILE_BEHAVIOR_74;
}
BOOL sub_0205B960(u8 tile) {
return tile == TILE_BEHAVIOR_48 ||
tile == TILE_BEHAVIOR_52 ||
tile == TILE_BEHAVIOR_54 ||
return tile == TILE_BEHAVIOR_48 ||
tile == TILE_BEHAVIOR_52 ||
tile == TILE_BEHAVIOR_54 ||
tile == TILE_BEHAVIOR_74;
}
@ -235,10 +235,10 @@ BOOL sub_0205B9AC(u8 tile) {
}
BOOL sub_0205B9B8(u8 tile) {
return tile == TILE_BEHAVIOR_16 ||
tile == TILE_BEHAVIOR_22 ||
tile == TILE_BEHAVIOR_29 ||
tile == TILE_BEHAVIOR_32 ||
return tile == TILE_BEHAVIOR_16 ||
tile == TILE_BEHAVIOR_22 ||
tile == TILE_BEHAVIOR_29 ||
tile == TILE_BEHAVIOR_32 ||
tile == TILE_BEHAVIOR_45;
}
@ -271,8 +271,8 @@ BOOL sub_0205BA24(u8 tile) {
}
BOOL sub_0205BA30(u8 tile) {
return tile == TILE_BEHAVIOR_113 ||
tile == TILE_BEHAVIOR_114 ||
return tile == TILE_BEHAVIOR_113 ||
tile == TILE_BEHAVIOR_114 ||
tile == TILE_BEHAVIOR_115;
}
@ -293,8 +293,8 @@ u8 sub_0205BA6C(void) {
}
BOOL sub_0205BA70(u8 tile) {
return tile == TILE_BEHAVIOR_29 ||
tile == TILE_BEHAVIOR_32 ||
return tile == TILE_BEHAVIOR_29 ||
tile == TILE_BEHAVIOR_32 ||
tile == TILE_BEHAVIOR_45;
}
@ -319,8 +319,8 @@ BOOL sub_0205BAC4(u8 tile) {
}
BOOL sub_0205BAD0(u8 tile) {
return tile == TILE_BEHAVIOR_0 ||
tile == TILE_BEHAVIOR_33 ||
return tile == TILE_BEHAVIOR_0 ||
tile == TILE_BEHAVIOR_33 ||
tile == TILE_BEHAVIOR_164;
}

View File

@ -63,7 +63,7 @@ BOOL PartyMenu_AnimateIconFormeChange(PartyMenuStruct* unkPtr) {
default:
GF_ASSERT(FALSE);
break;
}
}
Pokedex_SetMonCaughtFlag(Sav2_Pokedex_get(FieldSys_GetSaveDataPtr(unkPtr->unk654->fsys)), pokemon);
work->state++;
break;
@ -154,13 +154,13 @@ static void _EmitParticles(IconFormeChangeWork* unkPtr) {
sub_0201526C(unkPtr->particleSystem, sub_02015264(NARC_a_2_0_6, unkPtr->fileId, HEAPID_PARTY_MENU), 0xA, 1);
switch (unkPtr->species) {
case SPECIES_GIRATINA:
case SPECIES_GIRATINA:
sub_02015494(unkPtr->particleSystem, 0, particleEmitCallback, unkPtr);
sub_02015494(unkPtr->particleSystem, 1, particleEmitCallback, unkPtr);
sub_02015494(unkPtr->particleSystem, 2, particleEmitCallback, unkPtr);
PlaySE(SEQ_SE_PL_W467109);
break;
case SPECIES_SHAYMIN:
case SPECIES_SHAYMIN:
sub_02015494(unkPtr->particleSystem, 0, particleEmitCallback, unkPtr);
sub_02015494(unkPtr->particleSystem, 1, particleEmitCallback, unkPtr);
PlaySE(SEQ_SE_PL_W363);
@ -204,15 +204,15 @@ static u32 texAlloc(u32 szByte, BOOL is4x4comp) {
NNSGfdTexKey unkC = NNS_GfdDefaultFuncAllocTexVram(szByte, is4x4comp, 0);
GF_ASSERT(unkC != NNS_GFD_ALLOC_ERROR_TEXKEY);
sub_02015354(unkC);
return NNS_GfdGetTexKeyAddr(unkC);
}
static u32 plttAlloc(u32 szByte, BOOL is4pltt) {
NNSGfdPlttKey unkC = NNS_GfdDefaultFuncAllocPlttVram(szByte, is4pltt, 1);
GF_ASSERT(unkC != NNS_GFD_ALLOC_ERROR_PLTTKEY);
sub_02015394(unkC);

View File

@ -80,7 +80,7 @@ static int TCardAppRunStep_Init(TrainerCardAppState *work) {
TrainerCardMainApp_OvyInit,
TrainerCardMainApp_OvyExec,
TrainerCardMainApp_OvyExit,
FS_OVERLAY_ID(trainer_card_main)
FS_OVERLAY_ID(trainer_card_main)
};
work->ov_mgr = OverlayManager_new(&template, work->parentData, work->heap_id);
@ -99,10 +99,10 @@ static int TCardAppRunStep_Exec(TrainerCardAppState *work) {
static int TCardAppRunStep_SignatureInit(TrainerCardAppState *work) {
const OVY_MGR_TEMPLATE template = {
SignBackOfTrainerCardApp_OvyInit,
SignBackOfTrainerCardApp_OvyExec,
SignBackOfTrainerCardApp_OvyInit,
SignBackOfTrainerCardApp_OvyExec,
SignBackOfTrainerCardApp_OvyExit,
FS_OVERLAY_ID(trainer_card_signature)
FS_OVERLAY_ID(trainer_card_signature)
};
work->ov_mgr = OverlayManager_new(&template, work->parentData->saveData, work->heap_id);
return TRAINERCARD_RUN_SIGNATURE_EXEC;

View File

@ -18,7 +18,7 @@ static void MonAdjustMood(POKEMON *pokemon, s8 unk1) {
mood = GetMonData(pokemon, MON_DATA_MOOD, NULL);
adjustedMood = mood + unk1;
if (adjustedMood > 127) {
adjustedMood = 127;
} else if (adjustedMood < -127) {
@ -32,7 +32,7 @@ static void MonAdjustMood(POKEMON *pokemon, s8 unk1) {
static s8 ItemIdGetMoodEffect(u16 itemId) {
s8 moodEffect = 0;
switch (itemId) {
case ITEM_RARE_CANDY:
moodEffect = 40;
@ -92,7 +92,7 @@ void ApplyItemEffectOnMonMood(POKEMON *pokemon, u16 itemId) {
void ApplyMonMoodModifier(POKEMON *pokemon, int modifierId) {
s8 mood;
u16 species;
u16 species;
s32 adjustedMood;
species = GetMonData(pokemon, MON_DATA_SPECIES2, NULL);

View File

@ -52,7 +52,7 @@ BOOL ScrCmd_509(SCRIPTCONTEXT *ctx) {
return FALSE;
}
BOOL ScrCmd_510(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_510(SCRIPTCONTEXT *ctx) {
struct UnkStruct_0202EB30 *unkStruct = sub_020270F8(ctx->fsys->savedata);
PC_STORAGE *storage = GetStoragePCPointer(ctx->fsys->savedata);
POKEMON *pokemon = AllocMonZeroed(32);

View File

@ -95,7 +95,7 @@ BOOL ScrCmd_GetTrainerNum(SCRIPTCONTEXT *ctx) {
return FALSE;
}
BOOL ScrCmd_TrainerBattle(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_TrainerBattle(SCRIPTCONTEXT *ctx) {
FieldSystem *fsys = ctx->fsys;
u16 *script = FieldSysGetAttrAddr(fsys, SCRIPTENV_SCRIPT);
u32 *scriptUnk0C = FieldSysGetAttrAddr(fsys, SCRIPTENV_0C);
@ -182,7 +182,7 @@ BOOL ScrCmd_GetRematchMsgParams(SCRIPTCONTEXT *ctx) {
return FALSE;
}
BOOL ScrCmd_TrainerIsDoubleBattle(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_TrainerIsDoubleBattle(SCRIPTCONTEXT *ctx) {
u16 *script = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_SCRIPT);
u16 *retDoubleBattle = ScriptGetVarPointer(ctx);
*retDoubleBattle = TrainerNumIsDouble(ScriptNumToTrainerNum(*script));
@ -236,7 +236,7 @@ BOOL ScrCmd_PartyCheckForDouble(SCRIPTCONTEXT *ctx) {
return FALSE;
}
BOOL ScrCmd_223(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_223(SCRIPTCONTEXT *ctx) {
u32 *scriptUnk0C = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_0C);
SetupAndStartTrainerBattle(ctx->taskman, 1, 0, 0, 0, 0, 11, scriptUnk0C);
return TRUE;
@ -258,6 +258,6 @@ BOOL ScrCmd_GotoIfTrainerDefeated(SCRIPTCONTEXT *ctx) {
if (TrainerFlagCheck(fsys->savedata, (u16)mapObjectId) == TRUE) {
ScriptJump(ctx, ctx->script_ptr + offset);
return TRUE;
}
}
return FALSE;
}

View File

@ -29,13 +29,13 @@ BOOL ScrCmd_LotoIdSearch(SCRIPTCONTEXT *ctx) {
u16 *retPtr2 = ScriptGetVarPointer(ctx);
u16 lotoId = ScriptGetVar(ctx);
u16 partyCount;
u16 monDigit;
u16 monPosition;
u16 i;
u32 otid;
u8 digitCount;
u16 boxDigit;
u16 boxPosition;
u32 ii;

View File

@ -1,6 +1,6 @@
#include "scrcmd.h"
extern WINDOW *Fsys_ShowMoneyBox(FieldSystem *, u8, u8);
extern WINDOW *Fsys_ShowMoneyBox(FieldSystem *, u8, u8);
BOOL ScrCmd_ShowMoneyBox(SCRIPTCONTEXT *ctx) {
FieldSystem *fsys = ctx->fsys;

View File

@ -44,7 +44,7 @@ static void CreateMoveRelearner(SCRIPTCONTEXT *ctx, int a1, POKEMON *pokemon, u1
*unkAC = moveRelearner;
moveRelearner->pokemon = pokemon;
moveRelearner->profile = Sav2_PlayerData_GetProfileAddr(FieldSys_GetSaveDataPtr(ctx->fsys));
moveRelearner->profile = Sav2_PlayerData_GetProfileAddr(FieldSys_GetSaveDataPtr(ctx->fsys));
moveRelearner->options = Sav2_PlayerData_GetOptionsAddr(ctx->fsys->savedata);
moveRelearner->eligibleMoves = eligibleMoves;
moveRelearner->unk_19 = a1;

View File

@ -116,7 +116,7 @@ BOOL ScrCmd_MonHasMove(SCRIPTCONTEXT *ctx) {
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
*hasMove = FALSE;
if (GetMonData(pokemon, MON_DATA_IS_EGG, NULL)) {
return FALSE;
return FALSE;
}
if (GetMonData(pokemon, MON_DATA_MOVE1, NULL) == move || GetMonData(pokemon, MON_DATA_MOVE2, NULL) == move ||
@ -254,7 +254,7 @@ BOOL ScrCmd_MonAddFriendship(SCRIPTCONTEXT *ctx) {
if (GetMonData(pokemon, MON_DATA_POKEBALL, NULL) == BALL_LUXURY) {
friendshipModifier++;
}
if (map == GetMonData(pokemon, MON_DATA_EGG_MET_LOCATION, NULL)) {
friendshipModifier++;
}
@ -324,7 +324,7 @@ BOOL ScrCmd_GetMonTypes(SCRIPTCONTEXT *ctx) {
*type1 = GetMonData(pokemon, MON_DATA_TYPE_1, NULL);
*type2 = GetMonData(pokemon, MON_DATA_TYPE_2, NULL);
return FALSE;
return FALSE;
}
BOOL ScrCmd_GetPartyCount(SCRIPTCONTEXT *ctx) {
@ -768,7 +768,7 @@ BOOL ScrCmd_MonHasItem(SCRIPTCONTEXT *ctx) {
}
}
return FALSE;
return FALSE;
}
BOOL ScrCmd_GetPartymonForme(SCRIPTCONTEXT *ctx) {

View File

@ -73,7 +73,7 @@ static LocalMapObject *ov01_02201F98(MapObjectMan *mapObjectMan, u8 unkA, u16 sp
extern u16 ov01_02209AE0[10];
BOOL ScrCmd_648(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_648(SCRIPTCONTEXT *ctx) {
int i;
u32 out_1;
int out_2;
@ -87,7 +87,7 @@ BOOL ScrCmd_648(SCRIPTCONTEXT *ctx) {
u16 *cursorPos;
u16 *itemsAbove;
WINDOW *window;
MSGFMT **msgfmt;
MSGFMT **msgfmt;
MSGDATA *msgdata;
FieldSystem *fsys = ctx->fsys;
@ -178,7 +178,7 @@ static void ov01_02200CBC(FieldSystem *fsys, SCR_648_STRUCT *unkPtr, u8 x, u8 y,
unkPtr->window_18 = window;
unkPtr->unk_204 = 3;
unkPtr->unk_6F4 = a4;
for (i = 0; i < 0x78; i++) {
unkPtr->items[i].text = NULL;
unkPtr->items[i].value = 0;
@ -296,7 +296,7 @@ static void ov01_022010CC(SysTask *sysTask, void *work) {
PlaySE(SEQ_SE_DP_SELECT);
*unkPtr->input = -2;
ov01_0220116C(unkPtr);
}
}
case -1:
break;
default:
@ -324,7 +324,7 @@ static void ov01_0220116C(SCR_648_STRUCT *unkPtr) {
}
DestroySysTask(unkPtr->sysTask);
FreeToHeap(unkPtr);
}
@ -449,7 +449,7 @@ BOOL ScrCmd_CountTranformedRotomsInParty(SCRIPTCONTEXT *ctx) {
FieldSystem *fsys = ctx->fsys;
u16 *rotomCount = GetVarPointer(ctx->fsys, ScriptReadHalfword(ctx));
u16 *firstIndex = GetVarPointer(ctx->fsys, ScriptReadHalfword(ctx));
count = 0;
*firstIndex = 255;
@ -489,7 +489,7 @@ BOOL ScrCmd_GetHiddenPowerType(SCRIPTCONTEXT *ctx) {
int partyIndex = VarGet(ctx->fsys, ScriptReadHalfword(ctx));
u16 *typePtr = GetVarPointer(ctx->fsys, ScriptReadHalfword(ctx));
POKEMON *mon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), partyIndex);
u16 species = GetMonData(mon, MON_DATA_SPECIES, 0);
if (GetMonData(mon, MON_DATA_IS_EGG, 0) == FALSE) {
@ -591,8 +591,8 @@ BOOL ScrCmd_699(SCRIPTCONTEXT *ctx) {
FieldSystem *fsys;
MapObjectMan *mapObjectMan;
LocalMapObject *playerObj;
LocalMapObject *curObj;
u32 *unkPtr;
LocalMapObject *curObj;
u32 *unkPtr;
int height;
int unkMeasure;
BOOL flag;
@ -608,7 +608,7 @@ BOOL ScrCmd_699(SCRIPTCONTEXT *ctx) {
height = vec.y;
while (sub_0205EEF4(mapObjectMan, &curObj, &unkVar, 1) == TRUE) {
while (sub_0205EEF4(mapObjectMan, &curObj, &unkVar, 1) == TRUE) {
if (curObj == playerObj) continue;
MapObject_SetFlagsBits(curObj, MAPOBJECTFLAG_UNK13);
if (MapObject_TestFlagsBits(curObj, MAPOBJECTFLAG_UNK12) == TRUE) {
@ -631,18 +631,18 @@ BOOL ScrCmd_700(SCRIPTCONTEXT *ctx) {
FieldSystem *fsys;
MapObjectMan *mapObjectMan;
LocalMapObject *playerObj;
LocalMapObject *curObj;
LocalMapObject *curObj;
fsys = ctx->fsys;
mapObjectMan = fsys->mapObjectMan;
playerObj = PlayerAvatar_GetMapObject(fsys->playerAvatar);
while (sub_0205EEF4(mapObjectMan, &curObj, &index, MAPOBJECTFLAG_ACTIVE) == TRUE) {
if (curObj == playerObj) continue;
MapObject_ClearFlagsBits(curObj, MAPOBJECTFLAG_UNK13);
}
return FALSE;
}
@ -823,7 +823,7 @@ BOOL ScrCmd_GetTotalApricornCount(SCRIPTCONTEXT *ctx) {
u32 cnt;
u16 *unkPtr = GetVarPointer(ctx->fsys, ScriptReadHalfword(ctx));
cnt = 0;
SaveApricornBox *apricornBox = Save_ApricornBox_get(ctx->fsys->savedata);
SaveApricornBox *apricornBox = Save_ApricornBox_get(ctx->fsys->savedata);
for (i = 0; i < 7; i = i + 1) {
cnt += ApricornBox_CountApricorn(apricornBox, i);
}
@ -852,15 +852,15 @@ BOOL ScrCmd_740(SCRIPTCONTEXT *ctx) {
//Related to aprijuice stand- viewing label
BOOL ScrCmd_741(SCRIPTCONTEXT *ctx) {
UnkStruct_02031CEC unkOut;
RTCDate date;
RTCDate date;
s32 unkVar;
struct MSGFMT **msgfmt;
SaveApricornBox *apricornBox;
u16 *price;
u16 *unkPtrA;
u16 *unkPtrA;
u16 *unkPtrC;
STRING *str;
apricornBox = Save_ApricornBox_get(ctx->fsys->savedata);
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
unkVar = VarGet(ctx->fsys, ScriptReadHalfword(ctx));
@ -910,7 +910,7 @@ BOOL ScrCmd_CreatePokeathlonFriendshipRoomStatues(SCRIPTCONTEXT *ctx) {
s32 i;
u16 species;
FieldSystem *fsys = ctx->fsys;
SavePokeathlonFriendshipRecords *unkPtr = sub_02031B00(fsys->savedata);
for (i = 0; i < 3; i++) {
@ -929,16 +929,16 @@ BOOL ScrCmd_CreatePokeathlonFriendshipRoomStatues(SCRIPTCONTEXT *ctx) {
return TRUE;
}
static LocalMapObject *ov01_02201F98(MapObjectMan *mapObjectMan, u8 unkA, u16 species, u16 forme, u32 gender, u32 x, u32 y, u32 mapId) {
static LocalMapObject *ov01_02201F98(MapObjectMan *mapObjectMan, u8 unkA, u16 species, u16 forme, u32 gender, u32 x, u32 y, u32 mapId) {
LocalMapObject *mapObj;
u32 spriteId;
u32 size;
spriteId = FollowingPokemon_GetSpriteID(species, forme, gender) << 1;
size = GetFollowPokeSizeParamBySpecies(species)*3 + unkA;
mapObj = CreateSpecialFieldObjectEx(mapObjectMan, x, y, DIR_SOUTH, size + 0x19f, 0, mapId, 0, 0, spriteId);
if (!mapObj) {
GF_AssertFail();
}
@ -968,7 +968,7 @@ BOOL ScrCmd_CheckSeenAllLetterUnown(SCRIPTCONTEXT *ctx) {
allUnownSeen = GetVarPointer(ctx->fsys, ScriptReadHalfword(ctx));
pokedex = Sav2_Pokedex_get(ctx->fsys->savedata);
unownFormes = Pokedex_GetSeenFormeNum_Unown(pokedex, 1);
if (unownFormes < 26) {
*allUnownSeen = FALSE;
@ -1001,7 +1001,7 @@ BOOL ScrCmd_GiveTogepiEgg(SCRIPTCONTEXT *ctx) {
PLAYERPROFILE *profile;
PARTY *party;
FieldSystem *fsys = ctx->fsys;
profile = Sav2_PlayerData_GetProfileAddr(fsys->savedata);
party = SavArray_PlayerParty_get(fsys->savedata);
@ -1013,7 +1013,7 @@ BOOL ScrCmd_GiveTogepiEgg(SCRIPTCONTEXT *ctx) {
ZeroMonData(togepi);
SetEggStats(togepi, SPECIES_TOGEPI, 1, profile, 3, sub_02017FE4(1, 0xd));
for (i = 0; i < 4; i++) {
if (!GetMonData(togepi, MON_DATA_MOVE1 + i, 0)) {
break;
@ -1022,9 +1022,9 @@ BOOL ScrCmd_GiveTogepiEgg(SCRIPTCONTEXT *ctx) {
if (i == 4) {
i = 3;
}
}
moveData = MOVE_EXTRASENSORY;
moveData = MOVE_EXTRASENSORY;
SetMonData(togepi, MON_DATA_MOVE1 + i, &moveData);
pp = GetMonData(togepi, MON_DATA_MOVE1MAXPP + i, 0);
@ -1058,11 +1058,11 @@ BOOL ScrCmd_GiveSpikyEarPichu(SCRIPTCONTEXT *ctx) {
u8 forme;
u8 maxPP;
u16 heldItem;
POKEMON *pichu;
POKEMON *pichu;
PARTY *party;
FieldSystem *fsys;
PLAYERPROFILE *profile;
fsys = ctx->fsys;
profile = Sav2_PlayerData_GetProfileAddr(fsys->savedata);
@ -1076,7 +1076,7 @@ BOOL ScrCmd_GiveSpikyEarPichu(SCRIPTCONTEXT *ctx) {
u32 trId = PlayerProfile_GetTrainerID(profile);
u32 unkA = ChangePersonalityToNatureGenderAndAbility(trId, 0xac, NATURE_NAUGHTY, MON_FEMALE, 0, 0);
CreateMon(pichu, SPECIES_PICHU, 30, 0x20, 1, unkA, 1, trId);
forme = 1;
SetMonData(pichu, MON_DATA_FORME, &forme);
@ -1114,9 +1114,9 @@ BOOL ScrCmd_PhotoAlbumIsFull(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_RadioMusicIsPlaying(SCRIPTCONTEXT *ctx) {
u32 musicSeq = VarGet(ctx->fsys, ScriptReadHalfword(ctx));
u16 *isPlaying = GetVarPointer(ctx->fsys, ScriptReadHalfword(ctx));
*isPlaying = (GetRadioMusicPlayingSeq() == musicSeq);
return FALSE;
}
@ -1133,9 +1133,9 @@ static u32 SlotLuckiness(SAVEDATA *savedata, u8 machineId, u8 city) {
u8 randIdx;
u32 i;
s32 j;
friendGroup = Save_FriendGroup_get(savedata);
if (city != 0) { //1 = celadon; 0 = goldenrod
numMachines = 14;
} else {
@ -1151,7 +1151,7 @@ static u32 SlotLuckiness(SAVEDATA *savedata, u8 machineId, u8 city) {
luckValues = AllocFromHeapAtEnd(0x20, numMachines);
MI_CpuFill8(luckValues, 0, numMachines);
i = 0;
dist = sSlotLuckDistribution[city];
@ -1161,7 +1161,7 @@ static u32 SlotLuckiness(SAVEDATA *savedata, u8 machineId, u8 city) {
randIdx = LCRandom() % (s32) numMachines;
} while (luckValues[randIdx] != 0);
luckValues[randIdx] = i + 1;
}
}
}
luckiness = luckValues[machineId];
@ -1271,7 +1271,7 @@ BOOL ScrCmd_GetSealQuantity(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_GiveOrTakeSeal(SCRIPTCONTEXT *ctx) {
u32 sealId = VarGet(ctx->fsys, ScriptReadHalfword(ctx));
u32 quantity = VarGet(ctx->fsys, ScriptReadHalfword(ctx));
GiveOrTakeSeal(Sav2_SealCase_get(ctx->fsys->savedata), sealId, quantity);
return FALSE;
@ -1285,7 +1285,7 @@ static BOOL IsSealNonUnique(u16 sealId, u16 *uniqueSealIds, s32 size) {
return TRUE;
}
}
return FALSE;
}
@ -1333,9 +1333,9 @@ BOOL ScrCmd_GiveRandomSeal(SCRIPTCONTEXT *ctx) {
do {
randVal = LCRandom() % avaliableSeals;
} while (IsSealNonUnique(randVal, givenSealIds, i));
givenSealIds[i] = randVal;
for (j = 0; j < SEAL_MYSTERY; j++) {
if (randVal < sealThresholds[j]) {
uniqueSeals[i] = j + 1;
@ -1361,7 +1361,7 @@ BOOL ScrCmd_CheckKyogreGroudonInParty(SCRIPTCONTEXT *ctx) {
int partyCount;
PARTY *playerParty;
u16 *unkPtr;
u8 kyogreGroudonFlags = 0;
unkPtr = GetVarPointer(ctx->fsys, ScriptReadHalfword(ctx));
@ -1376,12 +1376,12 @@ BOOL ScrCmd_CheckKyogreGroudonInParty(SCRIPTCONTEXT *ctx) {
if (!GetMonData(mon, MON_DATA_IS_EGG, NULL)
&& !GetMonData(mon, MON_DATA_CHECKSUM_FAILED, NULL)
&& !GetMonData(mon, MON_DATA_EGG_MET_LOCATION, NULL)) {
switch (species) {
case SPECIES_KYOGRE:
if (gameVer == 7) {
kyogreGroudonFlags |= 1;
}
}
break;
case SPECIES_GROUDON:
if (gameVer == 8) {
@ -1413,9 +1413,9 @@ BOOL ScrCmd_SysSetSleepFlag(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_BugContestAction(SCRIPTCONTEXT *ctx) {
u8 unkVar1 = *(ctx->script_ptr++);
u32 weekday = VarGet(ctx->fsys, ScriptReadHalfword(ctx));
FieldSystem *fsys = ctx->fsys;
if (unkVar1 == 0) {
fsys->bugContest = BugContest_new(fsys, weekday);
} else {
@ -1438,7 +1438,7 @@ BOOL ScrCmd_BufferBugContestWinner(SCRIPTCONTEXT *ctx) {
return FALSE;
}
BOOL ScrCmd_JudgeBugContest(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_JudgeBugContest(SCRIPTCONTEXT *ctx) {
BUGCONTEST *bugContest;
u16 *prize;
u16 *placement;
@ -1453,7 +1453,7 @@ BOOL ScrCmd_JudgeBugContest(SCRIPTCONTEXT *ctx) {
*placement = bugContest->placement;
*prize = bugContest->prize;
if (bugContest->caught_poke == 0) {
*species = 0;
} else {
@ -1479,14 +1479,14 @@ BOOL ScrCmd_BufferBugContestMonNick(SCRIPTCONTEXT *ctx) {
}
BOOL ScrCmd_BugContestGetTimeLeft(SCRIPTCONTEXT *ctx) {
struct MSGFMT **msgfmt;
struct MSGFMT **msgfmt;
BUGCONTEST *bugContest;
u32 script_index;
u32 timeLeft;
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
script_index = *(ctx->script_ptr++);
script_index = *(ctx->script_ptr++);
timeLeft = 1;
bugContest = FieldSys_BugContest_get(ctx->fsys);

View File

@ -164,7 +164,7 @@ BOOL ScrCmd_ChatotHasCry(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_ChatotStartRecording(SCRIPTCONTEXT *ctx) {
u16 *retPtr = ScriptGetVarPointer(ctx);
GF_ASSERT(sub_02005518());
GF_ASSERT(sub_02005518());
if (!Chatot_startRecording()) {
*retPtr = TRUE;
return FALSE;

View File

@ -94,7 +94,7 @@ void sub_02006DB8() {
BOOL Chatot_startRecording(void) {
MICAutoParam st0;
st0.type = MIC_SAMPLING_TYPE_SIGNED_8BIT;
st0.buffer = sub_020059D8();
st0.size = 2000;

View File

@ -251,7 +251,7 @@ void ReadKeypadAndTouchpad(void) {
gSystem.touchHeld = 0;
return;
}
raw = PAD_Read() | gSystem.simulatedInputs;
gSystem.simulatedInputs = 0;
gSystem.newKeysRaw = raw & (raw ^ gSystem.heldKeysRaw);

View File

@ -45,7 +45,7 @@ struct _2DGfxResObj *Add2DGfxResObjFromHeader(struct _2DGfxResMan *mgr, const st
struct _2DGfxResObj *ret;
struct _2DGfxResHeaderFile *headerFile;
struct _2DGfxResHeaderNarc *headerNarc;
GF_ASSERT(mgr != NULL);
GF_ASSERT(header != NULL);
GF_ASSERT(header->num > idx);

View File

@ -1,7 +1,7 @@
#include "unk_02031AF0.h"
#include "save.h"
u32 sub_02031AF0(void) {
u32 sub_02031AF0(void) {
return sizeof(SavePokeathlonFriendshipRecords);
}

View File

@ -23,7 +23,7 @@
void FieldSys_StartBugContestTimer(FieldSystem* fsys) {
RTCDate date;
RTCTime time;
SYSINFO_RTC* sysinfo = Sav2_SysInfo_RTC_get(fsys->savedata);
SYSINFO_RTC* sysinfo = Sav2_SysInfo_RTC_get(fsys->savedata);
if (!sysinfo->initialized) {
return;
}
@ -46,8 +46,8 @@ void sub_02055450(FieldSystem* fsys, SYSINFO_RTC* sysinfo, RTCDate* date) {
}
void sub_02055478(FieldSystem* fsys, SYSINFO_RTC* sysinfo, RTCDate* date, RTCTime* time) {
s64 seconds = RTC_ConvertDateTimeToSecond(date, time);
s64 sys_seconds = RTC_ConvertDateTimeToSecond(&sysinfo->date, &sysinfo->time);
s64 seconds = RTC_ConvertDateTimeToSecond(date, time);
s64 sys_seconds = RTC_ConvertDateTimeToSecond(&sysinfo->date, &sysinfo->time);
if (seconds < sys_seconds) {
sysinfo->date = *date;
sysinfo->time = *time;
@ -56,7 +56,7 @@ void sub_02055478(FieldSystem* fsys, SYSINFO_RTC* sysinfo, RTCDate* date, RTCTim
s32 delta_seconds = seconds - sys_seconds;
if (delta_seconds > 0) {
sub_02092F30(Fsys_GetGearPhoneRingManager(fsys), seconds);
}
}
s32 minutes = delta_seconds / 60;
if (minutes <= 0) {
return;
@ -106,7 +106,7 @@ u32 Field_GetMonth(FieldSystem* fsys) {
return Sav2_SysInfo_RTC_get(fsys->savedata)->date.month;
}
u32 Field_GetDay(FieldSystem* fsys) {
u32 Field_GetDay(FieldSystem* fsys) {
return Sav2_SysInfo_RTC_get(fsys->savedata)->date.day;
}
@ -149,7 +149,7 @@ void sub_020556A8(UnkStruct_020556FC *unkPtr) {
void sub_020556B8(FieldSystem* fsys) {
APRICORN_TREE* trees = Sav2_FieldApricornTrees_get(fsys->savedata);
sub_0202AE74(trees);
sub_0202AE74(trees);
}
void sub_020556C8(FieldSystem *fsys, UnkStruct_020556FC *unkPtrB) {
@ -168,12 +168,12 @@ BOOL sub_02055708(FieldSystem* fsys, LocalMapObject* mapObject) {
return FALSE;
}
u32 id = MapObject_GetGfxID(mapObject);
if (id != SPRITE_BONGURI_R &&
id != SPRITE_BONGURI_Y &&
id != SPRITE_BONGURI_B &&
id != SPRITE_BONGURI_G &&
id != SPRITE_BONGURI_P &&
id != SPRITE_BONGURI_W &&
if (id != SPRITE_BONGURI_R &&
id != SPRITE_BONGURI_Y &&
id != SPRITE_BONGURI_B &&
id != SPRITE_BONGURI_G &&
id != SPRITE_BONGURI_P &&
id != SPRITE_BONGURI_W &&
id != SPRITE_BONGURI_BK) {
return FALSE;
}

View File

@ -64,7 +64,7 @@ void NewFieldTransitionEnvironment(FieldSystem *fsys, int mapID, int warpID, int
FieldSys_CreateTask(fsys, sub_02055DBC, fenv);
}
void sub_02055CD8(FieldSystem *fsys, int mapID, int warpID, int x, int y, int dir) {
void sub_02055CD8(FieldSystem *fsys, int mapID, int warpID, int x, int y, int dir) {
FieldTransitionEnvironment *fenv = AllocFromHeapAtEnd(11, sizeof(FieldTransitionEnvironment));
fenv->state = 0;
fenv->transitionState = 0;
@ -151,7 +151,7 @@ BOOL sub_02055DBC(TaskManager *man) {
env->state++;
break;
case 3:
sub_0205525C(man);
sub_0205525C(man);
env->state++;
break;
case 4:
@ -179,14 +179,14 @@ BOOL sub_02055DBC(TaskManager *man) {
if (env->transitionNo == 8) {
parity = 1;
}
TIMEOFDAY time = GF_RTC_GetTimeOfDay();
TIMEOFDAY time = GF_RTC_GetTimeOfDay();
sub_0206A388(man, index, (u8) time, parity); //this should set the specific map icon based on time?
env->state++;
ov01_021EFAF8(fsys); //<= this func specifically gets and displays the area's icon and text
break;
}
}
ov01_021EFAF8(fsys);
ov01_021EFAF8(fsys);
env->transitionState = 0;
TaskManager_Call(man, sMapEnterRoutines[env->transitionNo], env);
LocalMapObject *followerMon = FollowingPokemon_GetMapObject(fsys);
@ -195,7 +195,7 @@ BOOL sub_02055DBC(TaskManager *man) {
ov01_02205790(fsys, (u8) PlayerAvatar_GetFacingDirection(fsys->playerAvatar));
}
env->state++;
break;
break;
}
break;
case 8:
@ -284,7 +284,7 @@ BOOL sub_0205613C(TaskManager *man) {
if (MapObject_IsMovementPaused(FollowingPokemon_GetMapObject(fsys))) {
sub_0205FC94(FollowingPokemon_GetMapObject(fsys), 55);
fenv->transitionState++;
}
}
} else {
fenv->transitionState++;
}

View File

@ -23,13 +23,13 @@ static void SysTask_RingGearPhone(SysTask *task, GearPhoneRingManager* ptr);
static void sub_02092BE8(FieldSystem* sys, Unk_PokegearSTRUCT_2C* ptr, BOOL a2) {
Unk_PokegearSTRUCT_14 Unk_struct;
SCRIPT_STATE *state = SavArray_Flags_get(sys->savedata);
FLYPOINTS_SAVE *points = Save_FlyPoints_get(sys->savedata);
Location *warpPtr = FlyPoints_GetSpecialSpawnWarpPtr(points);
Location *PosPtr = FlyPoints_GetPosition(points);
FLYPOINTS_SAVE *points = Save_FlyPoints_get(sys->savedata);
Location *warpPtr = FlyPoints_GetSpecialSpawnWarpPtr(points);
Location *PosPtr = FlyPoints_GetPosition(points);
GearPhoneRingManager* phoneRingMgr = Fsys_GetGearPhoneRingManager(sys);
ptr->saveData = sys->savedata;
ptr->mapID = PosPtr->mapId;
if (MapHeader_MapIsOnMainMatrix(ptr->mapID)) {
if (MapHeader_MapIsOnMainMatrix(ptr->mapID)) {
ptr->x = GetPlayerXCoord(sys->playerAvatar);
ptr->y = GetPlayerYCoord(sys->playerAvatar);
ptr->matrixXCoord = ptr->x / 32;
@ -56,7 +56,7 @@ static void sub_02092BE8(FieldSystem* sys, Unk_PokegearSTRUCT_2C* ptr, BOOL a2)
ptr->unk28 = &sys->unk_10C;
ptr->unk01 = sub_0203DF3C(sys);
ptr->mapMusicID = Fsys_GetSurfOverriddenMusicId(sys, ptr->mapID);
if (a2) {
return;
}

View File

@ -45,7 +45,7 @@ BOOL sub_02097F6C(u32 rand, u16 mapno, u16 swarmValue) {
void sub_02097F9C(u32 rand, u16 *mapno, u16 *species) {
ENC_DATA encData;
const u16 (*swarmMap)[2];
swarmMap = &sSwarmMapLUT[rand % SWARM_MAP_COUNT];
WildEncounters_ReadFromNarc(&encData, (*swarmMap)[0]);
switch((*swarmMap)[1]) {

View File

@ -237,7 +237,7 @@ BOOL UseItemOnPokemon(POKEMON *pokemon, u16 itemID, u16 moveIdx, u16 location, H
hadEffect = FALSE;
effectFound = FALSE;
sp58 = sp54 = GetMonData(pokemon, MON_DATA_STATUS, NULL);
if (GetItemAttr_PreloadedItemData(itemData, ITEMATTR_SLP_HEAL)) {
sp58 &= ~MON_STATUS_SLP_MASK;
@ -258,7 +258,7 @@ BOOL UseItemOnPokemon(POKEMON *pokemon, u16 itemID, u16 moveIdx, u16 location, H
sp58 &= ~MON_STATUS_FRZ_MASK;
effectFound = TRUE;
}
if (GetItemAttr_PreloadedItemData(itemData, ITEMATTR_PRZ_HEAL)) {
sp58 &= ~MON_STATUS_PRZ_MASK;
effectFound = TRUE;
@ -268,7 +268,7 @@ BOOL UseItemOnPokemon(POKEMON *pokemon, u16 itemID, u16 moveIdx, u16 location, H
SetMonData(pokemon, MON_DATA_STATUS, &sp58);
hadEffect = TRUE;
}
sp54 = GetMonData(pokemon, MON_DATA_HP, NULL);
sp58 = GetMonData(pokemon, MON_DATA_MAXHP, NULL);
if ((GetItemAttr_PreloadedItemData(itemData, ITEMATTR_REVIVE) || GetItemAttr_PreloadedItemData(itemData, ITEMATTR_REVIVE_ALL)) && GetItemAttr_PreloadedItemData(itemData, ITEMATTR_LEVEL_UP)) {
@ -329,7 +329,7 @@ BOOL UseItemOnPokemon(POKEMON *pokemon, u16 itemID, u16 moveIdx, u16 location, H
}
effectFound = TRUE;
}
sp54 = GetMonData(pokemon, MON_DATA_HP_EV, NULL);
sp58 = GetMonData(pokemon, MON_DATA_ATK_EV, NULL);
sp5C = GetMonData(pokemon, MON_DATA_DEF_EV, NULL);
@ -430,7 +430,7 @@ BOOL UseItemOnPokemon(POKEMON *pokemon, u16 itemID, u16 moveIdx, u16 location, H
FreeToHeap(itemData);
return FALSE;
}
sp54 = GetMonData(pokemon, MON_DATA_FRIENDSHIP, NULL);
if (sp54 < 100) {
if (GetItemAttr_PreloadedItemData(itemData, ITEMATTR_FRIENDSHIP_MOD_LO)) {
@ -488,7 +488,7 @@ BOOL MonMoveRestorePP(POKEMON *pokemon, int moveIdx, int ppRestore) {
if (move_id == MOVE_NONE) {
return FALSE;
}
int ppAttr = MON_DATA_MOVE1PP + moveIdx;
u8 pp = GetMonData(pokemon, ppAttr, NULL);
int ppUpAttr = MON_DATA_MOVE1PPUP + moveIdx;
@ -517,7 +517,7 @@ BOOL BoostMonMovePpUpBy(POKEMON *pokemon, int moveIdx, int nPpUp) {
if (ppUp == 3) {
return FALSE;
}
move = GetMonData(pokemon, MON_DATA_MOVE1 + moveIdx, NULL);
if (GetMoveMaxPP(move, 0) < 5) {
return FALSE;
@ -531,12 +531,12 @@ BOOL BoostMonMovePpUpBy(POKEMON *pokemon, int moveIdx, int nPpUp) {
} else {
ppUp = ppUp + nPpUp;
}
u8 newMaxPp = GetMoveMaxPP(move, ppUp);
pp = pp + newMaxPp - maxPp;
SetMonData(pokemon, ppUpAttr, &ppUp);
SetMonData(pokemon, ppAttr, &pp);
return TRUE;
}

View File

@ -297,7 +297,7 @@ BOOL GenerateBoardAndPrintNewLevel(WorkflowEngine *workflow, VoltorbFlipAppWork
PrintMessageOnWindow(work, 0, msg_0039_00000, &work->wCurrentLevel, 0, 0, 0x000f0100);
BgCommitTilemapBufferToVram(work->bgConfig, 5);
sub_02004EC4(64, 0, 0);
if (levelDiff != 0) {
if (levelDiff > 0) {
ov122_021E7888(&work->unk25C);

View File

@ -11,14 +11,14 @@ void OS_InitMutex(OSMutex* mutex) {
void OS_LockMutex(OSMutex* mutex) {
OSIntrMode mode;
OSThread* current;
mode = OS_DisableInterrupts();
current = OS_GetCurrentThread();
while (1) {
OSThread* owner = mutex->thread;
if (owner == NULL) {
mutex->thread = current;
mutex->count++;
mutex->count++;
OSi_EnqueueTail(current, mutex);
break;
}
@ -38,7 +38,7 @@ void OS_LockMutex(OSMutex* mutex) {
void OS_UnlockMutex(OSMutex* mutex) {
OSIntrMode mode;
OSThread* current;
mode = OS_DisableInterrupts();
current = OS_GetCurrentThread();
if (mutex->thread == current) {

View File

@ -80,7 +80,7 @@ static uint16_t Calc_CRC16(uint8_t * data, size_t length, uint16_t crc)
0x8801,
0x4400,
};
uint16_t x = 0;
uint16_t y;
uint16_t bit = 0;
@ -170,7 +170,7 @@ int main(int argc, char ** argv)
{
HeaderWriteU16LE(0x6C, secure_crc);
}
if (override_code)
{
memcpy(RomHeader + 0xC, game_code, 4);

View File

@ -1,7 +1,7 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stdarg.h>
#include <stdlib.h>
// mwasmarm patcher v1.2
@ -223,7 +223,7 @@ int main(int argc, char *argv[]) {
fatal_printf("ERROR: Failed to retrieve sha1 hash\n");
}
free(string);
char buf[(SHA_DIGEST_LENGTH*2)+1];
for (int i=0; i < SHA_DIGEST_LENGTH; i++) {
sprintf(&(buf[i*2]), "%02x", sha1[i]);

View File

@ -101,7 +101,7 @@ unsigned char *RLCompress(unsigned char *src, int srcSize, int *compressedSize)
srcPos++;
uncompressedLength++;
}
if (uncompressedLength > 0)
{
dest[destPos++] = uncompressedLength - 1;