Document bundles

This commit is contained in:
Owlenuff
2024-10-03 23:45:50 +02:00
parent ea4b9ab1a6
commit 7a65ed96b3
17 changed files with 162 additions and 119 deletions

View File

@@ -2,7 +2,7 @@
#include "functions.h"
#include "variables.h"
extern void spawnQueue_bundle_f32(s32, s32, s32, s32);
extern Actor *spawnQueue_bundle_f32(s32, s32, s32, s32);
extern f32 func_80257204(f32, f32, f32, f32);
extern ActorProp * func_80320EB0(ActorMarker *, f32, s32);
@@ -232,12 +232,12 @@ void __chClam_takeDamage(ActorMarker *this_marker, ActorMarker *other_marker){
marker_despawn(this->marker);
}
void __chClam_playerDropsItem(s32 index, enum item_e item_id){
void __chClam_playerDropsItem(enum bundle_e bundle_id, enum item_e item_id){
f32 position[3];
player_getPosition(position);
bundle_setYaw(randf2(0.0f, 359.0f));
__spawnQueue_add_4((GenFunction_4)spawnQueue_bundle_f32, index, reinterpret_cast(s32, position[0]), reinterpret_cast(s32, position[1]), reinterpret_cast(s32, position[2]));
__spawnQueue_add_4((GenFunction_4) spawnQueue_bundle_f32, bundle_id, reinterpret_cast(s32, position[0]), reinterpret_cast(s32, position[1]), reinterpret_cast(s32, position[2]));
item_dec(item_id);
}
@@ -249,11 +249,13 @@ void __chClam_attackOther(ActorMarker *this_marker, ActorMarker *other_marker){
mapSpecificFlags_set(5, TRUE);
}
if(item_getCount(ITEM_D_EGGS) != 0)
__chClam_playerDropsItem(0xe, ITEM_D_EGGS);
if (item_getCount(ITEM_D_EGGS) != 0) {
__chClam_playerDropsItem(BUNDLE_E_YUMYUM_BLUE_EGG, ITEM_D_EGGS);
}
if(item_getCount(ITEM_F_RED_FEATHER) != 0)
__chClam_playerDropsItem(0xf, ITEM_F_RED_FEATHER);
if (item_getCount(ITEM_F_RED_FEATHER) != 0) {
__chClam_playerDropsItem(BUNDLE_F_YUMYUM_RED_FEATHER, ITEM_F_RED_FEATHER);
}
}
void chClam_update(Actor *this){