Actor Nametag System (#3083)

* initial nametag system

* add debug name tags in actor viewer
This commit is contained in:
Adam Bird
2023-08-20 13:59:23 -04:00
committed by GitHub
parent 2da8be331b
commit f19f303651
12 changed files with 449 additions and 5 deletions

View File

@@ -10,6 +10,7 @@
#include "soh/Enhancements/enemyrandomizer.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/Enhancements/nametag.h"
#include "soh/ActorDB.h"
@@ -1213,6 +1214,8 @@ void Actor_Init(Actor* actor, PlayState* play) {
actor->init(actor, play);
actor->init = NULL;
GameInteractor_ExecuteOnActorInit(actor);
// For enemy health bar we need to know the max health during init
if (actor->category == ACTORCAT_ENEMY) {
actor->maximumHealth = actor->colChkInfo.health;
@@ -1228,6 +1231,8 @@ void Actor_Destroy(Actor* actor, PlayState* play) {
// "No Actor class destruct [%s]"
osSyncPrintf("Actorクラス デストラクトがありません [%s]\n" VT_RST, ActorDB_Retrieve(actor->id)->name);
}
NameTag_RemoveAllForActor(actor);
}
void func_8002D7EC(Actor* actor) {

View File

@@ -171,6 +171,7 @@ void Play_Destroy(GameState* thisx) {
PlayState* play = (PlayState*)thisx;
Player* player = GET_PLAYER(play);
GameInteractor_ExecuteOnPlayDestroy();
// Only initialize the frame counter when exiting the title screen
if (gSaveContext.fileNum == 0xFF) {
@@ -1713,6 +1714,8 @@ void Play_Draw(PlayState* play) {
}
}
GameInteractor_ExecuteOnPlayDrawEnd();
// Reset the inverted culling
if (CVarGetInteger("gMirroredWorld", 0)) {
gSPClearExtraGeometryMode(POLY_OPA_DISP++, G_EX_INVERT_CULLING);