Lots of code cleanup (#32)
### Description <!-- What is the purpose of this PR and what it adds? --> ### Will this Pull Request break anything? <!-- Will it break the compiling? --> ### Suggested Testing Steps <!-- See if the compiling fails/break anything in the game. -->
This commit is contained in:
31
src/sm_92.c
31
src/sm_92.c
@@ -4,30 +4,20 @@
|
||||
#include "variables.h"
|
||||
#include "funcs.h"
|
||||
|
||||
|
||||
#define kSamus_AnimationDefinitionPtrs ((uint16*)RomFixedPtr(0x92d94e))
|
||||
#define kSamus_TileDefs_TopHalf ((uint16*)RomFixedPtr(0x92d91e))
|
||||
#define kSamus_TileDefs_BottomHalf ((uint16*)RomFixedPtr(0x92d938))
|
||||
|
||||
|
||||
|
||||
|
||||
void SetSamusTilesDefsForCurAnim(void) { // 0x928000
|
||||
int16 v2;
|
||||
|
||||
R18_ = 4 * samus_anim_frame;
|
||||
R20_ = 4 * samus_anim_frame + 2;
|
||||
uint16 v0 = 4 * samus_anim_frame + kSamus_AnimationDefinitionPtrs[samus_pose];
|
||||
R22_ = get_SamusTileAnimationDefs(v0)->top_half_idx;
|
||||
uint16 r22 = get_SamusTileAnimationDefs(v0)->top_half_idx;
|
||||
tempB24 = get_SamusTileAnimationDefs(v0 + 1)->top_half_idx;
|
||||
R18_ = 7 * tempB24;
|
||||
nmi_copy_samus_top_half_src = 7 * tempB24 + kSamus_TileDefs_TopHalf[R22_];
|
||||
nmi_copy_samus_top_half_src = 7 * tempB24 + kSamus_TileDefs_TopHalf[r22];
|
||||
LOBYTE(nmi_copy_samus_halves) = 1;
|
||||
uint16 v1 = R20_ + kSamus_AnimationDefinitionPtrs[samus_pose];
|
||||
v2 = *RomPtr_92(v1);
|
||||
uint16 v1 = kSamus_AnimationDefinitionPtrs[samus_pose] + 4 * samus_anim_frame + 2;
|
||||
uint8 v2 = *RomPtr_92(v1);
|
||||
if (v2 != 255) {
|
||||
tempB26 = *RomPtr_92(v1 + 1);
|
||||
R20_ = 7 * tempB26;
|
||||
nmi_copy_samus_bottom_half_src = 7 * tempB26 + kSamus_TileDefs_BottomHalf[v2];
|
||||
HIBYTE(nmi_copy_samus_halves) = 1;
|
||||
}
|
||||
@@ -36,9 +26,9 @@ void SetSamusTilesDefsForCurAnim(void) { // 0x928000
|
||||
uint8 PlaySamusFanfare(void) { // 0x92ED24
|
||||
if (substate) {
|
||||
if (substate == 5)
|
||||
PlayRoomMusicTrackAfterAFrames(0x168u);
|
||||
PlayRoomMusicTrackAfterAFrames(0x168);
|
||||
} else {
|
||||
QueueMusic_DelayedY(1u, 0xE);
|
||||
QueueMusic_DelayedY(1, 0xE);
|
||||
}
|
||||
if (sign16(substate - 359)) {
|
||||
++substate;
|
||||
@@ -61,9 +51,6 @@ void Unused_SamusTileViewer(void) { // 0x92ED7A
|
||||
}
|
||||
|
||||
void DrawSamusSuitExploding(void) { // 0x92EDBE
|
||||
if (samus_pose_x_dir == 4)
|
||||
R18_ = g_word_7E0DE4 + 2085;
|
||||
else
|
||||
R18_ = g_word_7E0DE4 + 2076;
|
||||
DrawSamusSpritemap(R18_, samus_x_pos, samus_y_pos);
|
||||
}
|
||||
uint16 r18 = (samus_pose_x_dir == 4) ? g_word_7E0DE4 + 2085 : g_word_7E0DE4 + 2076;
|
||||
DrawSamusSpritemap(r18, samus_x_pos, samus_y_pos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user