slot machines

This commit is contained in:
PikalaxALT 2015-12-10 22:26:31 -05:00
parent a5a8364c35
commit b9870541d4
17 changed files with 1354 additions and 1053 deletions

View File

@ -4764,13 +4764,13 @@ endr
jr nz, .multiply
ret
Functionce765: ; ce765 (33:6765)
BattleAnim_Sine_e: ; ce765 (33:6765)
ld a, e
call BattleAnim_Sine
ld e, a
ret
Functionce76b: ; ce76b (33:676b)
BattleAnim_Cosine_e: ; ce76b (33:676b)
ld a, e
call BattleAnim_Cosine
ld e, a
@ -4778,7 +4778,7 @@ Functionce76b: ; ce76b (33:676b)
; ce771 (33:6771)
Functionce771: ; ce771
BattleAnim_AbsSinePrecise: ; ce771
ld a, e
call BattleAnim_Sine
ld e, l
@ -4787,7 +4787,7 @@ Functionce771: ; ce771
; ce778
Functionce778: ; ce778
BattleAnim_AbsCosinePrecise: ; ce778
ld a, e
call BattleAnim_Cosine
ld e, l

View File

@ -2959,13 +2959,13 @@ Functionc9059: ; c9059 (32:5059)
Functionc905d: ; c905d (32:505d)
ld e, a
callab Functionce765
callab BattleAnim_Sine_e
ld a, e
ret
Functionc9066: ; c9066 (32:5066)
ld e, a
callab Functionce76b
callab BattleAnim_Cosine_e
ld a, e
ret

View File

@ -209,89 +209,4 @@ NUM_JOHTO_BADGES EQU const_value
const EARTHBADGE
NUM_KANTO_BADGES EQU const_value
NUM_BADGES EQU NUM_JOHTO_BADGES + NUM_KANTO_BADGES
const_def
const SPRITE_ANIM_SEQ_00
const SPRITE_ANIM_SEQ_01
const SPRITE_ANIM_SEQ_02
const SPRITE_ANIM_SEQ_03
const SPRITE_ANIM_SEQ_04
const SPRITE_ANIM_SEQ_05
const SPRITE_ANIM_SEQ_06
const SPRITE_ANIM_SEQ_07
const SPRITE_ANIM_SEQ_08
const SPRITE_ANIM_SEQ_09
const SPRITE_ANIM_SEQ_0A
const SPRITE_ANIM_SEQ_0B
const SPRITE_ANIM_SEQ_0C
const SPRITE_ANIM_SEQ_0D
const SPRITE_ANIM_SEQ_0E
const SPRITE_ANIM_SEQ_0F
const SPRITE_ANIM_SEQ_10
const SPRITE_ANIM_SEQ_11
const SPRITE_ANIM_SEQ_12
const SPRITE_ANIM_SEQ_13
const SPRITE_ANIM_SEQ_14
const SPRITE_ANIM_SEQ_15
const SPRITE_ANIM_SEQ_16
const SPRITE_ANIM_SEQ_17
const SPRITE_ANIM_SEQ_18
const SPRITE_ANIM_SEQ_19
const SPRITE_ANIM_SEQ_1A
const SPRITE_ANIM_SEQ_1B
const SPRITE_ANIM_SEQ_1C
const SPRITE_ANIM_SEQ_1D
const SPRITE_ANIM_SEQ_1E
const SPRITE_ANIM_SEQ_1F
const SPRITE_ANIM_SEQ_20
const SPRITE_ANIM_SEQ_21
const SPRITE_ANIM_SEQ_22
const_def
const SPRITE_ANIM_INDEX_00
const SPRITE_ANIM_INDEX_01
const SPRITE_ANIM_INDEX_02
const SPRITE_ANIM_INDEX_03
const SPRITE_ANIM_INDEX_04
const SPRITE_ANIM_INDEX_05
const SPRITE_ANIM_INDEX_06
const SPRITE_ANIM_INDEX_07
const SPRITE_ANIM_INDEX_08
const SPRITE_ANIM_INDEX_09
const SPRITE_ANIM_INDEX_0A
const SPRITE_ANIM_INDEX_0B
const SPRITE_ANIM_INDEX_0C
const SPRITE_ANIM_INDEX_0D
const SPRITE_ANIM_INDEX_0E
const SPRITE_ANIM_INDEX_0F
const SPRITE_ANIM_INDEX_10
const SPRITE_ANIM_INDEX_11
const SPRITE_ANIM_INDEX_12
const SPRITE_ANIM_INDEX_13
const SPRITE_ANIM_INDEX_14
const SPRITE_ANIM_INDEX_15
const SPRITE_ANIM_INDEX_LEAF
const SPRITE_ANIM_INDEX_CUT_TREE
const SPRITE_ANIM_INDEX_18
const SPRITE_ANIM_INDEX_19
const SPRITE_ANIM_INDEX_1A
const SPRITE_ANIM_INDEX_1B
const SPRITE_ANIM_INDEX_1C
const SPRITE_ANIM_INDEX_1D
const SPRITE_ANIM_INDEX_1E
const SPRITE_ANIM_INDEX_1F
const SPRITE_ANIM_INDEX_20
const SPRITE_ANIM_INDEX_21
const SPRITE_ANIM_INDEX_22
const SPRITE_ANIM_INDEX_23
const SPRITE_ANIM_INDEX_24
const SPRITE_ANIM_INDEX_25
const SPRITE_ANIM_INDEX_26
const SPRITE_ANIM_INDEX_27
const SPRITE_ANIM_INDEX_28
const SPRITE_ANIM_INDEX_29
const SPRITE_ANIM_INDEX_2A
const SPRITE_ANIM_INDEX_2B
const SPRITE_ANIM_INDEX_2C
NUM_KANA EQU $2d

View File

@ -365,3 +365,155 @@ MAX_OUTDOOR_SPRITES EQU 23
const SPRITEANIMSTRUCT_0D
const SPRITEANIMSTRUCT_0E
const SPRITEANIMSTRUCT_0F
const_def
const SPRITE_ANIM_FRAMESET_00
const SPRITE_ANIM_FRAMESET_01
const SPRITE_ANIM_FRAMESET_02
const SPRITE_ANIM_FRAMESET_03
const SPRITE_ANIM_FRAMESET_04
const SPRITE_ANIM_FRAMESET_05
const SPRITE_ANIM_FRAMESET_06
const SPRITE_ANIM_FRAMESET_07
const SPRITE_ANIM_FRAMESET_08
const SPRITE_ANIM_FRAMESET_09
const SPRITE_ANIM_FRAMESET_0A
const SPRITE_ANIM_FRAMESET_0B
const SPRITE_ANIM_FRAMESET_0C
const SPRITE_ANIM_FRAMESET_SLOT_GOLEM
const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY
const SPRITE_ANIM_FRAMESET_0F
const SPRITE_ANIM_FRAMESET_SLOTS_EGG
const SPRITE_ANIM_FRAMESET_11
const SPRITE_ANIM_FRAMESET_12
const SPRITE_ANIM_FRAMESET_13
const SPRITE_ANIM_FRAMESET_14
const SPRITE_ANIM_FRAMESET_15
const SPRITE_ANIM_FRAMESET_16
const SPRITE_ANIM_FRAMESET_17
const SPRITE_ANIM_FRAMESET_18
const SPRITE_ANIM_FRAMESET_19
const SPRITE_ANIM_FRAMESET_1A
const SPRITE_ANIM_FRAMESET_1B
const SPRITE_ANIM_FRAMESET_1C
const SPRITE_ANIM_FRAMESET_1D
const SPRITE_ANIM_FRAMESET_1E
const SPRITE_ANIM_FRAMESET_1F
const SPRITE_ANIM_FRAMESET_20
const SPRITE_ANIM_FRAMESET_21
const SPRITE_ANIM_FRAMESET_22
const SPRITE_ANIM_FRAMESET_23
const SPRITE_ANIM_FRAMESET_24
const SPRITE_ANIM_FRAMESET_25
const SPRITE_ANIM_FRAMESET_26
const SPRITE_ANIM_FRAMESET_27
const SPRITE_ANIM_FRAMESET_28
const SPRITE_ANIM_FRAMESET_29
const SPRITE_ANIM_FRAMESET_2A
const SPRITE_ANIM_FRAMESET_2B
const SPRITE_ANIM_FRAMESET_2C
const SPRITE_ANIM_FRAMESET_2D
const SPRITE_ANIM_FRAMESET_2E
const SPRITE_ANIM_FRAMESET_2F
const SPRITE_ANIM_FRAMESET_30
const SPRITE_ANIM_FRAMESET_31
const SPRITE_ANIM_FRAMESET_32
const SPRITE_ANIM_FRAMESET_33
const SPRITE_ANIM_FRAMESET_34
const SPRITE_ANIM_FRAMESET_35
const SPRITE_ANIM_FRAMESET_36
const SPRITE_ANIM_FRAMESET_37
const SPRITE_ANIM_FRAMESET_38
const SPRITE_ANIM_FRAMESET_39
const SPRITE_ANIM_FRAMESET_3A
const SPRITE_ANIM_FRAMESET_3B
const SPRITE_ANIM_FRAMESET_3C
const SPRITE_ANIM_FRAMESET_3D
const SPRITE_ANIM_FRAMESET_3E
const SPRITE_ANIM_FRAMESET_3F
const SPRITE_ANIM_FRAMESET_40
const SPRITE_ANIM_FRAMESET_41
const_def
const SPRITE_ANIM_SEQ_00
const SPRITE_ANIM_SEQ_01
const SPRITE_ANIM_SEQ_02
const SPRITE_ANIM_SEQ_03
const SPRITE_ANIM_SEQ_04
const SPRITE_ANIM_SEQ_05
const SPRITE_ANIM_SEQ_06
const SPRITE_ANIM_SEQ_07
const SPRITE_ANIM_SEQ_08
const SPRITE_ANIM_SEQ_SLOT_GOLEM
const SPRITE_ANIM_SEQ_SLOTS_CHANSEY
const SPRITE_ANIM_SEQ_SLOTS_EGG
const SPRITE_ANIM_SEQ_0C
const SPRITE_ANIM_SEQ_0D
const SPRITE_ANIM_SEQ_0E
const SPRITE_ANIM_SEQ_0F
const SPRITE_ANIM_SEQ_10
const SPRITE_ANIM_SEQ_11
const SPRITE_ANIM_SEQ_12
const SPRITE_ANIM_SEQ_13
const SPRITE_ANIM_SEQ_14
const SPRITE_ANIM_SEQ_15
const SPRITE_ANIM_SEQ_16
const SPRITE_ANIM_SEQ_17
const SPRITE_ANIM_SEQ_18
const SPRITE_ANIM_SEQ_19
const SPRITE_ANIM_SEQ_1A
const SPRITE_ANIM_SEQ_1B
const SPRITE_ANIM_SEQ_1C
const SPRITE_ANIM_SEQ_1D
const SPRITE_ANIM_SEQ_1E
const SPRITE_ANIM_SEQ_1F
const SPRITE_ANIM_SEQ_20
const SPRITE_ANIM_SEQ_21
const SPRITE_ANIM_SEQ_22
const_def
const SPRITE_ANIM_INDEX_00
const SPRITE_ANIM_INDEX_01
const SPRITE_ANIM_INDEX_02
const SPRITE_ANIM_INDEX_03
const SPRITE_ANIM_INDEX_04
const SPRITE_ANIM_INDEX_05
const SPRITE_ANIM_INDEX_SLOT_GOLEM
const SPRITE_ANIM_INDEX_SLOTS_CHANSEY
const SPRITE_ANIM_INDEX_SLOTS_EGG
const SPRITE_ANIM_INDEX_09
const SPRITE_ANIM_INDEX_0A
const SPRITE_ANIM_INDEX_0B
const SPRITE_ANIM_INDEX_0C
const SPRITE_ANIM_INDEX_0D
const SPRITE_ANIM_INDEX_0E
const SPRITE_ANIM_INDEX_0F
const SPRITE_ANIM_INDEX_10
const SPRITE_ANIM_INDEX_11
const SPRITE_ANIM_INDEX_12
const SPRITE_ANIM_INDEX_13
const SPRITE_ANIM_INDEX_14
const SPRITE_ANIM_INDEX_15
const SPRITE_ANIM_INDEX_LEAF
const SPRITE_ANIM_INDEX_CUT_TREE
const SPRITE_ANIM_INDEX_18
const SPRITE_ANIM_INDEX_19
const SPRITE_ANIM_INDEX_1A
const SPRITE_ANIM_INDEX_1B
const SPRITE_ANIM_INDEX_1C
const SPRITE_ANIM_INDEX_1D
const SPRITE_ANIM_INDEX_1E
const SPRITE_ANIM_INDEX_1F
const SPRITE_ANIM_INDEX_20
const SPRITE_ANIM_INDEX_21
const SPRITE_ANIM_INDEX_22
const SPRITE_ANIM_INDEX_23
const SPRITE_ANIM_INDEX_24
const SPRITE_ANIM_INDEX_25
const SPRITE_ANIM_INDEX_26
const SPRITE_ANIM_INDEX_27
const SPRITE_ANIM_INDEX_28
const SPRITE_ANIM_INDEX_29
const SPRITE_ANIM_INDEX_2A
const SPRITE_ANIM_INDEX_2B
const SPRITE_ANIM_INDEX_2C

View File

@ -1559,7 +1559,7 @@ Unknown_8e6a5: ; 8e6a5
dsprite 0, 0, 0, 4, $52, $01
dsprite 0, 0, 1, 4, $53, $01
; 8e706
Unknown_8e706: ; Broken 2bpp pointers
BrokenStdGFXPointers: ; Broken 2bpp pointers
dbbw $80, $01, .deleted ; 128-tile 2bpp at 1:672a (inside Multiply)
dbbw $80, $01, .deleted
dbbw $80, $01, .deleted

View File

@ -663,7 +663,7 @@ GetHatchlingFrontpic: ; 1723c (5:723c)
pop de
predef_jump FrontpicPredef
Function17254: ; 17254 (5:7254)
Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
push af
call WaitTop
push hl
@ -681,7 +681,7 @@ Function17254: ; 17254 (5:7254)
lb bc, 7, 7
predef FillBox
pop af
call Function17363
call Hatch_LoadFrontpicPal
call SetPalettes
jp WaitBGMap
@ -721,10 +721,10 @@ EggHatch_AnimationSequence: ; 1728f (5:728f)
call PlayMusic
call EnableLCD
hlcoord 7, 4
ld b, (VBGMap0 + 1 * $20 + 17) / $100
ld c, (VBGMap0 + 1 * $20 + 17) % $100
ld b, VBGMap0 / $100
ld c, $31 ; Egg tiles start here
ld a, EGG
call Function17254
call Hatch_UpdateFrontpicBGMapCenter
ld c, 80
call DelayFrames
xor a
@ -768,13 +768,13 @@ EggHatch_AnimationSequence: ; 1728f (5:728f)
ld [hSCX], a
ld [wGlobalAnimXOffset], a
call ClearSprites
call Function173b3
call Hatch_InitShellFragments
hlcoord 6, 3
ld b, VBGMap0 / $100
ld c, VBGMap0 % $100
ld c, $00 ; Hatchling tiles start here
ld a, [wJumptableIndex]
call Function17254
call Function17418
call Hatch_UpdateFrontpicBGMapCenter
call Hatch_ShellFragmentLoop
call WaitSFX
ld a, [wJumptableIndex]
ld [CurPartySpecies], a
@ -786,7 +786,7 @@ EggHatch_AnimationSequence: ; 1728f (5:728f)
ld [CurSpecies], a
ret
Function17363: ; 17363 (5:7363)
Hatch_LoadFrontpicPal: ; 17363 (5:7363)
ld [PlayerHPPal], a
ld b, SCGB_0B
ld c, $0
@ -818,7 +818,7 @@ EggHatchGFX: ; 17393
INCBIN "gfx/unknown/017393.2bpp"
; 173b3
Function173b3: ; 173b3 (5:73b3)
Hatch_InitShellFragments: ; 173b3 (5:73b3)
callba ClearSpriteAnims
ld hl, .SpriteData
.loop
@ -834,20 +834,25 @@ Function173b3: ; 173b3 (5:73b3)
ld b, a
push hl
push bc
ld a, SPRITE_ANIM_INDEX_1C
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
ld [hl], $0
pop de
ld a, e
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
add hl, bc
add [hl]
ld [hl], a
ld hl, SPRITEANIMSTRUCT_0B
add hl, bc
ld [hl], d
pop hl
jr .loop
.done
@ -872,57 +877,57 @@ Function173b3: ; 173b3 (5:73b3)
db -1
; 17418
Function17418: ; 17418 (5:7418)
ld c, $81
.asm_1741a
Hatch_ShellFragmentLoop: ; 17418 (5:7418)
ld c, 129
.loop
call EggHatch_DoAnimFrame
dec c
jr nz, .asm_1741a
jr nz, .loop
ret
Special_DayCareMon1: ; 17421
ld hl, UnknownText_0x17467
ld hl, DayCareMon1Text
call PrintText
ld a, [wBreedMon1Species]
call PlayCry
ld a, [wDaycareLady]
bit 0, a
jr z, Function1745f
jr z, DayCareMonCursor
call ButtonSound
ld hl, wBreedMon2Nick
call Function1746c
call DayCareMonCompatibilityText
jp PrintText
Special_DayCareMon2: ; 17440
ld hl, UnknownText_0x17462
ld hl, DayCareMon2Text
call PrintText
ld a, [wBreedMon2Species]
call PlayCry
ld a, [wDaycareMan]
bit 0, a
jr z, Function1745f
jr z, DayCareMonCursor
call ButtonSound
ld hl, wBreedMon1Nick
call Function1746c
call DayCareMonCompatibilityText
jp PrintText
Function1745f: ; 1745f
DayCareMonCursor: ; 1745f
jp WaitPressAorB_BlinkCursor
; 17462
UnknownText_0x17462: ; 0x17462
DayCareMon2Text: ; 0x17462
; It's @ that was left with the DAY-CARE LADY.
text_jump UnknownText_0x1c0df3
db "@"
; 0x17467
UnknownText_0x17467: ; 0x17467
DayCareMon1Text: ; 0x17467
; It's @ that was left with the DAY-CARE MAN.
text_jump UnknownText_0x1c0e24
db "@"
; 0x1746c
Function1746c: ; 1746c
DayCareMonCompatibilityText: ; 1746c
push bc
ld de, StringBuffer1
ld bc, NAME_LENGTH
@ -930,60 +935,61 @@ Function1746c: ; 1746c
call CheckBreedmonCompatibility
pop bc
ld a, [wd265]
ld hl, UnknownText_0x1749c
cp $ff
jr z, .asm_1749b
ld hl, UnknownText_0x174a1
ld hl, .AllAlone
cp -1
jr z, .done
ld hl, .Incompatible
and a
jr z, .asm_1749b
ld hl, UnknownText_0x174a6
jr z, .done
ld hl, .HighCompatibility
cp 230
jr nc, .asm_1749b
jr nc, .done
cp 70
ld hl, UnknownText_0x174ab
jr nc, .asm_1749b
ld hl, UnknownText_0x174b0
ld hl, .ModerateCompatibility
jr nc, .done
ld hl, .SlightCompatibility
.asm_1749b
.done
ret
; 1749c
UnknownText_0x1749c: ; 0x1749c
.AllAlone: ; 0x1749c
; It's brimming with energy.
text_jump UnknownText_0x1c0e54
db "@"
; 0x174a1
UnknownText_0x174a1: ; 0x174a1
.Incompatible: ; 0x174a1
; It has no interest in @ .
text_jump UnknownText_0x1c0e6f
db "@"
; 0x174a6
UnknownText_0x174a6: ; 0x174a6
.HighCompatibility: ; 0x174a6
; It appears to care for @ .
text_jump UnknownText_0x1c0e8d
db "@"
; 0x174ab
UnknownText_0x174ab: ; 0x174ab
.ModerateCompatibility: ; 0x174ab
; It's friendly with @ .
text_jump UnknownText_0x1c0eac
db "@"
; 0x174b0
UnknownText_0x174b0: ; 0x174b0
.SlightCompatibility: ; 0x174b0
; It shows interest in @ .
text_jump UnknownText_0x1c0ec6
db "@"
; 0x174b5
Function_174b5: ; 174b5
ld hl, String_174b9
DayCareMonPrintEmptyString: ; 174b5
; unreferenced
ld hl, .string
ret
; 174b9
String_174b9: ; 174b9
.string: ; 174b9
db "@"
; 174ba

View File

@ -125,7 +125,7 @@ INCBIN "gfx/icon/mail2.2bpp"
bit 7, a
jr nz, .exit_mail
call .DoJumptable
callba Function8cf62
callba PlaySpriteAnimationsAndDelayFrame
call .Update
call DelayFrame
and a

View File

@ -255,7 +255,7 @@ GameFreakLogoScene2: ; e470d (39:470d)
add $20
.asm_e4723
ld e, a
callba Functionce765
callba BattleAnim_Sine_e
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], e

View File

@ -384,7 +384,7 @@ Function24259: ; 24259
ld a, [wcfa5]
bit 6, a
jr z, .asm_24266
callab Function8cf62
callab PlaySpriteAnimationsAndDelayFrame
.asm_24266
call JoyTextDelay

View File

@ -338,7 +338,7 @@ Function11915: ; 11915
bit 7, a
jr nz, .asm_11930
call Function11968
callba Function8cf62
callba PlaySpriteAnimationsAndDelayFrame
call Function11940
call DelayFrame
and a

File diff suppressed because it is too large Load Diff

View File

@ -15,41 +15,42 @@ endr
.Jumptable: ; 8d25b (23:525b)
dw .zero ; town map
dw .one ; bouncing mon icon
dw .two ; bouncing mon icon, selected
dw .three ; bouncing mon icon, menu open
dw .four
dw .five
dw .six ; Game Freak logo
dw .seven
dw .eight
dw .nine
dw .ten
dw .eleven
dw .twelve ; blinking cursor
dw .thirteen
dw .fourteen
dw .fifteen
dw .sixteen
dw .seventeen
dw .eighteen
dw .nineteen ; finish egg hatching animation
dw .twenty ; radio tuning knob
dw .twentyone ; cut grass leaves
dw .twentytwo ; flying sprite
dw .twentythree ; flying leaves
dw .twentyfour
dw .twentyfive
dw .twentysix
dw .twentyseven
dw .twentyeight
dw .twentynine ; intro suicune
dw .thirty ; intro pichu wooper
dw .thirtyone ; celebi
dw .thirtytwo ; intro unown
dw .thirtythree ; intro unown F with suicune leaping up
dw .thirtyfour ; intro suicune facing away from us
jumptable_start
jumptable .zero ; town map
jumptable .one ; bouncing mon icon
jumptable .two ; bouncing mon icon, selected
jumptable .three ; bouncing mon icon, menu open
jumptable .four
jumptable .five
jumptable .six ; Game Freak logo
jumptable .seven
jumptable .eight
jumptable .nine ; Something to do with slots
jumptable .ten ; Something to do with slots
jumptable .eleven ; Something to do with slots
jumptable .twelve ; blinking cursor
jumptable .thirteen
jumptable .fourteen
jumptable .fifteen
jumptable .sixteen
jumptable .seventeen
jumptable .eighteen
jumptable .nineteen ; finish egg hatching animation
jumptable .twenty ; radio tuning knob
jumptable .twentyone ; cut grass leaves
jumptable .twentytwo ; flying sprite
jumptable .twentythree ; flying leaves
jumptable .twentyfour
jumptable .twentyfive
jumptable .twentysix
jumptable .twentyseven
jumptable .twentyeight
jumptable .twentynine ; intro suicune
jumptable .thirty ; intro pichu wooper
jumptable .thirtyone ; celebi
jumptable .thirtytwo ; intro unown
jumptable .thirtythree ; intro unown F with suicune leaping up
jumptable .thirtyfour ; intro suicune facing away from us
.zero: ; 8d2a1 (23:52a1)
@ -359,11 +360,11 @@ endr
ret
.nine: ; 8d422 (23:5422)
callab Function9321d
callab SlotMachine_AnimateGolem
ret
.ten: ; 8d429 (23:5429)
callab Function932ac
callab Slots_AnimateChansey
ld hl, wcf64
ld a, [hl]
cp $2
@ -380,13 +381,13 @@ endr
dec [hl]
ld e, a
and $1
jr z, .asm_8d462
jr z, .move_vertical
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
cp $78
jr c, .asm_8d461
cp 15 * 8
jr c, .move_right
call DeinitializeSprite
ld a, $4
ld [wcf64], a
@ -394,9 +395,9 @@ endr
call PlaySFX
ret
.asm_8d461
.move_right
inc [hl]
.asm_8d462
.move_vertical
ld a, e
ld d, $20
call .Sprites_Sine

View File

@ -11,7 +11,7 @@ ClearSpriteAnims: ; 8cf53
ret
; 8cf62
Function8cf62: ; 8cf62
PlaySpriteAnimationsAndDelayFrame: ; 8cf62
call PlaySpriteAnimations
call DelayFrame
ret
@ -23,7 +23,7 @@ PlaySpriteAnimations: ; 8cf69
push bc
push af
ld a, 0 * 4
ld a, Sprites % $100
ld [wCurrSpriteOAMAddr], a
call DoNextFrameForAllSprites
@ -60,7 +60,7 @@ DoNextFrameForAllSprites: ; 8cf7a
ld a, [wCurrSpriteOAMAddr]
ld l, a
ld h, Sprites / $0100
ld h, Sprites / $100
.loop2 ; Clear (Sprites + [wCurrSpriteOAMAddr] --> SpritesEnd)
ld a, l
@ -139,9 +139,9 @@ InitSpriteAnimStruct:: ; 8cfd6
; Back up the structure address to bc.
ld c, l
ld b, h
; Value [wc3b4] is initially set to -1. Set it to
; Value [wSpriteAnimCount] is initially set to -1. Set it to
; the number of objects loaded into this array.
ld hl, wc3b4
ld hl, wSpriteAnimCount
inc [hl]
ld a, [hl]
and a
@ -163,7 +163,7 @@ endr
ld hl, SPRITEANIMSTRUCT_INDEX
add hl, bc
; Load the index.
ld a, [wc3b4]
ld a, [wSpriteAnimCount]
ld [hli], a
; Copy the table entry to the next two fields.
ld a, [de]
@ -172,7 +172,7 @@ endr
ld a, [de]
ld [hli], a
inc de
; Look up the third field from the table in the wc300 array (10x2).
; Look up the third field from the table in the wSpriteAnimDict array (10x2).
; Take the value and load it in
ld a, [de]
call GetSpriteAnimVTile
@ -532,14 +532,15 @@ endr
ret
; 8d1ac
Function8d1ac: ; unreferenced
BrokenGetStdGraphics: ; 8d1ac
; dummied out
push hl
ld l, a
ld h, 0
rept 2
add hl, hl
endr
ld de, Unknown_8e706 ; broken 2bpp pointers
ld de, BrokenStdGFXPointers ; broken 2bpp pointers
add hl, de
ld c, [hl]
inc hl
@ -556,52 +557,52 @@ endr
; 8d1c4
SpriteAnimSeqData: ; 8d1c4
; ??, sequence, tile
db $01, SPRITE_ANIM_SEQ_01, $00 ; 00
db $07, SPRITE_ANIM_SEQ_04, $00 ; 01
db $08, SPRITE_ANIM_SEQ_05, $05 ; 02
db $0a, SPRITE_ANIM_SEQ_06, $00 ; 03
db $0b, SPRITE_ANIM_SEQ_07, $06 ; 04
db $0c, SPRITE_ANIM_SEQ_08, $06 ; 05
db $0d, SPRITE_ANIM_SEQ_09, $07 ; 06
db $0e, SPRITE_ANIM_SEQ_0A, $07 ; 07
db $10, SPRITE_ANIM_SEQ_0B, $07 ; 08
db $08, SPRITE_ANIM_SEQ_0C, $05 ; 09
db $11, SPRITE_ANIM_SEQ_00, $00 ; 0a flying sprite
db $12, SPRITE_ANIM_SEQ_0D, $08 ; 0b
db $12, SPRITE_ANIM_SEQ_0E, $08 ; 0c
db $12, SPRITE_ANIM_SEQ_0F, $08 ; 0d
db $13, SPRITE_ANIM_SEQ_10, $00 ; 0e
db $15, SPRITE_ANIM_SEQ_00, $00 ; 0f
db $16, SPRITE_ANIM_SEQ_11, $00 ; 10
db $17, SPRITE_ANIM_SEQ_12, $00 ; 11
db $18, SPRITE_ANIM_SEQ_12, $00 ; 12
db $19, SPRITE_ANIM_SEQ_13, $00 ; 13
db $1a, SPRITE_ANIM_SEQ_14, $00 ; 14 radio tuning knob
db $1b, SPRITE_ANIM_SEQ_00, $00 ; 15
db $1d, SPRITE_ANIM_SEQ_15, $00 ; 16 leaves when cutting down a tree
db $1e, SPRITE_ANIM_SEQ_00, $00 ; 17
db $1d, SPRITE_ANIM_SEQ_17, $00 ; 18 flying leaves
db $1f, SPRITE_ANIM_SEQ_00, $00 ; 19
db $24, SPRITE_ANIM_SEQ_19, $00 ; 1a
db $25, SPRITE_ANIM_SEQ_00, $00 ; 1b
db $20, SPRITE_ANIM_SEQ_13, $00 ; 1c
db $26, SPRITE_ANIM_SEQ_1A, $00 ; 1d
db $2d, SPRITE_ANIM_SEQ_00, $00 ; 1e
db $2e, SPRITE_ANIM_SEQ_00, $00 ; 1f
db $2f, SPRITE_ANIM_SEQ_00, $00 ; 20
db $30, SPRITE_ANIM_SEQ_00, $00 ; 21
db $31, SPRITE_ANIM_SEQ_00, $00 ; 22
db $32, SPRITE_ANIM_SEQ_1B, $00 ; 23
db $33, SPRITE_ANIM_SEQ_1C, $00 ; 24
db $34, SPRITE_ANIM_SEQ_00, $00 ; 25
db $35, SPRITE_ANIM_SEQ_1D, $00 ; 26
db $37, SPRITE_ANIM_SEQ_1E, $00 ; 27
db $38, SPRITE_ANIM_SEQ_1E, $00 ; 28
db $39, SPRITE_ANIM_SEQ_20, $00 ; 29 intro unown
db $3f, SPRITE_ANIM_SEQ_21, $00 ; 2a
db $3e, SPRITE_ANIM_SEQ_22, $00 ; 2b
db $40, SPRITE_ANIM_SEQ_00, $00 ; 2c
; frameset sequence, tile
db SPRITE_ANIM_FRAMESET_01, SPRITE_ANIM_SEQ_01, $00 ; 00
db SPRITE_ANIM_FRAMESET_07, SPRITE_ANIM_SEQ_04, $00 ; 01
db SPRITE_ANIM_FRAMESET_08, SPRITE_ANIM_SEQ_05, $05 ; 02
db SPRITE_ANIM_FRAMESET_0A, SPRITE_ANIM_SEQ_06, $00 ; 03
db SPRITE_ANIM_FRAMESET_0B, SPRITE_ANIM_SEQ_07, $06 ; 04
db SPRITE_ANIM_FRAMESET_0C, SPRITE_ANIM_SEQ_08, $06 ; 05
db SPRITE_ANIM_FRAMESET_SLOT_GOLEM, SPRITE_ANIM_SEQ_SLOT_GOLEM, $07 ; 06 slots golem
db SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY, SPRITE_ANIM_SEQ_SLOTS_CHANSEY, $07 ; 07 slots chansey
db SPRITE_ANIM_FRAMESET_SLOTS_EGG, SPRITE_ANIM_SEQ_SLOTS_EGG, $07 ; 08 slots egg
db SPRITE_ANIM_FRAMESET_08, SPRITE_ANIM_SEQ_0C, $05 ; 09
db SPRITE_ANIM_FRAMESET_11, SPRITE_ANIM_SEQ_00, $00 ; 0a flying sprite
db SPRITE_ANIM_FRAMESET_12, SPRITE_ANIM_SEQ_0D, $08 ; 0b
db SPRITE_ANIM_FRAMESET_12, SPRITE_ANIM_SEQ_0E, $08 ; 0c
db SPRITE_ANIM_FRAMESET_12, SPRITE_ANIM_SEQ_0F, $08 ; 0d
db SPRITE_ANIM_FRAMESET_13, SPRITE_ANIM_SEQ_10, $00 ; 0e
db SPRITE_ANIM_FRAMESET_15, SPRITE_ANIM_SEQ_00, $00 ; 0f
db SPRITE_ANIM_FRAMESET_16, SPRITE_ANIM_SEQ_11, $00 ; 10
db SPRITE_ANIM_FRAMESET_17, SPRITE_ANIM_SEQ_12, $00 ; 11
db SPRITE_ANIM_FRAMESET_18, SPRITE_ANIM_SEQ_12, $00 ; 12
db SPRITE_ANIM_FRAMESET_19, SPRITE_ANIM_SEQ_13, $00 ; 13
db SPRITE_ANIM_FRAMESET_1A, SPRITE_ANIM_SEQ_14, $00 ; 14 radio tuning knob
db SPRITE_ANIM_FRAMESET_1B, SPRITE_ANIM_SEQ_00, $00 ; 15
db SPRITE_ANIM_FRAMESET_1D, SPRITE_ANIM_SEQ_15, $00 ; 16 leaves when cutting down a tree
db SPRITE_ANIM_FRAMESET_1E, SPRITE_ANIM_SEQ_00, $00 ; 17
db SPRITE_ANIM_FRAMESET_1D, SPRITE_ANIM_SEQ_17, $00 ; 18 flying leaves
db SPRITE_ANIM_FRAMESET_1F, SPRITE_ANIM_SEQ_00, $00 ; 19
db SPRITE_ANIM_FRAMESET_24, SPRITE_ANIM_SEQ_19, $00 ; 1a
db SPRITE_ANIM_FRAMESET_25, SPRITE_ANIM_SEQ_00, $00 ; 1b
db SPRITE_ANIM_FRAMESET_20, SPRITE_ANIM_SEQ_13, $00 ; 1c
db SPRITE_ANIM_FRAMESET_26, SPRITE_ANIM_SEQ_1A, $00 ; 1d
db SPRITE_ANIM_FRAMESET_2D, SPRITE_ANIM_SEQ_00, $00 ; 1e
db SPRITE_ANIM_FRAMESET_2E, SPRITE_ANIM_SEQ_00, $00 ; 1f
db SPRITE_ANIM_FRAMESET_2F, SPRITE_ANIM_SEQ_00, $00 ; 20
db SPRITE_ANIM_FRAMESET_30, SPRITE_ANIM_SEQ_00, $00 ; 21
db SPRITE_ANIM_FRAMESET_31, SPRITE_ANIM_SEQ_00, $00 ; 22
db SPRITE_ANIM_FRAMESET_32, SPRITE_ANIM_SEQ_1B, $00 ; 23
db SPRITE_ANIM_FRAMESET_33, SPRITE_ANIM_SEQ_1C, $00 ; 24
db SPRITE_ANIM_FRAMESET_34, SPRITE_ANIM_SEQ_00, $00 ; 25
db SPRITE_ANIM_FRAMESET_35, SPRITE_ANIM_SEQ_1D, $00 ; 26
db SPRITE_ANIM_FRAMESET_37, SPRITE_ANIM_SEQ_1E, $00 ; 27
db SPRITE_ANIM_FRAMESET_38, SPRITE_ANIM_SEQ_1E, $00 ; 28
db SPRITE_ANIM_FRAMESET_39, SPRITE_ANIM_SEQ_20, $00 ; 29 intro unown
db SPRITE_ANIM_FRAMESET_3F, SPRITE_ANIM_SEQ_21, $00 ; 2a
db SPRITE_ANIM_FRAMESET_3E, SPRITE_ANIM_SEQ_22, $00 ; 2b
db SPRITE_ANIM_FRAMESET_40, SPRITE_ANIM_SEQ_00, $00 ; 2c
; 8d24b
INCLUDE "engine/sprite_anims.asm" ; DoAnimFrame

View File

@ -247,5 +247,37 @@ palgreen EQUS "$0020 *"
palblue EQUS "$0001 *"
dsprite: MACRO
; conditional segment is there because not every instance of
; this macro is directly OAM
if _NARG == 7 ; y tile, y pxl, x tile, x pxl, vtile offset, flags, palette
db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, (\6 << 3) + (\7 & 7)
else
db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, \6
endc
endm
jumptable_start: MACRO
if _NARG == 0
__far = 0
else
__far = \1 ; 0: dw | 1: dba | 2: dab
endc
enum_start
endm
jumptable: MACRO
if DEF(\1JumptableIndex)
__enum__ = __enum__ + 1
else
enum \1JumptableIndex
endc
if __far == 0
dw \1
else
if __far == 1
dba \1
else
dab \1
endc
endc
endm

View File

@ -4,25 +4,30 @@ UNDERGROUND_DOOR_CLOSED3 EQU $3f
UNDERGROUND_DOOR_OPEN1 EQU $2d
UNDERGROUND_DOOR_OPEN2 EQU $3d
UGDOOR_1 EQU $1006
UGDOOR_2 EQU $0a06
UGDOOR_3 EQU $0206
UGDOOR_4 EQU $020a
UGDOOR_5 EQU $0a0a
UGDOOR_6 EQU $100a
UGDOOR_7 EQU $0c06
UGDOOR_8 EQU $0c08
UGDOOR_9 EQU $0606
UGDOOR_10 EQU $0608
UGDOOR_11 EQU $0c0a
UGDOOR_12 EQU $0c0c
UGDOOR_13 EQU $060a
UGDOOR_14 EQU $060c
UGDOOR_15 EQU $120a
UGDOOR_16 EQU $120c
ugdoor: macro
\1_YCOORD EQU \2
\1_XCOORD EQU \3
endm
ugdoor UGDOOR_1, $10, $06
ugdoor UGDOOR_2, $0a, $06
ugdoor UGDOOR_3, $02, $06
ugdoor UGDOOR_4, $02, $0a
ugdoor UGDOOR_5, $0a, $0a
ugdoor UGDOOR_6, $10, $0a
ugdoor UGDOOR_7, $0c, $06
ugdoor UGDOOR_8, $0c, $08
ugdoor UGDOOR_9, $06, $06
ugdoor UGDOOR_10, $06, $08
ugdoor UGDOOR_11, $0c, $0a
ugdoor UGDOOR_12, $0c, $0c
ugdoor UGDOOR_13, $06, $0a
ugdoor UGDOOR_14, $06, $0c
ugdoor UGDOOR_15, $12, $0a
ugdoor UGDOOR_16, $12, $0c
doorstate: macro
changeblock UGDOOR_\1 / $100, UGDOOR_\1 % $100, UNDERGROUND_DOOR_\2
changeblock UGDOOR_\1_YCOORD, UGDOOR_\1_XCOORD, UNDERGROUND_DOOR_\2
endm
const_value set 2

View File

@ -1222,7 +1222,7 @@ Function16d7e7: ; 16d7e7
ld a, [wcfa5]
bit 6, a
jr z, .asm_16d7f4
callba Function8cf62
callba PlaySpriteAnimationsAndDelayFrame
.asm_16d7f4
call JoyTextDelay

View File

@ -423,7 +423,7 @@ wSpriteAnimationStructs::
sprite_anim_struct: MACRO
\1Index:: ds 1 ; 0
\1Sprite01:: ds 1 ; 1
\1FramesetID:: ds 1 ; 1
\1AnimSeqID:: ds 1 ; 2
\1TileID:: ds 1 ; 3
\1XCoord:: ds 1 ; 4
@ -465,8 +465,7 @@ SpriteAnim10:: sprite_anim_struct SpriteAnim10
wSpriteAnimationStructsEnd::
ds -8
wc3ac:: ds 8 ; c3ac
wSpriteAnimCount::
wc3b4:: ds 1
wSpriteAnimCount:: ds 1
wCurrSpriteOAMAddr:: ds 1
CurIcon:: ; c3b6
@ -761,11 +760,53 @@ trademon: MACRO
\1CaughtData:: ds 1 ; wc701 | wc733
\1End::
ENDM
wTrademons::
wPlayerTrademon:: trademon wPlayerTrademon
wOTTrademon:: trademon wOTTrademon
wTrademonsEnd::
ds wTrademons - @
ds wPlayerTrademon - @
; Slot Machine
wSlots::
slot_reel: MACRO
\1ReelAction:: db
\1TilemapAddr:: dw
\1Position:: db
\1SpinDistance:: db
\1SpinRate:: db
\1OAMAddr:: dw
\1XCoord:: db
\1Slot09:: ds 1
\1Slot0a:: ds 1
\1Slot0b:: ds 1
\1Slot0c:: ds 1
\1Slot0d:: ds 1
\1Slot0e:: ds 1
\1Slot0f:: ds 1
endm
; c6d0
wReel1:: slot_reel wReel1
wReel2:: slot_reel wReel2
wReel3:: slot_reel wReel3
; c700
wReel1Stopped:: ds 3
wReel2Stopped:: ds 3
wReel3Stopped:: ds 3
wSlotBias:: ds 1
wSlotBet:: ds 1
wFirstTwoReelsMatching:: ds 1
wFirstTwoReelsMatchingSevens:: ds 1
wSlotMatched:: ds 1
wCurrReelStopped:: ds 3
wPayout:: ds 2
wCurrReelXCoord:: ds 1
wCurrReelYCoord:: ds 1
ds 2
wSlotBuildingMatch:: ds 1
wSlotsDataEnd::
ds 28
wSlotsEnd::
ds wSlots - @
wc6d0::
PlayerSDefLevel:: ; c6d0
@ -932,8 +973,9 @@ EffectFailed:: ; c70d
wc70e::
FailedMessage:: ; c70e
ds 1
wEnemyGoesFirst:: ds 1
wc70f::
wEnemyGoesFirst::
ds 1
wc710::
wPlayerIsSwitching:: ds 1 ; c710
wc711::
@ -948,6 +990,7 @@ PlayerUsedMoves:: ; c712
wc716:: ds 1
wEnemySwitchMonParam::
wc717:: ds 1
wc718::
wEnemySwitchMonIndex:: ds 1
wc719:: ds 1
LastPlayerMon:: ; c71a