Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
[submodule "tools/mipsmatch"]
path = tools/mipsmatch
url = https://github.com/ttkb-oss/mipsmatch
[submodule "tools/sotn_utils"]
path = tools/sotn_utils
url = https://github.com/ProjectOblivion/sotn_utils.git
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ format-tools:
$(BLACK) tools/sotn_permuter/permuter_loader.py
$(BLACK) diff_settings.py
$(BLACK) tools/function_finder/*.py
$(BLACK) tools/extract_overlay/*.py

.PHONY: format-symbols format-symbols-%
format-symbols-us-sort:
Expand Down
1 change: 1 addition & 0 deletions tools/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ out
permute.me/
target/
!sotn-debugmodule/sotn-debugmodule.ld
extract_overlay_log.json

# Dependency installation checkpoints
*.make.chkpt
Expand Down
19 changes: 19 additions & 0 deletions tools/extract_overlay/e_init.c.mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "${ovl_name}.h"

% for function in entity_funcs:
void ${function}(Entity* self);
% endfor

PfnEntityUpdate OVL_EXPORT(EntityUpdates)[] = {
% for function in entity_funcs:
${function},
% endfor
};

// clang-format off
// animSet, animCurFrame, unk5A, palette, enemyID
% for name, animSet, animCurFrame, unk5A, palette, enemyID in e_inits:
EInit ${name} = {${animSet}, ${animCurFrame}, ${unk5A}, ${palette}, ${enemyID}};
% endfor
// clang-format on
172 changes: 172 additions & 0 deletions tools/extract_overlay/enemy_defs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# offset values taken from g_EnemyDefs which associate entities with EInits
BlueAxeKnight: 0x006
SwordLord: 0x009
Skelerang: 0x00B
BloodyZombie: 0x00D
FlyingZombieHalf1: 0x00E
FlyingZombieHalf2: 0x00F
Diplocephalus: 0x010
OwlKnight: 0x014
Owl: 0x016
LesserDemon: 0x017
MermanLvl2: 0x01B
MermanLvl3: 0x01D
Gorgon: 0x01F
ArmorLord: 0x022
BlackPanther: 0x025
DarkOctopus: 0x026
FleaMan: 0x028
FleaArmor: 0x029
WhiteDragon: 0x02B
BoneArk: 0x02D
BoneArkSkeleton: 0x02E
BoneArkProjectile: 0x2F
FleaRider: 0x030
Marionette: 0x031
OlroxLvl25: 0x032
OlroxLvl0: 0x037
Wereskeleton: 0x03D
Bat: 0x040
LargeSlime: 0x041
Slime: 0x042
PhantomSkull: 0x043
FlailGuard: 0x044
BloodSkeleton: 0x046
HellfireBeast: 0x047
Skeleton: 0x04B
DiscusLordLvl22: 0x04D
DiscusLordLvl0: 0x04E
FireDemon: 0x04F
SpittleBone: 0x051
SkeletonApe: 0x053
StoneRose: 0x055
Ectoplasm: 0x058
BonePillarLvl1: 0x05A
SpearGuard: 0x05D
PlateLord: 0x061
FrozenShade: 0x063
BoneMusket: 0x066
DodoBird: 0x068
BoneScimitar: 0x069
Toad: 0x06A
Frog: 0x06B
BoneArcher: 0x06C
Zombie: 0x06E
GraveKeeper: 0x06F
Tombstone: 0x071
BlueRaven: 0x072
BlackCrow: 0x073
JackOBones: 0x074
BoneHalberd: 0x076
Yorick: 0x078
Skull: 0x079
BladeMaster: 0x07A
BladeSoldier: 0x07C
NovaSkeleton: 0x07E
WingedGuard: 0x080
SpectralSwordNO2: 0x081
Poltergeist: 0x082
Lossoth: 0x083
ValhallaKnight: 0x085
SpectralSwordDAI: 0x088
SpectralSwordPuppetSword: 0x089
SpectralSwordRDAI: 0x08A
Spear: 0x08B
Shield: 0x08C
Orobourous: 0x08D
Oruburos: 0x08E
OruburosRider: 0x08F
DragonRider1: 0x090
DragonRider2: 0x091
Dhuron: 0x092
FireWarg: 0x094
WargRider: 0x097
CaveTroll: 0x099
Ghost: 0x09C
Thornweed: 0x09D
CorpseweedUnused: 0x09E
Corpseweed: 0x09F
VenusWeedRoot: 0x0A1
VenusWeedFlower: 0x0A2
BombKnight: 0x0A5
RockKnight: 0x0A7
DraculaLvl0: 0x0A9
GreaterDemon: 0x0AC
Warg: 0x0AF
Slinger: 0x0B2
CornerGuard: 0x0B4
Bitterfly: 0x0B6
BonePillarSkull: 0x0B7
BonePillarFireBreath: 0xB8
BonePillarSpikedBall: 0x0B9
Hammer: 0x0BA
Gurkha: 0x0BC
Blade: 0x0BE
OuijaTable: 0x0C1
SniperofGoth: 0x0C3
GalamothLvl50: 0x0C6
GalamothLvl0: 0x0C7
Minotaurus: 0x0CB
WerewolfARE: 0x0CE
Paranthropus: 0x0D3
Mudman: 0x0D6
GhostDancer: 0x0D8
FrozenHalf: 0x0D9
SalemWitch: 0x0DD
Azaghal: 0x0E0
Gremlin: 0x0E1
HuntingGirl: 0x0E3
VandalSword: 0x0E4
Salome: 0x0E5
Ctulhu: 0x0E9
Malachi: 0x0EC
Harpy: 0x0EF
Slogra: 0x0F3
GreenAxeKnight: 0x0F6
Spellbook: 0x0F7
MagicTomeLvl8: 0x0F9
MagicTomeLvl12: 0x0FB
Doppleganger10: 0x0FD
Gaibon: 0x0FE
SkullLord: 0x105
Lion: 0x106
Tinman: 0x108
AkmodanII: 0x10B
Cloakedknight: 0x10F
DarkwingBat: 0x111
Fishhead: 0x115
Karasuman: 0x118
Imp: 0x11C
Balloonpod: 0x11D
Scylla: 0x11F
Scyllawyrm: 0x126
Granfaloon1: 0x127
Granfaloon2: 0x128
Hippogryph: 0x12C
MedusaHead1: 0x12F
MedusaHead2: 0x130
Archer: 0x131
RichterBelmont: 0x133
Scarecrow: 0x142
Schmoo: 0x143
Beezelbub: 0x144
FakeTrevor: 0x148
FakeGrant: 0x14E
FakeSypha: 0x151
Succubus: 0x156
KillerFish: 0x15E
Shaft: 0x15F
Death1: 0x164
Death2: 0x169
Cerberos: 0x16B
Medusa: 0x16E
TheCreature: 0x172
Doppleganger40: 0x174
DraculaLvl98: 0x17B
StoneSkull: 0x180
Minotaur: 0x182
WerewolfRARE: 0x185
BlueVenusWeed1: 0x188
BlueVenusWeed2: 0x189
Guardian: 0x18C

Loading
Loading