Simplify EnlargedTiles

This commit is contained in:
PikalaxALT 2015-12-11 11:50:49 -05:00
parent 15a03a2577
commit b65fe57db6
2 changed files with 29 additions and 46 deletions

View File

@ -256,7 +256,7 @@ Special_FindThatSpeciesYourTrainerID: ; c284
jr FoundOne jr FoundOne
FoundOne: ; c292 FoundOne: ; c292
ld a, $1 ld a, TRUE
ld [ScriptVar], a ld [ScriptVar], a
ret ret
@ -334,11 +334,11 @@ Special_GetMysteryGiftItem: ; c309
call GetSRAMBank call GetSRAMBank
ld a, [sMysteryGiftItem] ld a, [sMysteryGiftItem]
ld [CurItem], a ld [CurItem], a
ld a, $1 ld a, 1
ld [wItemQuantityChangeBuffer], a ld [wItemQuantityChangeBuffer], a
ld hl, NumItems ld hl, NumItems
call ReceiveItem call ReceiveItem
jr nc, .asm_c33d jr nc, .no_room
xor a xor a
ld [sMysteryGiftItem], a ld [sMysteryGiftItem], a
call CloseSRAM call CloseSRAM
@ -347,11 +347,11 @@ Special_GetMysteryGiftItem: ; c309
call GetItemName call GetItemName
ld hl, .ReceiveItemText ld hl, .ReceiveItemText
call PrintText call PrintText
ld a, $1 ld a, TRUE
ld [ScriptVar], a ld [ScriptVar], a
ret ret
.asm_c33d .no_room
call CloseSRAM call CloseSRAM
xor a xor a
ld [ScriptVar], a ld [ScriptVar], a
@ -433,35 +433,35 @@ Special_CheckCoins: ; c3ae
ld hl, Coins ld hl, Coins
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr z, .asm_c3c4 jr z, .no_coins
ld a, COIN_CASE ld a, COIN_CASE
ld [CurItem], a ld [CurItem], a
ld hl, NumItems ld hl, NumItems
call CheckItem call CheckItem
jr nc, .asm_c3c9 jr nc, .no_coin_case
and a and a
ret ret
.asm_c3c4 .no_coins
ld hl, UnknownText_0xc3d1 ld hl, .NoCoinsText
jr .asm_c3cc jr .print
.asm_c3c9 .no_coin_case
ld hl, UnknownText_0xc3d6 ld hl, .NoCoinCaseText
.asm_c3cc .print
call PrintText call PrintText
scf scf
ret ret
; c3d1 ; c3d1
UnknownText_0xc3d1: ; 0xc3d1 .NoCoinsText: ; 0xc3d1
; You have no coins. ; You have no coins.
text_jump UnknownText_0x1bd3d7 text_jump UnknownText_0x1bd3d7
db "@" db "@"
; 0xc3d6 ; 0xc3d6
UnknownText_0xc3d6: ; 0xc3d6 .NoCoinCaseText: ; 0xc3d6
; You don't have a COIN CASE. ; You don't have a COIN CASE.
text_jump UnknownText_0x1bd3eb text_jump UnknownText_0x1bd3eb
db "@" db "@"
@ -557,7 +557,7 @@ SpecialSnorlaxAwake: ; 0xc43d
ld hl, .ProximityCoords ld hl, .ProximityCoords
.loop .loop
ld a, [hli] ld a, [hli]
cp $ff cp -1
jr z, .nope jr z, .nope
cp b cp b
jr nz, .nextcoord jr nz, .nextcoord
@ -565,7 +565,7 @@ SpecialSnorlaxAwake: ; 0xc43d
cp c cp c
jr nz, .loop jr nz, .loop
ld a, $1 ld a, TRUE
jr .done jr .done
.nextcoord .nextcoord
@ -585,7 +585,7 @@ SpecialSnorlaxAwake: ; 0xc43d
db 35, 10 ; below db 35, 10 ; below
db 36, 8 ; right db 36, 8 ; right
db 36, 9 ; right db 36, 9 ; right
db $ff db -1
PlayCurMonCry: ; c472 PlayCurMonCry: ; c472

View File

@ -755,29 +755,12 @@ ConvertLoadedPuzzlePieces: ; e1631
; e16b7 ; e16b7
.EnlargedTiles: ; e16b7 .EnlargedTiles: ; e16b7
doubletile: MACRO
rept _NARG
x = 0 x = 0
y = 0
rept 4
x = x + (3 * (1 << (2 * y))) * ((\1 >> y) & 1)
y = y + 1
endr
db x
shift
endr
endm
__x__ = 0
rept 16 rept 16
doubletile __x__ db ((x & %1000) * %11000) + ((x & %0100) * %1100) + ((x & %0010) * %110) + ((x & %0001) * %11)
__x__ = __x__ + 1 x = x + 1
endr endr
; db $00, $03, $0c, $0f
; db $30, $33, $3c, $3f
; db $c0, $c3, $cc, $cf
; db $f0, $f3, $fc, $ff
; e16c7 ; e16c7
UnownPuzzle_AddPuzzlePieceBorders: ; e16c7 UnownPuzzle_AddPuzzlePieceBorders: ; e16c7
@ -838,14 +821,14 @@ endr
; e1703 ; e1703
GFXHeaders: ; e1703 GFXHeaders: ; e1703
dw .TileBordersGFX + $00, VTiles0 tile $00 dw .TileBordersGFX + 0 tiles, VTiles0 tile $00
dw .TileBordersGFX + $10, VTiles0 tile $01 dw .TileBordersGFX + 1 tiles, VTiles0 tile $01
dw .TileBordersGFX + $20, VTiles0 tile $02 dw .TileBordersGFX + 2 tiles, VTiles0 tile $02
dw .TileBordersGFX + $30, VTiles0 tile $0c dw .TileBordersGFX + 3 tiles, VTiles0 tile $0c
dw .TileBordersGFX + $40, VTiles0 tile $0e dw .TileBordersGFX + 4 tiles, VTiles0 tile $0e
dw .TileBordersGFX + $50, VTiles0 tile $18 dw .TileBordersGFX + 5 tiles, VTiles0 tile $18
dw .TileBordersGFX + $60, VTiles0 tile $19 dw .TileBordersGFX + 6 tiles, VTiles0 tile $19
dw .TileBordersGFX + $70, VTiles0 tile $1a dw .TileBordersGFX + 7 tiles, VTiles0 tile $1a
; e1723 ; e1723
.TileBordersGFX: ; e1723 .TileBordersGFX: ; e1723