Overworld enemizer work
This commit is contained in:
@@ -37,8 +37,6 @@ class EnemyStats:
|
||||
# Raven light/dark world
|
||||
|
||||
|
||||
|
||||
|
||||
class EnemySprite(FastEnum):
|
||||
Raven = 0x00
|
||||
Vulture = 0x01
|
||||
@@ -84,7 +82,7 @@ class EnemySprite(FastEnum):
|
||||
TelepathicTile = 0x2d
|
||||
FluteKid = 0x2e
|
||||
RaceGameLady = 0x2f
|
||||
|
||||
RaceGameGuy = 0x30
|
||||
FortuneTeller = 0x31
|
||||
ArgueBros = 0x32
|
||||
RupeePull = 0x33
|
||||
@@ -156,6 +154,7 @@ class EnemySprite(FastEnum):
|
||||
BottleMerchant = 0x75
|
||||
Zelda = 0x76
|
||||
Grandma = 0x78
|
||||
Bee = 0x79
|
||||
Agahnim = 0x7a
|
||||
FloatingSkull = 0x7c
|
||||
BigSpike = 0x7d
|
||||
@@ -203,7 +202,7 @@ class EnemySprite(FastEnum):
|
||||
BlueZirro = 0xa9
|
||||
Pikit = 0xaa
|
||||
CrystalMaiden = 0xab
|
||||
# ... OW
|
||||
Apple = 0xac
|
||||
OldMan = 0xad
|
||||
PipeDown = 0xae
|
||||
PipeUp = 0xaf
|
||||
@@ -242,17 +241,29 @@ class EnemySprite(FastEnum):
|
||||
BunnyBeam = 0xd1
|
||||
FloppingFish = 0xd2
|
||||
Stal = 0xd3 # alive skull rock?
|
||||
Landmine = 0xd4
|
||||
DiggingGameNPC = 0xd5
|
||||
Ganon = 0xd6
|
||||
|
||||
SmallHeart = 0xd8
|
||||
BlueRupee = 0xda
|
||||
RedRupee = 0xdb
|
||||
BombRefill1 = 0xdc
|
||||
BombRefill4 = 0xdd
|
||||
BombRefill8 = 0xde
|
||||
|
||||
LargeMagic = 0xe0
|
||||
Faerie = 0xe3
|
||||
SmallKey = 0xe4
|
||||
Mushroom = 0xe7
|
||||
FakeMasterSword = 0xe8
|
||||
MagicShopAssistant = 0xe9
|
||||
HeartPiece = 0xeb
|
||||
SomariaPlatform = 0xed
|
||||
CastleMantle = 0xee
|
||||
MedallionTablet = 0xf2
|
||||
PositionTarget = 0xf3
|
||||
Boulders = 0xf4
|
||||
|
||||
|
||||
class SpriteType(FastEnum):
|
||||
@@ -488,10 +499,13 @@ class Sprite(object):
|
||||
self.drop_item_kind = drop_item_kind
|
||||
|
||||
self.location = None
|
||||
self.original_address = None
|
||||
|
||||
def copy(self):
|
||||
return Sprite(self.super_tile, self.kind, self.sub_type, self.layer, self.tile_x, self.tile_y, self.region,
|
||||
self.drops_item, self.drop_item_kind)
|
||||
sprite = Sprite(self.super_tile, self.kind, self.sub_type, self.layer, self.tile_x, self.tile_y, self.region,
|
||||
self.drops_item, self.drop_item_kind)
|
||||
sprite.original_address = self.original_address
|
||||
return sprite
|
||||
|
||||
def sprite_data(self):
|
||||
data = [(self.layer << 7) | ((self.sub_type & 0x18) << 2) | self.tile_y,
|
||||
@@ -506,6 +520,9 @@ class Sprite(object):
|
||||
data.append(code)
|
||||
return data
|
||||
|
||||
def sprite_data_ow(self):
|
||||
return [self.tile_y, self.tile_x, self.kind]
|
||||
|
||||
|
||||
# map of super_tile to list of Sprite objects:
|
||||
vanilla_sprites = {}
|
||||
@@ -519,6 +536,8 @@ def create_sprite(super_tile, kind, sub_type, layer, tile_x, tile_y, region=None
|
||||
|
||||
|
||||
def init_vanilla_sprites():
|
||||
if vanilla_sprites:
|
||||
return
|
||||
create_sprite(0x0000, EnemySprite.Ganon, 0x00, 0, 0x17, 0x05, 'Pyramid')
|
||||
create_sprite(0x0002, EnemySprite.CricketRat, 0x00, 1, 0x12, 0x05, 'Sewers Yet More Rats')
|
||||
create_sprite(0x0002, EnemySprite.CricketRat, 0x00, 1, 0x15, 0x06, 'Sewers Yet More Rats')
|
||||
@@ -2066,7 +2085,6 @@ layered_oam_rooms = {
|
||||
class EnemyTable:
|
||||
def __init__(self):
|
||||
self.room_map = defaultdict(list)
|
||||
self.multiworld_count = 0
|
||||
|
||||
def write_sprite_data_to_rom(self, rom):
|
||||
pointer_address = snes_to_pc(0x09D62E)
|
||||
|
||||
@@ -44,6 +44,14 @@ class Room:
|
||||
rom.write_bytes(address + offset, [0xFF, 0xFF])
|
||||
return door_start, offset + 2 # how many bytes were written
|
||||
|
||||
def find_all_pots(self):
|
||||
pots = []
|
||||
pots.extend([x for x in self.layer1 if x.data[2] == 0xFA])
|
||||
pots.extend([x for x in self.layer2 if x.data[2] == 0xFA])
|
||||
pots.extend([x for x in self.layer3 if x.data[2] == 0xFA])
|
||||
return pots
|
||||
|
||||
|
||||
|
||||
Room0006 = Room([0xE1, 0x00],
|
||||
[RoomObject(0x1FA15C, [0x1B, 0xA3, 0xC8]),
|
||||
@@ -405,6 +413,93 @@ Room00C8 = Room([0xE1, 0x00],
|
||||
|
||||
Room00DE = Room([0xE4, 0x00], [], [RoomObject(0x1FCAE5, [0xAD, 0x21, 0xF9])], [])
|
||||
|
||||
Room010C = Room([0xE0, 0x08],
|
||||
[RoomObject(0x03F25D, [0xFC, 0x62, 0x00]),
|
||||
RoomObject(0x03F260, [0x19, 0x33, 0x61]),
|
||||
RoomObject(0x03F263, [0xFC, 0x66, 0x81]),
|
||||
RoomObject(0x03F266, [0x29, 0x22, 0x01]),
|
||||
RoomObject(0x03F269, [0xFD, 0x62, 0x02]),
|
||||
RoomObject(0x03F26C, [0x59, 0x33, 0x62]),
|
||||
RoomObject(0x03F26F, [0xFD, 0x66, 0x83]),
|
||||
RoomObject(0x03F272, [0xFC, 0x89, 0x00]),
|
||||
RoomObject(0x03F275, [0x22, 0xA1, 0x61]),
|
||||
RoomObject(0x03F278, [0xFC, 0x8E, 0x81]),
|
||||
RoomObject(0x03F27B, [0x90, 0xCA, 0x0E]),
|
||||
RoomObject(0x03F27E, [0xD0, 0xE6, 0x10]),
|
||||
RoomObject(0x03F281, [0xFE, 0x41, 0x00]),
|
||||
RoomObject(0x03F284, [0x93, 0x23, 0x61]),
|
||||
RoomObject(0x03F287, [0x92, 0x98, 0x61]),
|
||||
RoomObject(0x03F28A, [0xFF, 0x81, 0x02]),
|
||||
RoomObject(0x03F28D, [0xE3, 0x23, 0x62]),
|
||||
RoomObject(0x03F290, [0xE2, 0x98, 0x62]),
|
||||
RoomObject(0x03F293, [0xFE, 0x71, 0xC8]),
|
||||
RoomObject(0x03F296, [0xAD, 0x1C, 0x03]),
|
||||
RoomObject(0x03F299, [0xFF, 0x51, 0xCA]),
|
||||
RoomObject(0x03F29C, [0x9D, 0x2D, 0x63]),
|
||||
RoomObject(0x03F29F, [0xFE, 0x75, 0x89]),
|
||||
RoomObject(0x03F2A2, [0xAD, 0x58, 0x04]),
|
||||
RoomObject(0x03F2A5, [0xD5, 0x2D, 0x64]),
|
||||
RoomObject(0x03F2A8, [0xFF, 0x55, 0x8B]),
|
||||
RoomObject(0x03F2AB, [0xFE, 0x78, 0x08]),
|
||||
RoomObject(0x03F2AE, [0xAD, 0x80, 0x03]),
|
||||
RoomObject(0x03F2B1, [0xFF, 0x58, 0x0A]),
|
||||
RoomObject(0x03F2B4, [0x9C, 0x91, 0x63]),
|
||||
RoomObject(0x03F2B7, [0xFE, 0x7A, 0x09]),
|
||||
RoomObject(0x03F2BA, [0xAD, 0xA0, 0x04]),
|
||||
RoomObject(0x03F2BD, [0xFF, 0x5A, 0x0B]),
|
||||
RoomObject(0x03F2C0, [0xD4, 0x91, 0x64]),
|
||||
RoomObject(0x03F2C3, [0x2C, 0x2E, 0xDC]),
|
||||
RoomObject(0x03F2C6, [0x3D, 0x3E, 0xF9]),
|
||||
RoomObject(0x03F2C9, [0x32, 0xA9, 0xF9]),
|
||||
RoomObject(0x03F2CC, [0x3A, 0xA9, 0xF9]),
|
||||
RoomObject(0x03F2CF, [0x42, 0xA9, 0xF9]),
|
||||
RoomObject(0x03F2D2, [0x4A, 0xA9, 0xF9]),
|
||||
RoomObject(0x03F2D5, [0x57, 0x9E, 0x69]),
|
||||
RoomObject(0x03F2D8, [0x54, 0xDC, 0x69]),
|
||||
RoomObject(0x03F2DB, [0x38, 0xC8, 0x89]),
|
||||
RoomObject(0x03F2DE, [0x58, 0x9C, 0x89]),
|
||||
RoomObject(0x03F2E1, [0x58, 0xA8, 0x89]),
|
||||
RoomObject(0x03F2E4, [0x58, 0xB4, 0x89]),
|
||||
RoomObject(0x03F2E7, [0x58, 0xC0, 0x89]),
|
||||
RoomObject(0x03F2EA, [0x58, 0xCC, 0x89]),
|
||||
RoomObject(0x03F2ED, [0x58, 0xD8, 0x89]),
|
||||
RoomObject(0x03F2F0, [0x58, 0xE4, 0x89]),
|
||||
RoomObject(0x03F2F3, [0xAA, 0x2E, 0xC8]),
|
||||
RoomObject(0x03F2F6, [0xAA, 0x29, 0x3F]),
|
||||
RoomObject(0x03F2F9, [0xAA, 0x2E, 0x79]),
|
||||
RoomObject(0x03F2FC, [0xAA, 0x59, 0x40]),
|
||||
RoomObject(0x03F2FF, [0xD6, 0x2E, 0x7A]),
|
||||
RoomObject(0x03F302, [0xAA, 0x90, 0xC8]),
|
||||
RoomObject(0x03F305, [0xAA, 0x8D, 0x3F]),
|
||||
RoomObject(0x03F308, [0xA8, 0x93, 0x79]),
|
||||
RoomObject(0x03F30B, [0xAA, 0xA1, 0x40]),
|
||||
RoomObject(0x03F30E, [0xD4, 0x93, 0x7A]),
|
||||
RoomObject(0x03F311, [0xB9, 0x5B, 0xF9]),
|
||||
RoomObject(0x03F314, [0xB9, 0xA3, 0xF9]),
|
||||
RoomObject(0x03F317, [0x9C, 0x68, 0x22]),
|
||||
RoomObject(0x03F31A, [0x9C, 0x6A, 0x69]),
|
||||
RoomObject(0x03F31D, [0x9C, 0x7C, 0x22]),
|
||||
RoomObject(0x03F320, [0xD4, 0x7C, 0x22]),
|
||||
RoomObject(0x03F323, [0x9C, 0xB0, 0x22]),
|
||||
RoomObject(0x03F326, [0xD4, 0xB0, 0x22]),
|
||||
RoomObject(0x03F329, [0xB3, 0x73, 0xFA]),
|
||||
RoomObject(0x03F32C, [0xCD, 0x68, 0xDD]),
|
||||
RoomObject(0x03F32F, [0xB8, 0xC0, 0xDD]),
|
||||
RoomObject(0x03F332, [0x08, 0x00, 0x60]),
|
||||
RoomObject(0x03F335, [0x10, 0x00, 0x60]),
|
||||
RoomObject(0x03F338, [0x1B, 0x10, 0xC0]),
|
||||
RoomObject(0x03F33B, [0x59, 0x10, 0xC0]),
|
||||
RoomObject(0x03F33E, [0x68, 0x23, 0xC0]),
|
||||
RoomObject(0x03F341, [0x68, 0x61, 0xC0]),
|
||||
RoomObject(0x03F344, [0x1B, 0x91, 0x60]),
|
||||
RoomObject(0x03F347, [0x88, 0x10, 0x60]),
|
||||
RoomObject(0x03F34A, [0xF0, 0x10, 0x60]),
|
||||
RoomObject(0x03F34D, [0x90, 0xDF, 0xA1]),
|
||||
RoomObject(0x03F350, [0xD4, 0xF7, 0xA3])], [],
|
||||
[DoorObject(Position.InteriorW, DoorKind.TrapTriggerable),
|
||||
DoorObject(Position.SouthW, DoorKind.CaveEntrance), DoorObject(Position.SouthE, DoorKind.CaveEntrance)]
|
||||
)
|
||||
|
||||
Room0127 = Room([0xE1, 0x00],
|
||||
[RoomObject(0x0AB600, [0xFE, 0x89, 0x00]),
|
||||
RoomObject(0x0AB603, [0xA2, 0xA1, 0x61]),
|
||||
|
||||
Reference in New Issue
Block a user