mirror of
https://github.com/zeldaret/tmc
synced 2026-08-26 16:07:15 -04:00
Rename objects
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* @file bench.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Bench object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "player.h"
|
||||
#include "sound.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
u8 filler[0x18];
|
||||
u16 tilePos;
|
||||
} BenchEntity;
|
||||
|
||||
void Bench_Init(BenchEntity*);
|
||||
void Bench_Action1(BenchEntity*);
|
||||
|
||||
void Bench(Entity* this) {
|
||||
static void (*const Bench_Actions[])(BenchEntity*) = {
|
||||
Bench_Init,
|
||||
Bench_Action1,
|
||||
};
|
||||
|
||||
Bench_Actions[this->action]((BenchEntity*)this);
|
||||
}
|
||||
|
||||
void Bench_Init(BenchEntity* this) {
|
||||
super->action = 1;
|
||||
super->timer = 0;
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
if (gPlayerState.flags & PL_MINISH) {
|
||||
super->collisionLayer = 2;
|
||||
} else {
|
||||
super->collisionLayer = 1;
|
||||
}
|
||||
UpdateSpriteForCollisionLayer(super);
|
||||
sub_08000148(0x47, this->tilePos - 0x40, 1);
|
||||
}
|
||||
|
||||
void Bench_Action1(BenchEntity* this) {
|
||||
}
|
||||
Reference in New Issue
Block a user