Skip to content

Commit

Permalink
Some formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Oct 20, 2020
1 parent 5ebae47 commit bc287b9
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 61 deletions.
9 changes: 6 additions & 3 deletions audio.asm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ INCLUDE "audio/sfx/noise_instrument17_1.asm"
INCLUDE "audio/sfx/noise_instrument18_1.asm"
INCLUDE "audio/sfx/noise_instrument19_1.asm"

Audio1_WavePointers: INCLUDE "audio/wave_instruments.asm"
Audio1_WavePointers:
INCLUDE "audio/wave_instruments.asm"

INCLUDE "audio/sfx/start_menu_1.asm"
INCLUDE "audio/sfx/pokeflute.asm"
Expand Down Expand Up @@ -142,7 +143,8 @@ INCLUDE "audio/sfx/noise_instrument17_2.asm"
INCLUDE "audio/sfx/noise_instrument18_2.asm"
INCLUDE "audio/sfx/noise_instrument19_2.asm"

Audio2_WavePointers: INCLUDE "audio/wave_instruments.asm"
Audio2_WavePointers:
INCLUDE "audio/wave_instruments.asm"

INCLUDE "audio/sfx/press_ab_2.asm"
INCLUDE "audio/sfx/start_menu_2.asm"
Expand Down Expand Up @@ -267,7 +269,8 @@ INCLUDE "audio/sfx/noise_instrument17_3.asm"
INCLUDE "audio/sfx/noise_instrument18_3.asm"
INCLUDE "audio/sfx/noise_instrument19_3.asm"

Audio3_WavePointers: INCLUDE "audio/wave_instruments.asm"
Audio3_WavePointers:
INCLUDE "audio/wave_instruments.asm"

INCLUDE "audio/sfx/start_menu_3.asm"
INCLUDE "audio/sfx/cut_3.asm"
Expand Down
26 changes: 18 additions & 8 deletions data/sgb/sgb_packets.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ATTR_BLK: MACRO
db ($4 << 3) + ((\1 * 6) / 16 + 1)
db \1
ENDM

ATTR_BLK_DATA: MACRO
db \1 ; which regions are affected
db \2 + (\3 << 2) + (\4 << 4) ; palette for each region
Expand Down Expand Up @@ -51,6 +52,7 @@ DATA_SND: MACRO
db \3 ; length (1-11)
ENDM


BlkPacket_WholeScreen:
ATTR_BLK 1
ATTR_BLK_DATA %011, 0,0,0, 00,00, 19,17
Expand Down Expand Up @@ -239,13 +241,15 @@ MaskEnCancelPacket: MASK_EN 0
; This set of packets is found in several Japanese SGB-compatible titles.
; It appears to be part of NCL's SGB devkit.

DataSnd_72548: DATA_SND $85d, $0, 11
DataSnd_72548:
DATA_SND $85d, $0, 11
db $8C ; cpx #$8c (2)
db $D0, $F4 ; bne -$0c
db $60 ; rts
ds 7, 0

DataSnd_72558: DATA_SND $852, $0, 11
DataSnd_72558:
DATA_SND $852, $0, 11
db $A9, $E7 ; lda #$e7
db $9F, $01, $C0, $7E ; sta $7ec001, x
db $E8 ; inx
Expand All @@ -254,7 +258,8 @@ DataSnd_72558: DATA_SND $852, $0, 11
db $E8 ; inx
db $E0 ; cpx #$8c (1)

DataSnd_72568: DATA_SND $847, $0, 11
DataSnd_72568:
DATA_SND $847, $0, 11
db $C4 ; cmp #$c4 (2)
db $D0, $16 ; bne +$16
db $A5 ; lda dp
Expand All @@ -263,7 +268,8 @@ DataSnd_72568: DATA_SND $847, $0, 11
db $D0, $10 ; bne +$10
db $A2, $28 ; ldx #$28

DataSnd_72578: DATA_SND $83c, $0, 11
DataSnd_72578:
DATA_SND $83c, $0, 11
db $F0, $12 ; beq +$12
db $A5 ; lda dp
db $C9, $C9 ; cmp #$c9
Expand All @@ -273,23 +279,26 @@ DataSnd_72578: DATA_SND $83c, $0, 11
db $CA ; dex
db $C9 ; cmp #$c4 (1)

DataSnd_72588: DATA_SND $831, $0, 11
DataSnd_72588:
DATA_SND $831, $0, 11
dbw $0C, $CAA5 ; tsb $caa5
db $C9, $7E ; cmp #$7e
db $D0, $06 ; bne +$06
db $A5 ; lda dp
db $CB ; wai
db $C9, $7E ; cmp #$7e

DataSnd_72598: DATA_SND $826, $0, 11
DataSnd_72598:
DATA_SND $826, $0, 11
db $39 ; bne +$39 (2)
dbw $CD, $C48 ; cmp $c48
db $D0, $34 ; bne +$34
db $A5 ; lda dp
db $C9, $C9 ; cmp #$c9
db $80, $D0 ; bra -$30

DataSnd_725a8: DATA_SND $81b, $0, 11
DataSnd_725a8:
DATA_SND $81b, $0, 11
db $EA ; nop
db $EA ; nop
db $EA ; nop
Expand All @@ -300,7 +309,8 @@ DataSnd_725a8: DATA_SND $81b, $0, 11
dbw $CD,$C4F ; cmp $c4f
db $D0 ; bne +$39 (1)

DataSnd_725b8: DATA_SND $810, $0, 11
DataSnd_725b8:
DATA_SND $810, $0, 11
dbw $4C, $820 ; jmp $820
db $EA ; nop
db $EA ; nop
Expand Down
3 changes: 2 additions & 1 deletion data/text_predef_pointers.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
add_tx_pre: MACRO
\1_id:: dw \1
\1_id::
dw \1
ENDM

TextPredefs::
Expand Down
79 changes: 43 additions & 36 deletions engine/battle/battle_transitions.asm
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,18 @@ BattleTransition_FlashScreen_:
ret

BattleTransition_FlashScreenPalettes:
db $F9,$FE,$FF,$FE,$F9,$E4,$90,$40,$00,$40,$90,$E4
db %11111001
db %11111110
db %11111111
db %11111110
db %11111001
db %11100100
db %10010000
db %01000000
db %00000000
db %01000000
db %10010000
db %11100100
db 1 ; end

; used for low level trainer dungeon battles
Expand Down Expand Up @@ -646,6 +657,11 @@ BattleTransition_Circle_Sub2:
ld l, a
jp BattleTransition_Circle_Sub3

; halves
const_def
const CIRCLE_LEFT
const CIRCLE_RIGHT

half_circle: MACRO
; quadrant x, circle data, target coord
db \1
Expand All @@ -654,28 +670,28 @@ half_circle: MACRO
ENDM

BattleTransition_HalfCircle1:
half_circle $01, BattleTransition_CircleData1, 18, 6
half_circle $01, BattleTransition_CircleData2, 19, 3
half_circle $01, BattleTransition_CircleData3, 18, 0
half_circle $01, BattleTransition_CircleData4, 14, 0
half_circle $01, BattleTransition_CircleData5, 10, 0
half_circle $00, BattleTransition_CircleData5, 9, 0
half_circle $00, BattleTransition_CircleData4, 5, 0
half_circle $00, BattleTransition_CircleData3, 1, 0
half_circle $00, BattleTransition_CircleData2, 0, 3
half_circle $00, BattleTransition_CircleData1, 1, 6
half_circle CIRCLE_RIGHT, BattleTransition_CircleData1, 18, 6
half_circle CIRCLE_RIGHT, BattleTransition_CircleData2, 19, 3
half_circle CIRCLE_RIGHT, BattleTransition_CircleData3, 18, 0
half_circle CIRCLE_RIGHT, BattleTransition_CircleData4, 14, 0
half_circle CIRCLE_RIGHT, BattleTransition_CircleData5, 10, 0
half_circle CIRCLE_LEFT, BattleTransition_CircleData5, 9, 0
half_circle CIRCLE_LEFT, BattleTransition_CircleData4, 5, 0
half_circle CIRCLE_LEFT, BattleTransition_CircleData3, 1, 0
half_circle CIRCLE_LEFT, BattleTransition_CircleData2, 0, 3
half_circle CIRCLE_LEFT, BattleTransition_CircleData1, 1, 6

BattleTransition_HalfCircle2:
half_circle $00, BattleTransition_CircleData1, 1, 11
half_circle $00, BattleTransition_CircleData2, 0, 14
half_circle $00, BattleTransition_CircleData3, 1, 17
half_circle $00, BattleTransition_CircleData4, 5, 17
half_circle $00, BattleTransition_CircleData5, 9, 17
half_circle $01, BattleTransition_CircleData5, 10, 17
half_circle $01, BattleTransition_CircleData4, 14, 17
half_circle $01, BattleTransition_CircleData3, 18, 17
half_circle $01, BattleTransition_CircleData2, 19, 14
half_circle $01, BattleTransition_CircleData1, 18, 11
half_circle CIRCLE_LEFT, BattleTransition_CircleData1, 1, 11
half_circle CIRCLE_LEFT, BattleTransition_CircleData2, 0, 14
half_circle CIRCLE_LEFT, BattleTransition_CircleData3, 1, 17
half_circle CIRCLE_LEFT, BattleTransition_CircleData4, 5, 17
half_circle CIRCLE_LEFT, BattleTransition_CircleData5, 9, 17
half_circle CIRCLE_RIGHT, BattleTransition_CircleData5, 10, 17
half_circle CIRCLE_RIGHT, BattleTransition_CircleData4, 14, 17
half_circle CIRCLE_RIGHT, BattleTransition_CircleData3, 18, 17
half_circle CIRCLE_RIGHT, BattleTransition_CircleData2, 19, 14
half_circle CIRCLE_RIGHT, BattleTransition_CircleData1, 18, 11

BattleTransition_Circle_Sub3:
push hl
Expand Down Expand Up @@ -704,7 +720,7 @@ BattleTransition_Circle_Sub3:
add hl, bc
ld a, [de]
inc de
cp $ff
cp -1
ret z
and a
jr z, BattleTransition_Circle_Sub3
Expand All @@ -722,17 +738,8 @@ BattleTransition_Circle_Sub3:
jr nz, .loop2
jr BattleTransition_Circle_Sub3

BattleTransition_CircleData1:
db $02,$03,$05,$04,$09,$FF

BattleTransition_CircleData2:
db $01,$01,$02,$02,$04,$02,$04,$02,$03,$FF

BattleTransition_CircleData3:
db $02,$01,$03,$01,$04,$01,$04,$01,$04,$01,$03,$01,$02,$01,$01,$01,$01,$FF

BattleTransition_CircleData4:
db $04,$01,$04,$00,$03,$01,$03,$00,$02,$01,$02,$00,$01,$FF

BattleTransition_CircleData5:
db $04,$00,$03,$00,$03,$00,$02,$00,$02,$00,$01,$00,$01,$00,$01,$FF
BattleTransition_CircleData1: db 2, 3, 5, 4, 9, -1
BattleTransition_CircleData2: db 1, 1, 2, 2, 4, 2, 4, 2, 3, -1
BattleTransition_CircleData3: db 2, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 2, 1, 1, 1, 1, -1
BattleTransition_CircleData4: db 4, 1, 4, 0, 3, 1, 3, 0, 2, 1, 2, 0, 1, -1
BattleTransition_CircleData5: db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, -1
4 changes: 2 additions & 2 deletions engine/battle/trainer_ai.asm
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ AIMoveChoiceModification1:
jr .nextMove

StatusAilmentMoveEffects:
db $01 ; unused sleep effect
db EFFECT_01 ; unused sleep effect
db SLEEP_EFFECT
db POISON_EFFECT
db PARALYZE_EFFECT
db $FF
db -1 ; end

; slightly encourage moves with specific effects.
; in particular, stat-modifying moves and other move effects
Expand Down
8 changes: 2 additions & 6 deletions engine/movie/splash.asm
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ AnimateShootingStar:
ld c, 4
.smallStarsInnerLoop ; introduce new wave of 4 small stars OAM entries
ld a, [de]
cp $ff
cp -1
jr z, .next2
ld [hli], a ; Y
inc de
Expand Down Expand Up @@ -165,27 +165,23 @@ SmallStarsWave1Coords:
db $68, $40
db $68, $58
db $68, $78

SmallStarsWave2Coords:
db $68, $38
db $68, $48
db $68, $60
db $68, $70

SmallStarsWave3Coords:
db $68, $34
db $68, $4C
db $68, $54
db $68, $64

SmallStarsWave4Coords:
db $68, $3C
db $68, $5C
db $68, $6C
db $68, $74

SmallStarsEmptyWave:
db $FF
db -1 ; end

MoveDownSmallStars:
ld b, 8
Expand Down
3 changes: 2 additions & 1 deletion engine/overworld/field_move_messages.asm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ IsSurfingAllowed:
jp PrintText

CoordsData_cdf7:
db $0B,$07,$FF
dbmapcoord 7, 11
db -1 ; end

CurrentTooFastText:
text_far _CurrentTooFastText
Expand Down
12 changes: 8 additions & 4 deletions engine/overworld/push_boulder.asm
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,20 @@ TryPushingBoulder::
ret

PushBoulderUpMovementData:
db NPC_MOVEMENT_UP,$FF
db NPC_MOVEMENT_UP
db -1 ; end

PushBoulderDownMovementData:
db NPC_MOVEMENT_DOWN,$FF
db NPC_MOVEMENT_DOWN
db -1 ; end

PushBoulderLeftMovementData:
db NPC_MOVEMENT_LEFT,$FF
db NPC_MOVEMENT_LEFT
db -1 ; end

PushBoulderRightMovementData:
db NPC_MOVEMENT_RIGHT,$FF
db NPC_MOVEMENT_RIGHT
db -1 ; end

DoBoulderDustAnimation::
ld a, [wd730]
Expand Down

0 comments on commit bc287b9

Please sign in to comment.