# Conflicts:
#	engine/items/mart.asm
This commit is contained in:
Rangi
2018-06-24 21:23:51 -04:00
1206 changed files with 14376 additions and 24565 deletions

View File

@@ -1,4 +1,4 @@
InitList: ; 50db9
InitList:
ld a, [wInitListType]
cp INIT_ENEMYOT_LIST

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
LinkMonStatsScreen: ; 4d319
LinkMonStatsScreen:
ld a, [wMenuCursorY]
dec a
ld [wCurPartyMon], a
@@ -17,12 +17,12 @@ LinkMonStatsScreen: ; 4d319
call WaitBGMap2
ret
Link_WaitBGMap: ; 4d354
Link_WaitBGMap:
call WaitBGMap
call WaitBGMap2
ret
LinkTextbox2: ; 4d35b
LinkTextbox2:
ld h, d
ld l, e
push bc
@@ -52,9 +52,8 @@ LinkTextbox2: ; 4d35b
dec b
jr nz, .row
ret
; 4d37e
.PlaceBorder: ; 4d37e
.PlaceBorder:
push hl
ld a, $76
ld [hli], a
@@ -84,9 +83,8 @@ LinkTextbox2: ; 4d35b
call .PlaceRow
ld [hl], $7d
ret
; 4d3ab
.PlaceRow: ; 4d3ab
.PlaceRow:
ld d, c
.row_loop
ld [hli], a

View File

@@ -1,24 +1,21 @@
LinkCommsBorderGFX:
INCBIN "gfx/trade/border_tiles.2bpp"
; 16d421
__LoadTradeScreenBorder: ; 16d421
__LoadTradeScreenBorder:
ld de, LinkCommsBorderGFX
ld hl, vTiles2
lb bc, BANK(LinkCommsBorderGFX), 70
call Get2bpp
ret
; 16d42e
Function16d42e: ; 16d42e
Function16d42e:
ld hl, Tilemap_MobileTradeBorderFullscreen
decoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyBytes
ret
; 16d43b
Function16d43b: ; 16d43b
Function16d43b:
call LoadStandardMenuHeader
call ClearBGPalettes
call ClearTileMap
@@ -32,7 +29,6 @@ Function16d43b: ; 16d43b
call JoyWaitAorB
call Call_ExitMenu
ret
; 16d465
Tilemap_MobileTradeBorderFullscreen:
INCBIN "gfx/trade/border_mobile_fullscreen.tilemap"
@@ -43,7 +39,7 @@ INCBIN "gfx/trade/border_cable_top.tilemap"
Tilemap_CableTradeBorderBottom:
INCBIN "gfx/trade/border_cable_bottom.tilemap"
_LinkTextbox: ; 16d61d
_LinkTextbox:
ld h, d
ld l, e
push bc
@@ -73,9 +69,8 @@ _LinkTextbox: ; 16d61d
dec b
jr nz, .row
ret
; 16d640
.PlaceBorder ; 16d640
.PlaceBorder
push hl
ld a, $30
ld [hli], a
@@ -105,18 +100,16 @@ _LinkTextbox: ; 16d61d
call .PlaceRow
ld [hl], $37
ret
; 16d66d
.PlaceRow ; 16d66d
.PlaceRow
ld d, c
.row_loop
ld [hli], a
dec d
jr nz, .row_loop
ret
; 16d673
InitTradeSpeciesList: ; 16d673
InitTradeSpeciesList:
call _LoadTradeScreenBorder
call Function16d6ae
farcall InitMG_Mobile_LinkTradePalMap
@@ -125,32 +118,27 @@ InitTradeSpeciesList: ; 16d673
ld de, .CANCEL
call PlaceString
ret
; 16d68f
.CANCEL: ; 16d68f
.CANCEL:
db "CANCEL@"
; 16d696
_LoadTradeScreenBorder: ; 16d696
_LoadTradeScreenBorder:
call __LoadTradeScreenBorder
ret
; 16d69a
LinkComms_LoadPleaseWaitTextboxBorderGFX: ; 16d69a
LinkComms_LoadPleaseWaitTextboxBorderGFX:
ld de, LinkCommsBorderGFX + $30 tiles
ld hl, vTiles2 tile $76
lb bc, BANK(LinkCommsBorderGFX), 8
call Get2bpp
ret
; 16d6a7
LoadTradeRoomBGPals_: ; 16d6a7
LoadTradeRoomBGPals_:
farcall LoadTradeRoomBGPals
ret
; 16d6ae
Function16d6ae: ; 16d6ae
Function16d6ae:
call Function16d42e
ld hl, Tilemap_CableTradeBorderTop
decoord 0, 0
@@ -161,23 +149,20 @@ Function16d6ae: ; 16d6ae
ld bc, 2 * SCREEN_WIDTH
call CopyBytes
ret
; 16d6ca
LinkTextbox: ; 16d6ca
LinkTextbox:
call _LinkTextbox
ret
; 16d6ce
Function16d6ce: ; 16d6ce
Function16d6ce:
call LoadStandardMenuHeader
call Function16d6e1
farcall WaitLinkTransfer
call Call_ExitMenu
call WaitBGMap2
ret
; 16d6e1
Function16d6e1: ; 16d6e1
Function16d6e1:
hlcoord 4, 10
ld b, 1
ld c, 10
@@ -189,19 +174,16 @@ Function16d6e1: ; 16d6e1
call WaitBGMap2
ld c, 50
jp DelayFrames
; 16d701
.Waiting: ; 16d701
.Waiting:
db "WAITING..!@"
; 16d70c
LinkTradeMenu: ; 16d70c
LinkTradeMenu:
call .MenuAction
call .GetJoypad
ret
; 16d713
.GetJoypad: ; 16d713
.GetJoypad:
push bc
push af
ld a, [hJoyLast]
@@ -216,9 +198,8 @@ LinkTradeMenu: ; 16d70c
pop bc
ld d, a
ret
; 16d725
.MenuAction: ; 16d725
.MenuAction:
ld hl, w2DMenuFlags2
res 7, [hl]
ld a, [hBGMapMode]
@@ -246,9 +227,8 @@ LinkTradeMenu: ; 16d70c
.done
ret
; 16d759
.UpdateBGMapAndOAM: ; 16d759
.UpdateBGMapAndOAM:
ld a, [hOAMUpdate]
push af
ld a, $1
@@ -269,9 +249,8 @@ LinkTradeMenu: ; 16d70c
jr z, .loop2
and a
ret
; 16d77a
.UpdateCursor: ; 16d77a
.UpdateCursor:
ld hl, wCursorCurrentTile
ld a, [hli]
ld h, [hl]
@@ -346,9 +325,8 @@ LinkTradeMenu: ; 16d70c
ld a, h
ld [wCursorCurrentTile + 1], a
ret
; 16d7e7
.TryAnims: ; 16d7e7
.TryAnims:
ld a, [w2DMenuFlags1]
bit 6, a
jr z, .skip_anims
@@ -360,4 +338,3 @@ LinkTradeMenu: ; 16d70c
ret z
scf
ret
; 16d7fe

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
PrepMysteryGiftDataToSend: ; 2c642 (b:4642)
PrepMysteryGiftDataToSend:
ld de, wMysteryGiftStaging
ld a, $1
ld [de], a
@@ -56,7 +56,7 @@ PrepMysteryGiftDataToSend: ; 2c642 (b:4642)
ld bc, wMysteryGiftPlayerDataEnd - wMysteryGiftPlayerData
jp CopyBytes
.RandomSample: ; 2c6ac (b:46ac)
.RandomSample:
push de
call Random
cp 10 percent
@@ -121,7 +121,7 @@ PrepMysteryGiftDataToSend: ; 2c642 (b:4642)
pop de
ret
MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708)
MysteryGiftGetItemHeldEffect:
ld a, c
cp MysteryGiftItems.End - MysteryGiftItems
jr nc, MysteryGiftFallbackItem
@@ -131,7 +131,7 @@ MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708)
ld c, [hl]
ret
MysteryGiftGetDecoration: ; 2c715 (b:4715)
MysteryGiftGetDecoration:
ld a, c
cp MysteryGiftDecos.End - MysteryGiftDecos
jr nc, MysteryGiftFallbackItem
@@ -141,10 +141,9 @@ MysteryGiftGetDecoration: ; 2c715 (b:4715)
ld c, [hl]
ret
MysteryGiftFallbackItem: ; 2c722 (b:4722)
MysteryGiftFallbackItem:
ld c, DECO_POLKADOT_BED ; GREAT_BALL
ret
; 2c725 (b:4725)
INCLUDE "data/items/mystery_gift_items.asm"

View File

@@ -1,4 +1,4 @@
PlaceWaitingText:: ; 4000
PlaceWaitingText::
hlcoord 3, 10
ld b, 1
ld c, 11
@@ -20,5 +20,5 @@ PlaceWaitingText:: ; 4000
ld c, 50
jp DelayFrames
.Waiting: ; 4025
.Waiting:
db "Waiting...!@"

View File

@@ -1,6 +1,6 @@
; These functions seem to be related to backwards compatibility
ValidateOTTrademon: ; fb57e
ValidateOTTrademon:
ld a, [wd003]
ld hl, wOTPartyMon1Species
call GetPartyLocation
@@ -63,9 +63,8 @@ ValidateOTTrademon: ; fb57e
.abnormal
scf
ret
; fb5dd
Functionfb5dd: ; fb5dd
Functionfb5dd:
ld a, [wd002]
ld d, a
ld a, [wPartyCount]
@@ -100,9 +99,8 @@ Functionfb5dd: ; fb5dd
.done
and a
ret
; fb60d
PlaceTradePartnerNamesAndParty: ; fb60d
PlaceTradePartnerNamesAndParty:
hlcoord 4, 0
ld de, wPlayerName
call PlaceString
@@ -118,7 +116,7 @@ PlaceTradePartnerNamesAndParty: ; fb60d
call .PlaceSpeciesNames
hlcoord 7, 9
ld de, wOTPartySpecies
.PlaceSpeciesNames: ; fb634
.PlaceSpeciesNames:
ld c, $0
.loop
ld a, [de]
@@ -142,6 +140,5 @@ PlaceTradePartnerNamesAndParty: ; fb60d
pop bc
inc c
jr .loop
; fb656
INCLUDE "data/pokemon/gen1_base_special.asm"

View File

@@ -1,4 +1,4 @@
ConvertMon_2to1: ; fb8f1
ConvertMon_2to1:
; Takes the Gen-2 Pokemon number stored in wd265, finds it in the Pokered_MonIndices table, and returns its index in wd265.
push bc
push hl
@@ -16,9 +16,8 @@ ConvertMon_2to1: ; fb8f1
pop hl
pop bc
ret
; fb908
ConvertMon_1to2: ; fb908
ConvertMon_1to2:
; Takes the Gen-1 Pokemon number stored in wd265 and returns the corresponding value from Pokered_MonIndices in wd265.
push bc
push hl
@@ -33,7 +32,6 @@ ConvertMon_1to2: ; fb908
pop hl
pop bc
ret
; fb91c
INCLUDE "data/pokemon/gen1_order.asm"