Skip to content

Commit

Permalink
Convert miscellaneous Pokémon IDs in ROM to 16-bit, 3
Browse files Browse the repository at this point in the history
Features involved:
- In-game NPC trades
- Miscellaneous leftover mobile code
- Overworld Pokémon sprites
- Player's room decorations

Co-Authored-By: aaaaaa123456789 <aaaaaa123456789@acidch.at>
  • Loading branch information
aaaaaa123456789 authored and vulcandth committed Oct 7, 2022
1 parent f264996 commit 248dd03
Show file tree
Hide file tree
Showing 13 changed files with 250 additions and 126 deletions.
2 changes: 2 additions & 0 deletions constants/16_bit_locking_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
const LOCKED_MON_ID_MAP_8
NUM_MAP_LOCKED_MON_IDS EQU const_value + -LOCKED_MON_ID_MAP_1
const LOCKED_MON_ID_DEX_SELECTED
const LOCKED_MON_ID_TRADE_SEND
const LOCKED_MON_ID_TRADE_RECEIVE

if const_value > MON_TABLE_LOCKED_ENTRIES
fail "Too many locked Pokémon IDs"
Expand Down
8 changes: 4 additions & 4 deletions constants/npc_trade_constants.asm
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
; npctrade struct members (see data/events/npc_trades.asm)
rsreset
DEF NPCTRADE_DIALOG rb
DEF NPCTRADE_GIVEMON rb
DEF NPCTRADE_GETMON rb
DEF NPCTRADE_GIVEMON rw
DEF NPCTRADE_GETMON rw
DEF NPCTRADE_NICKNAME rb MON_NAME_LENGTH
DEF NPCTRADE_DVS rw
DEF NPCTRADE_ITEM rb
DEF NPCTRADE_OT_ID rw
DEF NPCTRADE_OT_NAME rb NAME_LENGTH
DEF NPCTRADE_OT_NAME rb PLAYER_NAME_LENGTH
DEF NPCTRADE_GENDER rb
rb_skip
rb_skip 2
DEF NPCTRADE_STRUCT_LENGTH EQU _RS

; NPCTrades indexes (see data/events/npc_trades.asm)
Expand Down
77 changes: 51 additions & 26 deletions data/decorations/attributes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,65 @@ DecorationAttributes:
decoration DECO_PLANT, JUMBOPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_3, $22
decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_POSTER, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0
decoration DECO_PLANT, TOWN_MAP_POSTER, SET_UP_POSTER, EVENT_DECO_POSTER_1, $1f
decoration DECO_POSTER, PIKACHU, SET_UP_POSTER, EVENT_DECO_POSTER_2, $23
decoration DECO_POSTER, CLEFAIRY, SET_UP_POSTER, EVENT_DECO_POSTER_3, $24
decoration DECO_POSTER, JIGGLYPUFF, SET_UP_POSTER, EVENT_DECO_POSTER_4, $25
decoration DECO_POSTER, 4, SET_UP_POSTER, EVENT_DECO_POSTER_1, $23
decoration DECO_POSTER, 5, SET_UP_POSTER, EVENT_DECO_POSTER_2, $24
decoration DECO_POSTER, 6, SET_UP_POSTER, EVENT_DECO_POSTER_3, $25
decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CONSOLE, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0
decoration DECO_PLANT, FAMICOM, SET_UP_CONSOLE, EVENT_DECO_FAMICOM, SPRITE_FAMICOM
decoration DECO_PLANT, SUPER_NES, SET_UP_CONSOLE, EVENT_DECO_SNES, SPRITE_SNES
decoration DECO_PLANT, NINTENDO_64, SET_UP_CONSOLE, EVENT_DECO_N64, SPRITE_N64
decoration DECO_PLANT, VIRTUAL_BOY, SET_UP_CONSOLE, EVENT_DECO_VIRTUAL_BOY, SPRITE_VIRTUAL_BOY
decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BIG_DOLL, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0
decoration DECO_BIGDOLL, SNORLAX, SET_UP_BIG_DOLL, EVENT_DECO_BIG_SNORLAX_DOLL, SPRITE_BIG_SNORLAX
decoration DECO_BIGDOLL, ONIX, SET_UP_BIG_DOLL, EVENT_DECO_BIG_ONIX_DOLL, SPRITE_BIG_ONIX
decoration DECO_BIGDOLL, LAPRAS, SET_UP_BIG_DOLL, EVENT_DECO_BIG_LAPRAS_DOLL, SPRITE_BIG_LAPRAS
decoration DECO_BIGDOLL, 21, SET_UP_BIG_DOLL, EVENT_DECO_BIG_SNORLAX_DOLL, SPRITE_BIG_SNORLAX
decoration DECO_BIGDOLL, 16, SET_UP_BIG_DOLL, EVENT_DECO_BIG_ONIX_DOLL, SPRITE_BIG_ONIX
decoration DECO_BIGDOLL, 20, SET_UP_BIG_DOLL, EVENT_DECO_BIG_LAPRAS_DOLL, SPRITE_BIG_LAPRAS
decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_DOLL, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0
decoration DECO_DOLL, PIKACHU, SET_UP_DOLL, EVENT_DECO_PIKACHU_DOLL, SPRITE_PIKACHU
decoration DECO_DOLL, 4, SET_UP_DOLL, EVENT_DECO_PIKACHU_DOLL, SPRITE_PIKACHU
decoration DECO_PLANT, SURF_PIKA_DOLL, SET_UP_DOLL, EVENT_DECO_SURFING_PIKACHU_DOLL, SPRITE_SURFING_PIKACHU
decoration DECO_DOLL, CLEFAIRY, SET_UP_DOLL, EVENT_DECO_CLEFAIRY_DOLL, SPRITE_CLEFAIRY
decoration DECO_DOLL, JIGGLYPUFF, SET_UP_DOLL, EVENT_DECO_JIGGLYPUFF_DOLL, SPRITE_JIGGLYPUFF
decoration DECO_DOLL, BULBASAUR, SET_UP_DOLL, EVENT_DECO_BULBASAUR_DOLL, SPRITE_BULBASAUR
decoration DECO_DOLL, CHARMANDER, SET_UP_DOLL, EVENT_DECO_CHARMANDER_DOLL, SPRITE_CHARMANDER
decoration DECO_DOLL, SQUIRTLE, SET_UP_DOLL, EVENT_DECO_SQUIRTLE_DOLL, SPRITE_SQUIRTLE
decoration DECO_DOLL, POLIWAG, SET_UP_DOLL, EVENT_DECO_POLIWAG_DOLL, SPRITE_POLIWAG
decoration DECO_DOLL, DIGLETT, SET_UP_DOLL, EVENT_DECO_DIGLETT_DOLL, SPRITE_DIGLETT
decoration DECO_DOLL, STARYU, SET_UP_DOLL, EVENT_DECO_STARMIE_DOLL, SPRITE_STARMIE
decoration DECO_DOLL, MAGIKARP, SET_UP_DOLL, EVENT_DECO_MAGIKARP_DOLL, SPRITE_MAGIKARP
decoration DECO_DOLL, ODDISH, SET_UP_DOLL, EVENT_DECO_ODDISH_DOLL, SPRITE_ODDISH
decoration DECO_DOLL, GENGAR, SET_UP_DOLL, EVENT_DECO_GENGAR_DOLL, SPRITE_GENGAR
decoration DECO_DOLL, SHELLDER, SET_UP_DOLL, EVENT_DECO_SHELLDER_DOLL, SPRITE_SHELLDER
decoration DECO_DOLL, GRIMER, SET_UP_DOLL, EVENT_DECO_GRIMER_DOLL, SPRITE_GRIMER
decoration DECO_DOLL, VOLTORB, SET_UP_DOLL, EVENT_DECO_VOLTORB_DOLL, SPRITE_VOLTORB
decoration DECO_DOLL, WEEDLE, SET_UP_DOLL, EVENT_DECO_WEEDLE_DOLL, SPRITE_WEEDLE
decoration DECO_DOLL, UNOWN, SET_UP_DOLL, EVENT_DECO_UNOWN_DOLL, SPRITE_UNOWN
decoration DECO_DOLL, GEODUDE, SET_UP_DOLL, EVENT_DECO_GEODUDE_DOLL, SPRITE_GEODUDE
decoration DECO_DOLL, MACHOP, SET_UP_DOLL, EVENT_DECO_MACHOP_DOLL, SPRITE_MACHOP
decoration DECO_DOLL, TENTACOOL, SET_UP_DOLL, EVENT_DECO_TENTACOOL_DOLL, SPRITE_TENTACOOL
decoration DECO_DOLL, 5, SET_UP_DOLL, EVENT_DECO_CLEFAIRY_DOLL, SPRITE_CLEFAIRY
decoration DECO_DOLL, 6, SET_UP_DOLL, EVENT_DECO_JIGGLYPUFF_DOLL, SPRITE_JIGGLYPUFF
decoration DECO_DOLL, 0, SET_UP_DOLL, EVENT_DECO_BULBASAUR_DOLL, SPRITE_BULBASAUR
decoration DECO_DOLL, 1, SET_UP_DOLL, EVENT_DECO_CHARMANDER_DOLL, SPRITE_CHARMANDER
decoration DECO_DOLL, 2, SET_UP_DOLL, EVENT_DECO_SQUIRTLE_DOLL, SPRITE_SQUIRTLE
decoration DECO_DOLL, 9, SET_UP_DOLL, EVENT_DECO_POLIWAG_DOLL, SPRITE_POLIWAG
decoration DECO_DOLL, 8, SET_UP_DOLL, EVENT_DECO_DIGLETT_DOLL, SPRITE_DIGLETT
decoration DECO_DOLL, 18, SET_UP_DOLL, EVENT_DECO_STARMIE_DOLL, SPRITE_STARMIE
decoration DECO_DOLL, 19, SET_UP_DOLL, EVENT_DECO_MAGIKARP_DOLL, SPRITE_MAGIKARP
decoration DECO_DOLL, 7, SET_UP_DOLL, EVENT_DECO_ODDISH_DOLL, SPRITE_ODDISH
decoration DECO_DOLL, 15, SET_UP_DOLL, EVENT_DECO_GENGAR_DOLL, SPRITE_GENGAR
decoration DECO_DOLL, 14, SET_UP_DOLL, EVENT_DECO_SHELLDER_DOLL, SPRITE_SHELLDER
decoration DECO_DOLL, 13, SET_UP_DOLL, EVENT_DECO_GRIMER_DOLL, SPRITE_GRIMER
decoration DECO_DOLL, 17, SET_UP_DOLL, EVENT_DECO_VOLTORB_DOLL, SPRITE_VOLTORB
decoration DECO_DOLL, 3, SET_UP_DOLL, EVENT_DECO_WEEDLE_DOLL, SPRITE_WEEDLE
decoration DECO_DOLL, 22, SET_UP_DOLL, EVENT_DECO_UNOWN_DOLL, SPRITE_UNOWN
decoration DECO_DOLL, 12, SET_UP_DOLL, EVENT_DECO_GEODUDE_DOLL, SPRITE_GEODUDE
decoration DECO_DOLL, 10, SET_UP_DOLL, EVENT_DECO_MACHOP_DOLL, SPRITE_MACHOP
decoration DECO_DOLL, 11, SET_UP_DOLL, EVENT_DECO_TENTACOOL_DOLL, SPRITE_TENTACOOL
decoration DECO_PLANT, GOLD_TROPHY, SET_UP_DOLL, EVENT_DECO_GOLD_TROPHY, SPRITE_GOLD_TROPHY
decoration DECO_PLANT, SILVER_TROPHY, SET_UP_DOLL, EVENT_DECO_SILVER_TROPHY, SPRITE_SILVER_TROPHY
assert_table_length NUM_DECOS + NUM_DECO_CATEGORIES + 1

DecorationAttributePokemonNames:
dw BULBASAUR ; 0
dw CHARMANDER ; 1
dw SQUIRTLE ; 2
dw WEEDLE ; 3
dw PIKACHU ; 4
dw CLEFAIRY ; 5
dw JIGGLYPUFF ; 6
dw ODDISH ; 7
dw DIGLETT ; 8
dw POLIWAG ; 9
dw MACHOP ; 10
dw TENTACOOL ; 11
dw GEODUDE ; 12
dw GRIMER ; 13
dw SHELLDER ; 14
dw GENGAR ; 15
dw ONIX ; 16
dw VOLTORB ; 17
dw STARYU ; 18
dw MAGIKARP ; 19
dw LAPRAS ; 20
dw SNORLAX ; 21
dw UNOWN ; 22
24 changes: 14 additions & 10 deletions data/events/npc_trades.asm
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
MACRO npctrade
; dialog set, requested mon, offered mon, nickname, dvs, item, OT ID, OT name, gender requested
db \1, \2, \3, \4, \5, \6, \7
dw \8
db \9, \<10>, 0
db \1
dw \2, \3
db \4, \5, \6, \7
shift
dw \7
db \8, \9
db 0, 0
ENDM

NPCTrades:
; entries correspond to NPCTRADE_* constants
table_width NPCTRADE_STRUCT_LENGTH, NPCTrades
npctrade TRADE_DIALOGSET_COLLECTOR, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_COLLECTOR, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_HAPPY, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, 29189, "TIM@@@@@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_GIRL, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, 00283, "EMY@@@@@@@@", TRADE_GENDER_FEMALE
npctrade TRADE_DIALOGSET_NEWBIE, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, 15616, "CHRIS@@@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_GIRL, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, 26491, "KIM@@@@@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_COLLECTOR, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, 50082, "FOREST@@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_COLLECTOR, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, 37460, "MIKE@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_COLLECTOR, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, 48926, "KYLE@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_HAPPY, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, 29189, "TIM@@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_GIRL, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, 00283, "EMY@@@@@", TRADE_GENDER_FEMALE
npctrade TRADE_DIALOGSET_NEWBIE, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, 15616, "CHRIS@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_GIRL, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, 26491, "KIM@@@@@", TRADE_GENDER_EITHER
npctrade TRADE_DIALOGSET_COLLECTOR, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, 50082, "FOREST@@", TRADE_GENDER_EITHER
assert_table_length NUM_NPC_TRADES
72 changes: 36 additions & 36 deletions data/sprites/sprite_mons.asm
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
SpriteMons:
; entries correspond to SPRITE_* constants past SPRITE_POKEMON
table_width 1, SpriteMons
db UNOWN
db GEODUDE
db GROWLITHE
db WEEDLE
db SHELLDER
db ODDISH
db GENGAR
db ZUBAT
db MAGIKARP
db SQUIRTLE
db TOGEPI
db BUTTERFREE
db DIGLETT
db POLIWAG
db PIKACHU
db CLEFAIRY
db CHARMANDER
db JYNX
db STARMIE
db BULBASAUR
db JIGGLYPUFF
db GRIMER
db EKANS
db PARAS
db TENTACOOL
db TAUROS
db MACHOP
db VOLTORB
db LAPRAS
db RHYDON
db MOLTRES
db SNORLAX
db GYARADOS
db LUGIA
db HO_OH
table_width 2, SpriteMons
dw UNOWN
dw GEODUDE
dw GROWLITHE
dw WEEDLE
dw SHELLDER
dw ODDISH
dw GENGAR
dw ZUBAT
dw MAGIKARP
dw SQUIRTLE
dw TOGEPI
dw BUTTERFREE
dw DIGLETT
dw POLIWAG
dw PIKACHU
dw CLEFAIRY
dw CHARMANDER
dw JYNX
dw STARMIE
dw BULBASAUR
dw JIGGLYPUFF
dw GRIMER
dw EKANS
dw PARAS
dw TENTACOOL
dw TAUROS
dw MACHOP
dw VOLTORB
dw LAPRAS
dw RHYDON
dw MOLTRES
dw SNORLAX
dw GYARADOS
dw LUGIA
dw HO_OH
assert_table_length NUM_POKEMON_SPRITES
Loading

0 comments on commit 248dd03

Please sign in to comment.