mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-08 00:44:42 +00:00
Document Player Knockback related functions (#1601)
* document knockback related functions * rotation -> yRot * implement some changes * Renames and comments * mq bss * format * Intangibility and Invulnerability * bss * .bss * add #pragma increment_block_number to z_en_item00.c * .bss
This commit is contained in:
parent
0f725405d1
commit
56981d5297
62 changed files with 298 additions and 187 deletions
|
@ -42,8 +42,8 @@
|
|||
*/
|
||||
#if PLATFORM_GC
|
||||
|
||||
#pragma increment_block_number "gc-eu:208 gc-eu-mq:208 gc-eu-mq-dbg:192 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208" \
|
||||
"gc-us-mq:208"
|
||||
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-eu-mq-dbg:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192" \
|
||||
"gc-us-mq:192"
|
||||
|
||||
#include "global.h"
|
||||
#include "alloca.h"
|
||||
|
|
|
@ -23,7 +23,7 @@ extern struct IrqMgr gIrqMgr;
|
|||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
|
||||
"ntsc-1.2:166"
|
||||
"ntsc-1.2:160"
|
||||
|
||||
extern u8 _buffersSegmentEnd[];
|
||||
|
||||
|
|
|
@ -1901,30 +1901,79 @@ s32 Actor_NotMounted(PlayState* play, Actor* horse) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_8002F698(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) {
|
||||
/**
|
||||
* Sets the player's knockback properties
|
||||
*
|
||||
* @param play
|
||||
* @param actor source actor applying knockback damage
|
||||
* @param speed
|
||||
* @param rot the direction the player will be pushed
|
||||
* @param yVelocity
|
||||
* @param type PlayerKnockbackType
|
||||
* @param damage additional amount of damage to deal to the player
|
||||
*/
|
||||
void Actor_SetPlayerKnockback(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 type, u32 damage) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->unk_8A0 = arg6;
|
||||
player->unk_8A1 = arg5;
|
||||
player->unk_8A4 = arg2;
|
||||
player->unk_8A2 = arg3;
|
||||
player->unk_8A8 = arg4;
|
||||
player->knockbackDamage = damage;
|
||||
player->knockbackType = type;
|
||||
player->knockbackSpeed = speed;
|
||||
player->knockbackRot = rot;
|
||||
player->knockbackYVelocity = yVelocity;
|
||||
}
|
||||
|
||||
void func_8002F6D4(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
|
||||
func_8002F698(play, actor, arg2, arg3, arg4, 2, arg5);
|
||||
/**
|
||||
* Knocks the player to the ground
|
||||
*
|
||||
* @param play
|
||||
* @param actor source actor applying knockback damage
|
||||
* @param speed
|
||||
* @param rot the direction the player will be pushed
|
||||
* @param yVelocity
|
||||
* @param damage additional amount of damage to deal to the player
|
||||
*/
|
||||
void Actor_SetPlayerKnockbackLarge(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage) {
|
||||
Actor_SetPlayerKnockback(play, actor, speed, rot, yVelocity, PLAYER_KNOCKBACK_LARGE, damage);
|
||||
}
|
||||
|
||||
void func_8002F71C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) {
|
||||
func_8002F6D4(play, actor, arg2, arg3, arg4, 0);
|
||||
/**
|
||||
* Knocks the player to the ground, without applying additional damage
|
||||
*
|
||||
* @param play
|
||||
* @param actor source actor applying knockback damage
|
||||
* @param speed
|
||||
* @param rot the direction the player will be pushed
|
||||
* @param yVelocity
|
||||
*/
|
||||
void Actor_SetPlayerKnockbackLargeNoDamage(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity) {
|
||||
Actor_SetPlayerKnockbackLarge(play, actor, speed, rot, yVelocity, 0);
|
||||
}
|
||||
|
||||
void func_8002F758(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
|
||||
func_8002F698(play, actor, arg2, arg3, arg4, 1, arg5);
|
||||
/**
|
||||
* Knocks the player back while keeping them on their feet
|
||||
*
|
||||
* @param play
|
||||
* @param actor
|
||||
* @param speed overridden
|
||||
* @param rot the direction the player will be pushed
|
||||
* @param yVelocity overridden
|
||||
* @param damage additional amount of damage to deal to the player
|
||||
*/
|
||||
void Actor_SetPlayerKnockbackSmall(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage) {
|
||||
Actor_SetPlayerKnockback(play, actor, speed, rot, yVelocity, PLAYER_KNOCKBACK_SMALL, damage);
|
||||
}
|
||||
|
||||
void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) {
|
||||
func_8002F758(play, actor, arg2, arg3, arg4, 0);
|
||||
/**
|
||||
* Knocks the player back while keeping them on their feet, without applying additional damage
|
||||
*
|
||||
* @param play
|
||||
* @param actor
|
||||
* @param speed overridden
|
||||
* @param rot the direction the player will be pushed
|
||||
* @param yVelocity overridden
|
||||
*/
|
||||
void Actor_SetPlayerKnockbackSmallNoDamage(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity) {
|
||||
Actor_SetPlayerKnockbackSmall(play, actor, speed, rot, yVelocity, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "global.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#pragma increment_block_number "ntsc-1.2:152"
|
||||
#pragma increment_block_number "ntsc-1.2:148"
|
||||
|
||||
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList);
|
||||
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);
|
||||
|
|
|
@ -3638,7 +3638,7 @@ s32 Camera_KeepOn3(Camera* camera) {
|
|||
}
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"ntsc-1.2:110"
|
||||
"ntsc-1.2:104"
|
||||
|
||||
s32 Camera_KeepOn4(Camera* camera) {
|
||||
static Vec3f D_8015BD50;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:224"
|
||||
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:216"
|
||||
|
||||
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
|
||||
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "versions.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"ntsc-1.2:224"
|
||||
"ntsc-1.2:192"
|
||||
|
||||
ALIGNED(16) SaveContext gSaveContext;
|
||||
u32 D_8015FA88;
|
||||
|
|
|
@ -124,7 +124,7 @@ u16 gCamAtSplinePointsAppliedFrame;
|
|||
u16 gCamEyePointAppliedFrame;
|
||||
u16 gCamAtPointAppliedFrame;
|
||||
|
||||
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
|
||||
#pragma increment_block_number "gc-eu:192 gc-eu-mq:176 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
|
||||
"ntsc-1.2:96"
|
||||
|
||||
// Cam ID to return to when a scripted cutscene is finished
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
|
||||
|
||||
#pragma increment_block_number \
|
||||
"gc-eu:0 gc-eu-mq:0 gc-eu-mq-dbg:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||
|
||||
#define FLAGS 0
|
||||
|
||||
void EnItem00_Init(Actor* thisx, PlayState* play);
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"ntsc-1.2:0"
|
||||
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:0"
|
||||
|
||||
typedef enum LightningBoltState {
|
||||
/* 0x00 */ LIGHTNING_BOLT_START,
|
||||
|
@ -213,7 +212,7 @@ s16 sLightningFlashAlpha;
|
|||
s16 sSunDepthTestX;
|
||||
s16 sSunDepthTestY;
|
||||
|
||||
#pragma increment_block_number "gc-eu:112 gc-eu-mq:112 gc-jp:96 gc-jp-ce:96 gc-jp-mq:96 gc-us:96 gc-us-mq:96" \
|
||||
#pragma increment_block_number "gc-eu:240 gc-eu-mq:240 gc-jp:216 gc-jp-ce:216 gc-jp-mq:216 gc-us:216 gc-us-mq:216" \
|
||||
"ntsc-1.2:224"
|
||||
|
||||
LightNode* sNGameOverLightNode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue