shithub: pokered

Download patch

ref: 25df78ecf338b150cb78fbd0409aa8fe47a4a0dd
parent: 18053c4dd047849faccea31ef880cb8ac51b9684
author: Bryan Bishop <kanzure@gmail.com>
date: Sun Jan 29 16:44:52 EST 2012

extract spritesheets into .2bpp files

hg-commit-id: 294542bfff57


diff: cannot open b/gfx/sprites//null: file does not exist: 'b/gfx/sprites//null'
--- a/extras/sprite_helper.py
+++ b/extras/sprite_helper.py
@@ -1,11 +1,10 @@
-from extract_maps import *
-spacing = "	"
-load_rom()
-load_map_pointers()
-read_all_map_headers()
+import extract_maps
+spacing = "\t"
 
 #provided by sawakita
-constants = {
+#these were originally used for making the initial_icon_constants
+#but the label names in constants.asm have since been edited
+initial_icon_constants = {
 0x01: ["Hiro", ""],
 0x02: ["Rival", ""],
 0x03: ["Oak", ""],
@@ -80,6 +79,85 @@
 0x48: ["lying old man", ""],
 }
 
+#somewhat more recent sprite labels
+sprite_constants = {
+0x01: "SPRITE_RED",
+0x02: "SPRITE_BLUE",
+0x03: "SPRITE_OAK",
+0x04: "SPRITE_BUG_CATCHER",
+0x05: "SPRITE_SLOWBRO",
+0x06: "SPRITE_LASS",
+0x07: "SPRITE_BLACK_HAIR_BOY_1",
+0x08: "SPRITE_LITTLE_GIRL",
+0x09: "SPRITE_BIRD",
+0x0a: "SPRITE_FAT_BALD_GUY",
+0x0b: "SPRITE_GAMBLER",
+0x0c: "SPRITE_BLACK_HAIR_BOY_2",
+0x0d: "SPRITE_GIRL",
+0x0e: "SPRITE_HIKER",
+0x0f: "SPRITE_FOULARD_WOMAN",
+0x10: "SPRITE_GENTLEMAN",
+0x11: "SPRITE_DAISY",
+0x12: "SPRITE_BIKER",
+0x13: "SPRITE_SAILOR",
+0x14: "SPRITE_COOK",
+0x15: "SPRITE_BIKE_SHOP_GUY",
+0x16: "SPRITE_MR_FUJI",
+0x17: "SPRITE_GIOVANNI",
+0x18: "SPRITE_ROCKET",
+0x19: "SPRITE_MEDIUM",
+0x1a: "SPRITE_WAITER",
+0x1b: "SPRITE_ERIKA",
+0x1c: "SPRITE_MOM_GEISHA",
+0x1d: "SPRITE_BRUNETTE_GIRL",
+0x1e: "SPRITE_LANCE",
+0x1f: "SPRITE_OAK_SCIENTIST_AIDE",
+0x20: "SPRITE_OAK_AIDE",
+0x21: "SPRITE_ROCKER",
+0x22: "SPRITE_SWIMMER",
+0x23: "SPRITE_WHITE_PLAYER",
+0x24: "SPRITE_GYM_HELPER",
+0x25: "SPRITE_OLD_PERSON",
+0x26: "SPRITE_MART_GUY",
+0x27: "SPRITE_FISHER",
+0x28: "SPRITE_OLD_MEDIUM_WOMAN",
+0x29: "SPRITE_NURSE",
+0x2a: "SPRITE_CABLE_CLUB_WOMAN",
+0x2b: "SPRITE_MR_MASTERBALL",
+0x2c: "SPRITE_LAPRAS_GIVER",
+0x2d: "SPRITE_WARDEN",
+0x2e: "SPRITE_SS_CAPTAIN",
+0x2f: "SPRITE_FISHER2",
+0x30: "SPRITE_BLACKBELT",
+0x31: "SPRITE_GUARD",
+0x32: "SPRITE_____NOT____USED____",
+0x33: "SPRITE_MOM",
+0x34: "SPRITE_BALDING_GUY",
+0x35: "SPRITE_YOUNG_BOY",
+0x36: "SPRITE_GAMEBOY_KID",
+0x37: "SPRITE_GAMEBOY_KID_COPY",
+0x38: "SPRITE_CLEFAIRY",
+0x39: "SPRITE_AGATHA",
+0x3a: "SPRITE_BRUNO",
+0x3b: "SPRITE_LORELEI",
+0x3c: "SPRITE_SEEL",
+0x3d: "SPRITE_BALL",
+0x3e: "SPRITE_OMANYTE",
+0x3f: "SPRITE_BOULDER",
+0x40: "SPRITE_PAPER_SHEET",
+0x41: "SPRITE_BOOK_MAP_DEX",
+0x42: "SPRITE_CLIPBOARD",
+0x43: "SPRITE_SNORLAX",
+0x44: "SPRITE_OLD_AMBER_COPY",
+0x45: "SPRITE_OLD_AMBER",
+0x46: "SPRITE_LYING_OLD_MAN_UNUSED_1",
+0x47: "SPRITE_LYING_OLD_MAN_UNUSED_2",
+0x48: "SPRITE_LYING_OLD_MAN",
+}
+dont_use = [0x32, 0x44, 0x46, 0x47, 0x37]
+#sprites after 0x23 have only one image
+#SPRITE_BIKE_SHOP_GUY only has 1
+
 icons = {}
 unique_icons = set()
 todo_sprites = {}
@@ -111,8 +189,8 @@
         icon = icons[icon_id]
         
         possible_name = ""
-        if icon_id in constants.keys():
-            possible_name = " (sawakita suggests: " + constants[icon_id][0] + ")"
+        if icon_id in initial_icon_constants.keys():
+            possible_name = " (sawakita suggests: " + initial_icon_constants[icon_id][0] + ")"
     
         output += "sprite " + hex(icon_id) + possible_name + ":\n"
         for appearance in icon:
@@ -127,9 +205,9 @@
     load_icons()
     counter = 1
     for icon in unique_icons:
-        if icon not in constants:
+        if icon not in initial_icon_constants:
             todo_sprites[icon] = counter
-            constants[icon] = None
+            initial_icon_constants[icon] = None
             counter += 1
 
 def sprite_name_cleaner(badname):
@@ -148,8 +226,8 @@
     "makes up better constant names for each sprite"
     insert_todo_sprites()
 
-    for sprite_id in constants:
-        suggestions = constants[sprite_id]
+    for sprite_id in initial_icon_constants:
+        suggestions = initial_icon_constants[sprite_id]
         if suggestions == None:
             sprites[sprite_id] = "SPRITE_TODO_" + str(todo_sprites[sprite_id])
             continue #next please
@@ -161,6 +239,8 @@
         sprites[sprite_id] = result
 
 def sprite_printer():
+    """prints out a list of sprite constants to put into constants.asm
+    it's deprecated- use the names from the current file instead."""
     for key in sprites:
         line_length = len(sprites[key]) + len(" EQU $") + 2
         
@@ -173,9 +253,150 @@
         
         print sprites[key] + extra + " EQU $" + value
 
-sprite_namer()
+def parse_sprite_sheet_pointer_table():
+    """parses the bytes making up the pointer table
+    first two bytes are the pointer
+    third byte is the number of bytes (1 * 4 tiles * 16 bytes each, or 3 * 4 tiles * 16 bytes per tile)
+        1 = 1 pose
+        3 = 3 poses, possibly 6 immediately after
+        $C0 or $40
+    fourth byte is the rom bank
+    
+    so a quick estimation is that, if it has 3, and there's no other pointer that points to the one after the 3rd & next 3, then assume those next 3 are the 4th, 5th and 6th
+    """
+    rom = extract_maps.rom
+    ptable_address = 0x17b27 #5:7b27
+    ptable_pointers = []
+    ptable_sheet_data = {}
+
+    #load up pointers please
+    for sprite_id in sprite_constants.keys():
+        pointer_offset = 0x17b27 + ((sprite_id -1) * 4)
+        pointer_byte1 = ord(rom[pointer_offset])
+        pointer_byte2 = ord(rom[pointer_offset+1])
+        partial_pointer = (pointer_byte1 + (pointer_byte2 << 8))
+        bank = ord(rom[pointer_offset+3])
+        pointer = extract_maps.calculate_pointer(partial_pointer, bank)
+        ptable_pointers.append(pointer)
+
+    #72 sprite pointers, we're not using id=$32
+    for sprite_id in sprite_constants.keys():
+        sprite_name = sprite_constants[sprite_id]
+
+        #some basic information about this sprite first
+        data_entry = {"sprite_id": sprite_id, "sprite_name": sprite_name}
+
+        #calculate where it is in the 0x17b27 pointer table
+        pointer_offset = 0x17b27 + ((sprite_id -1) * 4)
+        data_entry["sprite_ptr_table_entry_address"] = pointer_offset
+
+        #actual sprite pointer
+        pointer_byte1 = ord(rom[pointer_offset])
+        pointer_byte2 = ord(rom[pointer_offset+1])
+        partial_pointer = (pointer_byte1 + (pointer_byte2 << 8))
+        bank = ord(rom[pointer_offset+3])
+        pointer = extract_maps.calculate_pointer(partial_pointer, bank)
+        data_entry["pointer"] = pointer
+        data_entry["bank"] = bank
+
+        byte_count = ord(rom[pointer_offset+2])
+        data_entry["byte_count"] = byte_count
+
+        has_more_text = ""
+        data_entry["poses"] = 1
+        if byte_count == 0xc0: #has at least 3 poses
+            setter1, setter2, setter3 = False, False, False
+            data_entry["poses"] = 3
+            #let's check if there's possibly more
+            if not ((byte_count + pointer) in ptable_pointers): #yep, probably (#4)
+                data_entry["poses"] += 1
+                data_entry["byte_count"] += 64
+                setter1 = True
+            if setter1 and not ((byte_count + pointer + 64) in ptable_pointers): #has another (#5)
+                data_entry["poses"] += 1
+                data_entry["byte_count"] += 64
+                setter2 = True
+            if setter2 and not ((byte_count + pointer + 64 + 64) in ptable_pointers): #has a #6
+                data_entry["poses"] += 1
+                data_entry["byte_count"] += 64
+                setter3 = True
+
+        print ("$%.2x " % (sprite_id)) + sprite_name + " has $%.2x bytes" % (byte_count) + " pointing to 0x%.x" % (pointer) + " bank is $%.2x" % (bank) + " with pose_count=" + str(data_entry["poses"])
+
+        ptable_sheet_data[sprite_id] = data_entry
+    return ptable_sheet_data
+
+def pretty_print_sheet_incbins(ptable_sheet_data):
+    """make things look less awful"""
+    output = ""
+    used_addresses = []
+
+    for sheet_id in ptable_sheet_data:
+        sheet_data = ptable_sheet_data[sheet_id]
+        name = sheet_data["sprite_name"].split("SPRITE_")[1].lower().title()
+        clean_name = name.replace("_", "")
+        address = sheet_data["pointer"]
+        byte_count = sheet_data["byte_count"]
+
+        #if not (0x10000 <= address <= 0x12e7f): continue #skip
+        #if not (0x14180 <= address <= 0x17840): continue #skip
+        if address in used_addresses: continue #skip
+        used_addresses.append(address)
+
+        output += clean_name + "Sprite: ; 0x%.x" % (address) + "\n"
+        #output += spacing + "INCBIN \"baserom.gbc\",$%.x,$%.x - $%.x" % (address, address + byte_count, address) + "\n"
+        output += spacing + "INCBIN \"gfx/sprites/" + name.lower() + ".2bpp\" ; was $%.x" % (address) + "\n"
+
+        filename = "../gfx/sprites/" + name.lower() + ".2bpp"
+        #fh = open(filename, "w")
+        #fh.write(extract_maps.rom[address : address + byte_count])
+        #fh.close()
+
+    return output
+
+def pretty_print_sheet_data(ptable_sheet_data):
+    """make the pointer table not suck so much"""
+    output = "SpriteSheetPointerTable: ; 0x17b27\n"
+    used_addresses = []
+
+    for sheet_id in ptable_sheet_data:
+        sheet_data = ptable_sheet_data[sheet_id]
+        address = sheet_data["pointer"]
+        checker = False
+        for x in used_addresses:
+            if not checker and x[0] == address:
+                checker = True
+                clean_name = x[1]
+
+        if not checker:
+            name = sheet_data["sprite_name"].split("SPRITE_")[1].lower().title()
+            clean_name = name.replace("_", "")
+            clean_name += "Sprite"
+
+        byte_count = sheet_data["byte_count"]
+        if byte_count > 0x40:
+            byte_count = 0xc0
+
+        output += "\n\t; " + sprite_constants[sheet_data["sprite_id"]] + "\n"
+        output += spacing + "dw " + clean_name + "\n"
+        output += spacing + "db $%.2x ; byte count\n" % (byte_count)
+        output += spacing + "db BANK(" + clean_name + ")\n"
+
+        used_addresses.append((address, clean_name))
+
+    output += "; 0x17c47"
+    return output
+
 if __name__ == "__main__":
+    extract_maps.load_rom()
+    #extract_maps.load_map_pointers()
+    #extract_maps.read_all_map_headers()
+
+    #sprite_namer()
     #load_icons()
     #print_appearances()
-    sprite_printer()
-
+    #sprite_printer()
+    
+    ptable_sheet_data = parse_sprite_sheet_pointer_table()
+    print pretty_print_sheet_incbins(ptable_sheet_data)
+    print pretty_print_sheet_data(ptable_sheet_data)
binary files /dev/null b/gfx/sprites/agatha.2bpp differ
--- /dev/null
+++ b/gfx/sprites/balding_guy.2bpp
@@ -1,0 +1,3 @@
+?0PFB�����8��+�b�B?0>9OyN0?�|����r�����pp????WSoP��������������+p?8w_p_8?����������pp	������|��|�|�L�H��`���0�0�����
\ No newline at end of file
binary files /dev/null b/gfx/sprites/ball.2bpp differ
--- /dev/null
+++ b/gfx/sprites/bike_shop_guy.2bpp
@@ -1,0 +1,1 @@
+????{q^~_�������������z~�/>>1O}N;<�||����r�<���pp????__����������������?3?<[X69���<���l��x��pp����������������		��p���(�0�����
\ No newline at end of file
--- /dev/null
+++ b/gfx/sprites/biker.2bpp
@@ -1,0 +1,2 @@
+???:?0ToR���������\��*�J?0?'<'�x���<��x������??????_o_����������������?0?/</����<���������	
+�����������~�<�$?9gc??��0������c���??t`��ߤ������������T��`<3OxO?<��0��xȰ�����``??��߿����������������`?0_x_7???��0��x�������``???7?4�������������x�H+</3s����~99��`��������|
\ No newline at end of file
binary files /dev/null b/gfx/sprites/bird.2bpp differ
binary files /dev/null b/gfx/sprites/black_hair_boy_1.2bpp differ
binary files /dev/null b/gfx/sprites/black_hair_boy_2.2bpp differ
binary files /dev/null b/gfx/sprites/blackbelt.2bpp differ
binary files /dev/null b/gfx/sprites/blue.2bpp differ
binary files /dev/null b/gfx/sprites/book_map_dex.2bpp differ
--- /dev/null
+++ b/gfx/sprites/boulder.2bpp
@@ -1,0 +1,2 @@
+? @@�����������������ߠ��UjB}%?���V�
+�T��
\ No newline at end of file
binary files /dev/null b/gfx/sprites/brunette_girl.2bpp differ
binary files /dev/null b/gfx/sprites/bruno.2bpp differ
binary files /dev/null b/gfx/sprites/bug_catcher.2bpp differ
--- /dev/null
+++ b/gfx/sprites/cable_club_woman.2bpp
@@ -1,0 +1,1 @@
+ ?"?'=Ox����0���D�����G��ny	�Ov�����������`` ? ? ?@����0���������h	��8���������``(?>3�� �������>�~�����`�������
\ No newline at end of file
binary files /dev/null b/gfx/sprites/clefairy.2bpp differ
binary files /dev/null b/gfx/sprites/clipboard.2bpp differ
binary files /dev/null b/gfx/sprites/cook.2bpp differ
binary files /dev/null b/gfx/sprites/daisy.2bpp differ
binary files /dev/null b/gfx/sprites/erika.2bpp differ
binary files /dev/null b/gfx/sprites/fat_bald_guy.2bpp differ
--- /dev/null
+++ b/gfx/sprites/fisher.2bpp
@@ -1,0 +1,1 @@
+p��pOoR���0�������J?0>9wO~I6?�|���~�l����ppp��pOoW���0��������?3?8WwX0?����������pp?0pO?0����������,��p�����0� ���
\ No newline at end of file
binary files /dev/null b/gfx/sprites/fisher2.2bpp differ
binary files /dev/null b/gfx/sprites/foulard_woman.2bpp differ
binary files /dev/null b/gfx/sprites/gambler.2bpp differ
--- /dev/null
+++ b/gfx/sprites/gameboy_kid.2bpp
@@ -1,0 +1,1 @@
+?7S@oR��������������J?3

��p����(�0����pp????_Oo_����������������;7</?+��<����������pp???9��������������|�

��p����(�0���
\ No newline at end of file
binary files /dev/null b/gfx/sprites/gentleman.2bpp differ
binary files /dev/null b/gfx/sprites/giovanni.2bpp differ
binary files /dev/null b/gfx/sprites/girl.2bpp differ
--- /dev/null
+++ b/gfx/sprites/guard.2bpp
@@ -1,0 +1,2 @@
+8??7RB���x�x�����J�B?0??gyN?�x������r����xx????xW@��������������?0??x?������������xx#?G>1��������������8
+�0�@���`�`�`���
\ No newline at end of file
--- /dev/null
+++ b/gfx/sprites/gym_helper.2bpp
@@ -1,0 +1,1 @@
+?&?9V@��������d���j�.1=&?'t���d��X�����pp????o_uO��������������^�?0????��8����(�����pp�����������|���X��`��� � �����
\ No newline at end of file
binary files /dev/null b/gfx/sprites/hiker.2bpp differ
binary files /dev/null b/gfx/sprites/lance.2bpp differ
--- /dev/null
+++ b/gfx/sprites/lapras_giver.2bpp
@@ -1,0 +1,2 @@
+???7P@oV���������+��j?0>9OyO<?�|�����<�����pp????_Oo_����������������?7?8_p_8?�����������pp??�����������x���P�`�����0�0�
\ No newline at end of file
binary files /dev/null b/gfx/sprites/lass.2bpp differ
binary files /dev/null b/gfx/sprites/little_girl.2bpp differ
binary files /dev/null b/gfx/sprites/lorelei.2bpp differ
binary files /dev/null b/gfx/sprites/lying_old_man.2bpp differ
--- /dev/null
+++ b/gfx/sprites/mart_guy.2bpp
@@ -1,0 +1,1 @@
+?0VIoY����������j����?6>9OyO<?�l|�����<�����pp??_OoS����������������?0?8_p_0?����������pp?3?<�������������<�<�8�p��P��0� ���
\ No newline at end of file
binary files /dev/null b/gfx/sprites/medium.2bpp differ
--- /dev/null
+++ b/gfx/sprites/mom.2bpp
@@ -1,0 +1,1 @@
+??;<78b��������|��<��Fr~yw<'?(�N~���<���8�0��??????�����x����������??:-������\��xH����7;=3?4����������������
��������Ԭ�
\ No newline at end of file
--- /dev/null
+++ b/gfx/sprites/mom_geisha.2bpp
@@ -1,0 +1,1 @@
+;>?8���������|��H�H	?/?(?<p���������<�8��;?=?��p���������x���?/_X~���������~����>?=3�����������������x�p������������;>?8���������|��H�H	?/?(?<p���������<�8��;?=?��p���������x���?/_X~���������x����7?=7?1������������������0��`��p����
\ No newline at end of file
--- /dev/null
+++ b/gfx/sprites/mr_fuji.2bpp
@@ -1,0 +1,7 @@
+(7P@oR���`0���+��J?0/9M~^??9???����~z��������/0PP@���`0���++�?0_xW~Os?39?>>���~����8���||>!? ? ?(��� p�����d�? �x�����������(7P@oR���`0���+��J?0Oy_~??����~����8�0���/0P@oP���`0���+�+?0_x_~Os?3���~����8�0���	#<}B@@P���@� ������(@>1=#�(��p� �p���p
\ No newline at end of file
--- /dev/null
+++ b/gfx/sprites/mr_masterball.2bpp
@@ -1,0 +1,1 @@
+?6yoYF>1�����l�����b|�x����?????/������������xx??_O?0�������������wx����?????/�������������xx�����<�|����������8�8����
\ No newline at end of file
binary files /dev/null b/gfx/sprites/nurse.2bpp differ
binary files /dev/null b/gfx/sprites/oak.2bpp differ
binary files /dev/null b/gfx/sprites/oak_aide.2bpp differ
binary files /dev/null b/gfx/sprites/old_amber.2bpp differ
--- /dev/null
+++ b/gfx/sprites/old_medium_woman.2bpp
@@ -1,0 +1,2 @@
+? ?!?&_x?&���08�����d��d
	</?'�p������x<�����? ? ? _`? ���08������
+</?'��0��P�X�<�����? ?,?3?0���08��������?#��0�� ���8���
\ No newline at end of file
--- /dev/null
+++ b/gfx/sprites/old_person.2bpp
@@ -1,0 +1,3 @@
+(7oVIoY���08����j����?6?9_~_??9?>>�l���~�������||/0PP@���08���++�?0_xW~Os?39?>>���~����8���||>!?8<'?$���0x�����d|�?8�x��������
\ No newline at end of file
binary files /dev/null b/gfx/sprites/omanyte.2bpp differ
binary files /dev/null b/gfx/sprites/paper_sheet.2bpp differ
binary files /dev/null b/gfx/sprites/red.2bpp differ
binary files /dev/null b/gfx/sprites/rocker.2bpp differ
binary files /dev/null b/gfx/sprites/rocket.2bpp differ
binary files /dev/null b/gfx/sprites/sailor.2bpp differ
binary files /dev/null b/gfx/sprites/seel.2bpp differ
binary files /dev/null b/gfx/sprites/slowbro.2bpp differ
binary files /dev/null b/gfx/sprites/snorlax.2bpp differ
--- /dev/null
+++ b/gfx/sprites/ss_captain.2bpp
@@ -1,0 +1,1 @@
+7???wXF��x�x��������b>1=:LL?:|��\�2�2�\����pp0???p_pO�������������87?8__??������������pp????�������������			h���`���0�0�
\ No newline at end of file
binary files /dev/null b/gfx/sprites/swimmer.2bpp differ
binary files /dev/null b/gfx/sprites/waiter.2bpp differ
--- /dev/null
+++ b/gfx/sprites/warden.2bpp
@@ -1,0 +1,1 @@
+?6poR@>1�����l��J�|�x����|3?,?3/������>��4���xx??_O?0�������������wx����|3?>?3/�����>��|���xx�����<�|�|��������(�(���� 
\ No newline at end of file
--- /dev/null
+++ b/gfx/sprites/white_player.2bpp
@@ -1,0 +1,3 @@
+;<?7PB����8��<��+�B?0>9OI?8�|�������x��pp?0?8_O�����������?7?8_P?8����+��x��pp;4}B??��������������`���0�0�� ��
\ No newline at end of file
binary files /dev/null b/gfx/sprites/young_boy.2bpp differ
--- a/main.asm
+++ b/main.asm
@@ -13640,8 +13640,63 @@
 
 SECTION "bank4",DATA,BANK[$4]
 
-INCBIN "baserom.gbc",$10000,$12e7f - $10000
+OakAideSprite: ; 0x10000
+	INCBIN "gfx/sprites/oak_aide.2bpp" ; was $10000
+RockerSprite: ; 0x10180
+	INCBIN "gfx/sprites/rocker.2bpp" ; was $10180
+SwimmerSprite: ; 0x10300
+	INCBIN "gfx/sprites/swimmer.2bpp" ; was $10300
+WhitePlayerSprite: ; 0x10480
+	INCBIN "gfx/sprites/white_player.2bpp" ; was $10480
+GymHelperSprite: ; 0x10540
+	INCBIN "gfx/sprites/gym_helper.2bpp" ; was $10540
+OldPersonSprite: ; 0x10600
+	INCBIN "gfx/sprites/old_person.2bpp" ; was $10600
+MartGuySprite: ; 0x106c0
+	INCBIN "gfx/sprites/mart_guy.2bpp" ; was $106c0
+FisherSprite: ; 0x10780
+	INCBIN "gfx/sprites/fisher.2bpp" ; was $10780
+OldMediumWomanSprite: ; 0x10840
+	INCBIN "gfx/sprites/old_medium_woman.2bpp" ; was $10840
+NurseSprite: ; 0x10900
+	INCBIN "gfx/sprites/nurse.2bpp" ; was $10900
+CableClubWomanSprite: ; 0x109c0
+	INCBIN "gfx/sprites/cable_club_woman.2bpp" ; was $109c0
+MrMasterballSprite: ; 0x10a80
+	INCBIN "gfx/sprites/mr_masterball.2bpp" ; was $10a80
+LaprasGiverSprite: ; 0x10b40
+	INCBIN "gfx/sprites/lapras_giver.2bpp" ; was $10b40
+WardenSprite: ; 0x10c00
+	INCBIN "gfx/sprites/warden.2bpp" ; was $10c00
+SsCaptainSprite: ; 0x10cc0
+	INCBIN "gfx/sprites/ss_captain.2bpp" ; was $10cc0
+Fisher2Sprite: ; 0x10d80
+	INCBIN "gfx/sprites/fisher2.2bpp" ; was $10d80
+BlackbeltSprite: ; 0x10f00
+	INCBIN "gfx/sprites/blackbelt.2bpp" ; was $10f00
+GuardSprite: ; 0x11080
+	INCBIN "gfx/sprites/guard.2bpp" ; was $11080
+BallSprite: ; 0x11140
+	INCBIN "gfx/sprites/ball.2bpp" ; was $11140
+OmanyteSprite: ; 0x11180
+	INCBIN "gfx/sprites/omanyte.2bpp" ; was $11180
+BoulderSprite: ; 0x111c0
+	INCBIN "gfx/sprites/boulder.2bpp" ; was $111c0
+PaperSheetSprite: ; 0x11200
+	INCBIN "gfx/sprites/paper_sheet.2bpp" ; was $11200
+BookMapDexSprite: ; 0x11240
+	INCBIN "gfx/sprites/book_map_dex.2bpp" ; was $11240
+ClipboardSprite: ; 0x11280
+	INCBIN "gfx/sprites/clipboard.2bpp" ; was $11280
+SnorlaxSprite: ; 0x112c0
+	INCBIN "gfx/sprites/snorlax.2bpp" ; was $112c0
+OldAmberSprite: ; 0x11300
+	INCBIN "gfx/sprites/old_amber.2bpp" ; was $11300
+LyingOldManSprite: ; 0x11340
+	INCBIN "gfx/sprites/lying_old_man.2bpp" ; was $11340
 
+INCBIN "baserom.gbc",$11380,$12e7f - $11380
+
 UnnamedText_12e7f: ; 0x12e7f
 	TX_FAR _UnnamedText_12e7f
 	db $50
@@ -13871,7 +13926,452 @@
 
 SECTION "bank5",DATA,BANK[$5]
 
-INCBIN "baserom.gbc",$14000,$17e1d - $14000
+INCBIN "baserom.gbc",$14000,$14180 - $14000
+
+RedSprite: ; 0x14180
+	INCBIN "gfx/sprites/red.2bpp" ; was $14180
+BlueSprite: ; 0x14300
+	INCBIN "gfx/sprites/blue.2bpp" ; was $14300
+OakSprite: ; 0x14480
+	INCBIN "gfx/sprites/oak.2bpp" ; was $14480
+BugCatcherSprite: ; 0x14600
+	INCBIN "gfx/sprites/bug_catcher.2bpp" ; was $14600
+SlowbroSprite: ; 0x14780
+	INCBIN "gfx/sprites/slowbro.2bpp" ; was $14780
+LassSprite: ; 0x14900
+	INCBIN "gfx/sprites/lass.2bpp" ; was $14900
+BlackHairBoy1Sprite: ; 0x14a80
+	INCBIN "gfx/sprites/black_hair_boy_1.2bpp" ; was $14a80
+LittleGirlSprite: ; 0x14c00
+	INCBIN "gfx/sprites/little_girl.2bpp" ; was $14c00
+BirdSprite: ; 0x14d80
+	INCBIN "gfx/sprites/bird.2bpp" ; was $14d80
+FatBaldGuySprite: ; 0x14f00
+	INCBIN "gfx/sprites/fat_bald_guy.2bpp" ; was $14f00
+GamblerSprite: ; 0x15080
+	INCBIN "gfx/sprites/gambler.2bpp" ; was $15080
+BlackHairBoy2Sprite: ; 0x15200
+	INCBIN "gfx/sprites/black_hair_boy_2.2bpp" ; was $15200
+GirlSprite: ; 0x15380
+	INCBIN "gfx/sprites/girl.2bpp" ; was $15380
+HikerSprite: ; 0x15500
+	INCBIN "gfx/sprites/hiker.2bpp" ; was $15500
+FoulardWomanSprite: ; 0x15680
+	INCBIN "gfx/sprites/foulard_woman.2bpp" ; was $15680
+GentlemanSprite: ; 0x15800
+	INCBIN "gfx/sprites/gentleman.2bpp" ; was $15800
+DaisySprite: ; 0x15980
+	INCBIN "gfx/sprites/daisy.2bpp" ; was $15980
+BikerSprite: ; 0x15b00
+	INCBIN "gfx/sprites/biker.2bpp" ; was $15b00
+SailorSprite: ; 0x15c80
+	INCBIN "gfx/sprites/sailor.2bpp" ; was $15c80
+CookSprite: ; 0x15e00
+	INCBIN "gfx/sprites/cook.2bpp" ; was $15e00
+BikeShopGuySprite: ; 0x15f80
+	INCBIN "gfx/sprites/bike_shop_guy.2bpp" ; was $15f80
+MrFujiSprite: ; 0x16040
+	INCBIN "gfx/sprites/mr_fuji.2bpp" ; was $16040
+GiovanniSprite: ; 0x161c0
+	INCBIN "gfx/sprites/giovanni.2bpp" ; was $161c0
+RocketSprite: ; 0x16340
+	INCBIN "gfx/sprites/rocket.2bpp" ; was $16340
+MediumSprite: ; 0x164c0
+	INCBIN "gfx/sprites/medium.2bpp" ; was $164c0
+WaiterSprite: ; 0x16640
+	INCBIN "gfx/sprites/waiter.2bpp" ; was $16640
+ErikaSprite: ; 0x167c0
+	INCBIN "gfx/sprites/erika.2bpp" ; was $167c0
+MomGeishaSprite: ; 0x16940
+	INCBIN "gfx/sprites/mom_geisha.2bpp" ; was $16940
+BrunetteGirlSprite: ; 0x16ac0
+	INCBIN "gfx/sprites/brunette_girl.2bpp" ; was $16ac0
+LanceSprite: ; 0x16c40
+	INCBIN "gfx/sprites/lance.2bpp" ; was $16c40
+MomSprite: ; 0x16dc0
+	INCBIN "gfx/sprites/mom.2bpp" ; was $16dc0
+BaldingGuySprite: ; 0x16e80
+	INCBIN "gfx/sprites/balding_guy.2bpp" ; was $16e80
+YoungBoySprite: ; 0x16f40
+	INCBIN "gfx/sprites/young_boy.2bpp" ; was $16f40
+GameboyKidSprite: ; 0x17000
+	INCBIN "gfx/sprites/gameboy_kid.2bpp" ; was $17000
+ClefairySprite: ; 0x170c0
+	INCBIN "gfx/sprites/clefairy.2bpp" ; was $170c0
+AgathaSprite: ; 0x17240
+	INCBIN "gfx/sprites/agatha.2bpp" ; was $17240
+BrunoSprite: ; 0x173c0
+	INCBIN "gfx/sprites/bruno.2bpp" ; was $173c0
+LoreleiSprite: ; 0x17540
+	INCBIN "gfx/sprites/lorelei.2bpp" ; was $17540
+SeelSprite: ; 0x176c0
+	INCBIN "gfx/sprites/seel.2bpp" ; was $176c0
+
+INCBIN "baserom.gbc",$17840,$17b27 - $17840
+
+SpriteSheetPointerTable: ; 0x17b27
+	; SPRITE_RED
+	dw RedSprite
+	db $c0 ; byte count
+	db BANK(RedSprite)
+
+	; SPRITE_BLUE
+	dw BlueSprite
+	db $c0 ; byte count
+	db BANK(BlueSprite)
+
+	; SPRITE_OAK
+	dw OakSprite
+	db $c0 ; byte count
+	db BANK(OakSprite)
+
+	; SPRITE_BUG_CATCHER
+	dw BugCatcherSprite
+	db $c0 ; byte count
+	db BANK(BugCatcherSprite)
+
+	; SPRITE_SLOWBRO
+	dw SlowbroSprite
+	db $c0 ; byte count
+	db BANK(SlowbroSprite)
+
+	; SPRITE_LASS
+	dw LassSprite
+	db $c0 ; byte count
+	db BANK(LassSprite)
+
+	; SPRITE_BLACK_HAIR_BOY_1
+	dw BlackHairBoy1Sprite
+	db $c0 ; byte count
+	db BANK(BlackHairBoy1Sprite)
+
+	; SPRITE_LITTLE_GIRL
+	dw LittleGirlSprite
+	db $c0 ; byte count
+	db BANK(LittleGirlSprite)
+
+	; SPRITE_BIRD
+	dw BirdSprite
+	db $c0 ; byte count
+	db BANK(BirdSprite)
+
+	; SPRITE_FAT_BALD_GUY
+	dw FatBaldGuySprite
+	db $c0 ; byte count
+	db BANK(FatBaldGuySprite)
+
+	; SPRITE_GAMBLER
+	dw GamblerSprite
+	db $c0 ; byte count
+	db BANK(GamblerSprite)
+
+	; SPRITE_BLACK_HAIR_BOY_2
+	dw BlackHairBoy2Sprite
+	db $c0 ; byte count
+	db BANK(BlackHairBoy2Sprite)
+
+	; SPRITE_GIRL
+	dw GirlSprite
+	db $c0 ; byte count
+	db BANK(GirlSprite)
+
+	; SPRITE_HIKER
+	dw HikerSprite
+	db $c0 ; byte count
+	db BANK(HikerSprite)
+
+	; SPRITE_FOULARD_WOMAN
+	dw FoulardWomanSprite
+	db $c0 ; byte count
+	db BANK(FoulardWomanSprite)
+
+	; SPRITE_GENTLEMAN
+	dw GentlemanSprite
+	db $c0 ; byte count
+	db BANK(GentlemanSprite)
+
+	; SPRITE_DAISY
+	dw DaisySprite
+	db $c0 ; byte count
+	db BANK(DaisySprite)
+
+	; SPRITE_BIKER
+	dw BikerSprite
+	db $c0 ; byte count
+	db BANK(BikerSprite)
+
+	; SPRITE_SAILOR
+	dw SailorSprite
+	db $c0 ; byte count
+	db BANK(SailorSprite)
+
+	; SPRITE_COOK
+	dw CookSprite
+	db $c0 ; byte count
+	db BANK(CookSprite)
+
+	; SPRITE_BIKE_SHOP_GUY
+	dw BikeShopGuySprite
+	db $c0 ; byte count
+	db BANK(BikeShopGuySprite)
+
+	; SPRITE_MR_FUJI
+	dw MrFujiSprite
+	db $c0 ; byte count
+	db BANK(MrFujiSprite)
+
+	; SPRITE_GIOVANNI
+	dw GiovanniSprite
+	db $c0 ; byte count
+	db BANK(GiovanniSprite)
+
+	; SPRITE_ROCKET
+	dw RocketSprite
+	db $c0 ; byte count
+	db BANK(RocketSprite)
+
+	; SPRITE_MEDIUM
+	dw MediumSprite
+	db $c0 ; byte count
+	db BANK(MediumSprite)
+
+	; SPRITE_WAITER
+	dw WaiterSprite
+	db $c0 ; byte count
+	db BANK(WaiterSprite)
+
+	; SPRITE_ERIKA
+	dw ErikaSprite
+	db $c0 ; byte count
+	db BANK(ErikaSprite)
+
+	; SPRITE_MOM_GEISHA
+	dw MomGeishaSprite
+	db $c0 ; byte count
+	db BANK(MomGeishaSprite)
+
+	; SPRITE_BRUNETTE_GIRL
+	dw BrunetteGirlSprite
+	db $c0 ; byte count
+	db BANK(BrunetteGirlSprite)
+
+	; SPRITE_LANCE
+	dw LanceSprite
+	db $c0 ; byte count
+	db BANK(LanceSprite)
+
+	; SPRITE_OAK_SCIENTIST_AIDE
+	dw OakAideSprite
+	db $c0 ; byte count
+	db BANK(OakAideSprite)
+
+	; SPRITE_OAK_AIDE
+	dw OakAideSprite
+	db $c0 ; byte count
+	db BANK(OakAideSprite)
+
+	; SPRITE_ROCKER
+	dw RockerSprite
+	db $c0 ; byte count
+	db BANK(RockerSprite)
+
+	; SPRITE_SWIMMER
+	dw SwimmerSprite
+	db $c0 ; byte count
+	db BANK(SwimmerSprite)
+
+	; SPRITE_WHITE_PLAYER
+	dw WhitePlayerSprite
+	db $c0 ; byte count
+	db BANK(WhitePlayerSprite)
+
+	; SPRITE_GYM_HELPER
+	dw GymHelperSprite
+	db $c0 ; byte count
+	db BANK(GymHelperSprite)
+
+	; SPRITE_OLD_PERSON
+	dw OldPersonSprite
+	db $c0 ; byte count
+	db BANK(OldPersonSprite)
+
+	; SPRITE_MART_GUY
+	dw MartGuySprite
+	db $c0 ; byte count
+	db BANK(MartGuySprite)
+
+	; SPRITE_FISHER
+	dw FisherSprite
+	db $c0 ; byte count
+	db BANK(FisherSprite)
+
+	; SPRITE_OLD_MEDIUM_WOMAN
+	dw OldMediumWomanSprite
+	db $c0 ; byte count
+	db BANK(OldMediumWomanSprite)
+
+	; SPRITE_NURSE
+	dw NurseSprite
+	db $c0 ; byte count
+	db BANK(NurseSprite)
+
+	; SPRITE_CABLE_CLUB_WOMAN
+	dw CableClubWomanSprite
+	db $c0 ; byte count
+	db BANK(CableClubWomanSprite)
+
+	; SPRITE_MR_MASTERBALL
+	dw MrMasterballSprite
+	db $c0 ; byte count
+	db BANK(MrMasterballSprite)
+
+	; SPRITE_LAPRAS_GIVER
+	dw LaprasGiverSprite
+	db $c0 ; byte count
+	db BANK(LaprasGiverSprite)
+
+	; SPRITE_WARDEN
+	dw WardenSprite
+	db $c0 ; byte count
+	db BANK(WardenSprite)
+
+	; SPRITE_SS_CAPTAIN
+	dw SsCaptainSprite
+	db $c0 ; byte count
+	db BANK(SsCaptainSprite)
+
+	; SPRITE_FISHER2
+	dw Fisher2Sprite
+	db $c0 ; byte count
+	db BANK(Fisher2Sprite)
+
+	; SPRITE_BLACKBELT
+	dw BlackbeltSprite
+	db $c0 ; byte count
+	db BANK(BlackbeltSprite)
+
+	; SPRITE_GUARD
+	dw GuardSprite
+	db $c0 ; byte count
+	db BANK(GuardSprite)
+
+	; $32
+	dw GuardSprite
+	db $c0 ; byte count
+	db BANK(GuardSprite)
+
+	; SPRITE_MOM
+	dw MomSprite
+	db $c0 ; byte count
+	db BANK(MomSprite)
+
+	; SPRITE_BALDING_GUY
+	dw BaldingGuySprite
+	db $c0 ; byte count
+	db BANK(BaldingGuySprite)
+
+	; SPRITE_YOUNG_BOY
+	dw YoungBoySprite
+	db $c0 ; byte count
+	db BANK(YoungBoySprite)
+
+	; SPRITE_GAMEBOY_KID
+	dw GameboyKidSprite
+	db $c0 ; byte count
+	db BANK(GameboyKidSprite)
+
+	; SPRITE_GAMEBOY_KID_COPY
+	dw GameboyKidSprite
+	db $c0 ; byte count
+	db BANK(GameboyKidSprite)
+
+	; SPRITE_CLEFAIRY
+	dw ClefairySprite
+	db $c0 ; byte count
+	db BANK(ClefairySprite)
+
+	; SPRITE_AGATHA
+	dw AgathaSprite
+	db $c0 ; byte count
+	db BANK(AgathaSprite)
+
+	; SPRITE_BRUNO
+	dw BrunoSprite
+	db $c0 ; byte count
+	db BANK(BrunoSprite)
+
+	; SPRITE_LORELEI
+	dw LoreleiSprite
+	db $c0 ; byte count
+	db BANK(LoreleiSprite)
+
+	; SPRITE_SEEL
+	dw SeelSprite
+	db $c0 ; byte count
+	db BANK(SeelSprite)
+
+	; SPRITE_BALL
+	dw BallSprite
+	db $40 ; byte count
+	db BANK(BallSprite)
+
+	; SPRITE_OMANYTE
+	dw OmanyteSprite
+	db $40 ; byte count
+	db BANK(OmanyteSprite)
+
+	; SPRITE_BOULDER
+	dw BoulderSprite
+	db $40 ; byte count
+	db BANK(BoulderSprite)
+
+	; SPRITE_PAPER_SHEET
+	dw PaperSheetSprite
+	db $40 ; byte count
+	db BANK(PaperSheetSprite)
+
+	; SPRITE_BOOK_MAP_DEX
+	dw BookMapDexSprite
+	db $40 ; byte count
+	db BANK(BookMapDexSprite)
+
+	; SPRITE_CLIPBOARD
+	dw ClipboardSprite
+	db $40 ; byte count
+	db BANK(ClipboardSprite)
+
+	; SPRITE_SNORLAX
+	dw SnorlaxSprite
+	db $40 ; byte count
+	db BANK(SnorlaxSprite)
+
+	; SPRITE_OLD_AMBER_COPY
+	dw OldAmberSprite
+	db $40 ; byte count
+	db BANK(OldAmberSprite)
+
+	; SPRITE_OLD_AMBER
+	dw OldAmberSprite
+	db $40 ; byte count
+	db BANK(OldAmberSprite)
+
+	; SPRITE_LYING_OLD_MAN_UNUSED_1
+	dw LyingOldManSprite
+	db $40 ; byte count
+	db BANK(LyingOldManSprite)
+
+	; SPRITE_LYING_OLD_MAN_UNUSED_2
+	dw LyingOldManSprite
+	db $40 ; byte count
+	db BANK(LyingOldManSprite)
+
+	; SPRITE_LYING_OLD_MAN
+	dw LyingOldManSprite
+	db $40 ; byte count
+	db BANK(LyingOldManSprite)
+; 0x17c47
+
+INCBIN "baserom.gbc",$17c47,$17e1d - $17c47
 
 UnnamedText_17e1d: ; 0x17e1d
 	TX_FAR _UnnamedText_17e1d