mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-23 13:09:44 +00:00
1df0706a04
This took a few hours of research spread across a few days. A few take-aways: `.ext.weapon.anim` and `.ext.player.anim` are both on `0xAC` and they NEED to stay aligned since they both call `PlayAnimation`, which operates on `.anim`. I double-checked `EntityWeaponAttack` and the param entity is definitively not `PLAYER`, despite `.anim` being in the same offset. I did not encounter a single `.ext.generic.unkAC` that is not related to animations, so this can be a pretty strong clue of a pattern. I have this theory where not all the area of an entity from `0x7C` to `0xBC` is reserved, but just from `0x7C` to _at least_ `0xAC`, with _at least_ the last `0x10` bytes are part of a shared struct among all entities. ```c /* 0x7C */ Ext ext; /* 0xAC*/ u8 anim; [...] }; ``` I want to collect more proof before proceeding to mass-rename everything. I learnt what `g_Player.pl_vram_flag` is actually doing. It holds some kind of state of the player towards the map collision. It holds a bunch of flags that helps setting the animation. I still feel not confident enough to create `#define`'s for it until we know more. All the `condition = ((g_Player.pl_vram_flag & 0x20) != condition)` got rewritten with the following: ```c atLedge = 0; if (g_Player.pl_vram_flag & 0x20) { atLedge = 1; } ``` the `atLedge` adds up to the `anim` function. The animation table essentially have one ID after the other where the first holds the Anim ID when the player is not at the ledge and the next one where it is. For example: `[ANIM_STAND, ANIM_STAND_ATLEDGE, ANIM_ATTACK, ANIM_ATTACK_ATLEDGE]`. `D_800ACF4C` and `D_800ACF54` are some kind-of animation helpers when Alucard either stands still, jumps or falls. I burnt the values in `stubs.c` while we wait for importing the remaining DRA data.
174 lines
5.2 KiB
Plaintext
174 lines
5.2 KiB
Plaintext
g_CheatCodes = 0x800A300C;
|
|
D_800B0860 = 0x800B0860;
|
|
aPbav = 0x800B107C;
|
|
aPbav_0 = 0x800B407C;
|
|
aPbav_2 = 0x800B607C;
|
|
aPbav_1 = 0x800B807C;
|
|
aPqes_1 = 0x800BA07C;
|
|
aPqes = 0x800BC37D;
|
|
aPqes_0 = 0x800BCAC3;
|
|
g_CdVolumeTable = 0x800BD07C;
|
|
g_DebugEnabled = 0x800BD1C0;
|
|
g_VabAddrs = 0x800BD1C8;
|
|
g_SeqInfo = 0x800BD1E0;
|
|
g_XaMusicConfigs = 0x800BD224;
|
|
g_SfxData = 0x800BF554;
|
|
D_800DBFFC = 0x800DBFFC; // ignore:true
|
|
aStrY02x = 0x800E1A74;
|
|
HandleGameOver = 0x800E5584;
|
|
RenderEntities = 0x800EBBAC;
|
|
AllocPrimitives = 0x800EDC80;
|
|
FreePrimitives = 0x800EDE78;
|
|
RenderPrimitives = 0x800EDEDC;
|
|
CheckCollision = 0x800EF45C;
|
|
MenuDraw = 0x800F8F28;
|
|
MenuHandleCursorInput = 0x800FA034;
|
|
MenuHandle = 0x800FBC24;
|
|
AddToInventory = 0x800FD874;
|
|
GetStatusAilmentTimer = 0x800FDB18;
|
|
IsRelicActive = 0x800FE3A8;
|
|
HandleSaveMenu = 0x80103238;
|
|
DestroyEntity = 0x80106590;
|
|
EntityAlucard = 0x8010A5BC;
|
|
SetPlayerStep = 0x8010D584;
|
|
SetPlayerAnim = 0x8010DA48;
|
|
DecelerateX = 0x8010E1EC;
|
|
SetSpeedX = 0x8010E390;
|
|
AlucardHandleDamage = 0x8011405C;
|
|
PlayerStepHellfire = 0x80116408;
|
|
EntityNumberMovesToHpMeter = 0x80118D0C;
|
|
EntityGuardText = 0x80119588;
|
|
CreateEntFactoryFromEntity = 0x8011AAFC;
|
|
EntityEntFactory = 0x8011AC3C;
|
|
EntityPlayerBlinkWhite = 0x8011BDA4;
|
|
EntityMpReplenished = 0x8011D9F8;
|
|
EntityTransparentWhiteCircle = 0x801200AC;
|
|
EntityPlayerPinkEffect = 0x80120AF8;
|
|
EntityPlayerDissolves = 0x80120DD0;
|
|
EntityLevelUpAnimation = 0x80121980;
|
|
EntityMist = 0x8012231C;
|
|
EntityTeleport = 0x801243B0;
|
|
EntitySubwpnThrownDagger = 0x80124B88;
|
|
EntitySubwpnThrownAxe = 0x80125330;
|
|
EntityHolyWaterBreakGlass = 0x80125E68;
|
|
EntitySubwpnCrashCross = 0x801267B0;
|
|
EntityHellfireHandler = 0x80126ECC;
|
|
EntityStopWatch = 0x8012A89C;
|
|
EntityBatEcho = 0x8012BEF8;
|
|
CdSoundCommand4 = 0x80132F60;
|
|
CdSoundCommand6 = 0x80133290;
|
|
CdSoundCommand12 = 0x80133960;
|
|
CdSoundCommand14 = 0x80133BDC;
|
|
PlaySfx = 0x801347F8;
|
|
g_DebugFreeze = 0x801362AC;
|
|
g_DebugHitboxViewMode = 0x801362B0;
|
|
g_DebugPalIdx = 0x801362C0;
|
|
g_DebugColorChannel = 0x801362C4;
|
|
g_CurrentOT = 0x801362CC;
|
|
g_DebugIsRecordingVideo = 0x801362D8;
|
|
g_GpuMaxUsage = 0x801362DC;
|
|
g_DebugWaitInfoTimer = 0x80136300;
|
|
g_DebugRecordVideoFid = 0x80136304;
|
|
g_softResetTimer = 0x80136408;
|
|
g_NowLoadingModel = 0x80136414;
|
|
g_SimFile = 0x8013644C;
|
|
g_PadsRepeatTimer = 0x80137460;
|
|
g_MemcardRetryCount = 0x80137470;
|
|
g_MemcardFd = 0x80137474;
|
|
g_DecSrcPtr = 0x80137578;
|
|
g_DecDstPtr = 0x8013757C;
|
|
g_DecReadNibbleFlag = 0x80137580;
|
|
g_DecWriteNibbleFlag = 0x80137584;
|
|
g_IsCloakLiningUnlocked = 0x80137600;
|
|
g_IsCloakColorUnlocked = 0x80137604;
|
|
g_IsSelectingEquipment = 0x8013760C;
|
|
g_EquipmentCursor = 0x80137610;
|
|
g_EquipOrderType = 0x80137618;
|
|
g_MenuData = 0x8013761C;
|
|
g_JosephsCloakContext = 0x801376EE;
|
|
g_RelicMenuFadeTimer = 0x80137850;
|
|
g_TimeAttackEntryTimes = 0x80137854;
|
|
c_strTimeAttackEntry = 0x801378C0;
|
|
g_NewAttackRightHand = 0x8013792C;
|
|
g_NewAttackLeftHand = 0x80137930;
|
|
g_NewDefenseEquip = 0x80137934;
|
|
g_NewPlayerStatsTotal = 0x80137938;
|
|
g_ServantPrevious = 0x8013795C;
|
|
g_PlayerHud = 0x8013796C;
|
|
g_HealingMailTimer = 0x80137998;
|
|
g_MemCardRetryCount = 0x80137E50;
|
|
g_MemCardRStep = 0x80137E64;
|
|
g_MemCardRStepSub = 0x80137E68;
|
|
g_CdCallback = 0x80137F58;
|
|
g_CdLoc = 0x80137F5C;
|
|
g_Cd = 0x80137F60;
|
|
g_Cd_D_80137F68 = 0x80137F68;
|
|
g_Cd_D_80137F70 = 0x80137F70;
|
|
g_Cd_D_80137F74 = 0x80137F74;
|
|
g_Cd_D_80137F78 = 0x80137F78;
|
|
g_Cd_D_80137F7C = 0x80137F7C;
|
|
g_Cd_overlayCopySrc = 0x80137F80;
|
|
g_Cd_overlayCopyDst = 0x80137F84;
|
|
g_Cd_addr = 0x80137F88;
|
|
g_Cd_overlayBlockCount = 0x80137F8C;
|
|
g_Cd_overlayLastBlockSize = 0x80137F90;
|
|
g_VabId = 0x80137F94;
|
|
g_WasFacingLeft = 0x80137FC0;
|
|
g_WasFacingLeft2 = 0x80137FC4;
|
|
g_WasFacingLeft3 = 0x80137FC8;
|
|
g_WasFacingLeft4 = 0x80137FCC;
|
|
g_WasFacingLeft5 = 0x80137FD0;
|
|
g_WasFacingLeft6 = 0x80137FD4;
|
|
g_WasFacingLeft7 = 0x80137FD8;
|
|
g_WingSmashButtonCounter = 0x80137FF4;
|
|
g_WingSmashButtonTimer = 0x80137FF8;
|
|
g_WingSmashTimer = 0x80137FFC;
|
|
g_BatScreechDone = 0x80138000;
|
|
g_MistTimer = 0x80138004;
|
|
g_CurrentXaConfigId = 0x80138458;
|
|
g_SeqTable = 0x80138460;
|
|
g_CurCdPos = 0x80138F20;
|
|
g_CdMode = 0x80138F24;
|
|
g_KeyOffChannels = 0x80138F28;
|
|
g_CdCommandResult = 0x80138F2C;
|
|
g_SeqPointers = 0x80138F84;
|
|
g_SfxRingBufferReadPos = 0x80138FAC;
|
|
g_DebugMode = 0x80138FB0;
|
|
g_VolL = 0x80138FB8;
|
|
g_ButtonCombo = 0x80138FC0;
|
|
g_sfxRingBufferWritePos = 0x80139000;
|
|
g_VolR = 0x80139004;
|
|
g_DebugCurPal = 0x8013900C;
|
|
g_MuteCd = 0x80139020;
|
|
g_PrevEquippedWeapons = 0x8013905C;
|
|
g_CurrentXaSoundId = 0x80139064;
|
|
g_SeqVolume1 = 0x8013909C;
|
|
g_BackBuffer = 0x801390D4;
|
|
g_SfxRingBuffer = 0x801390DC;
|
|
g_CdCommandStatus = 0x801396F0;
|
|
g_CdSoundCommandQueuePos = 0x801396F4;
|
|
g_SeqPlayingId = 0x80139810;
|
|
g_XaMusicVolume = 0x80139820;
|
|
g_CdSoundCommandQueue = 0x80139868;
|
|
g_SoundCommandRingBufferReadPos = 0x80139A68;
|
|
g_SoundCommandRingBufferWritePos = 0x80139A70;
|
|
g_CdSoundCommandStep = 0x8013AE80;
|
|
g_UnkChannelSetting2 = 0x8013AE84;
|
|
g_volumeL = 0x8013AE8C;
|
|
g_ReverbDepth = 0x8013AE98;
|
|
g_SoundInitialized = 0x8013AEEC;
|
|
g_SeqVolume2 = 0x8013AEF0;
|
|
g_MemcardInfo = 0x8013AEF8;
|
|
g_SoundCommandRingBuffer = 0x8013B3E8;
|
|
g_MemcardBlockRead = 0x8013B5F0;
|
|
g_UnkChannelSetting1 = 0x8013B614;
|
|
g_ChannelGroupVolume = 0x8013B620;
|
|
g_SeqAccessNum = 0x8013B658;
|
|
g_MemcardStep = 0x8013B660;
|
|
g_CdVolume = 0x8013B668;
|
|
g_CdSoundCommand16 = 0x8013B684;
|
|
g_volumeR = 0x8013B698;
|
|
g_imgUnk8013C200 = 0x8013C200;
|
|
g_imgUnk8013C270 = 0x8013C270;
|
|
g_StageOverlay = 0x80180000;
|