-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e54cc3
commit 9525f8e
Showing
5 changed files
with
69 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,33 @@ | ||
#ifndef D_T_TELOP_H | ||
#define D_T_TELOP_H | ||
|
||
#include "d/a/d_a_base.h" | ||
#include "d/flag/sceneflag_manager.h" | ||
#include "d/t/d_tg.h" | ||
|
||
class dTgTelop_c : public dAcBase_c { | ||
class dTgTelop_c : public dTg_c { | ||
public: | ||
dTgTelop_c() {} | ||
virtual ~dTgTelop_c() {} | ||
|
||
virtual int create() override; | ||
virtual int doDelete() override; | ||
virtual int draw() override; | ||
virtual int actorExecute() override; | ||
|
||
u16 getArea() const { | ||
return params >> 8 & 0xFF; | ||
} | ||
u8 getSceneflag() const { | ||
return params >> 16 & 0xFF; | ||
} | ||
u8 getTempflag() const { | ||
return params >> 24 & 0xFF; | ||
} | ||
|
||
private: | ||
/* 0xFC */ u16 mArea; | ||
/* 0xFD */ u8 mSceneflag; | ||
/* 0xFF */ u8 mTempflag; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,44 @@ | ||
#include "d/t/d_t_telop.h" | ||
|
||
#include "d/lyt/d_lyt_area_caption.h" | ||
#include "toBeSorted/event_manager.h" | ||
|
||
SPECIAL_ACTOR_PROFILE(TLP_TAG, dTgTelop_c, fProfile::TLP_TAG, 0x28C, 0, 0); | ||
|
||
int dTgTelop_c::create() { | ||
mArea = getArea(); | ||
mSceneflag = getSceneflag() != 0xFF ? getSceneflag() : 0xFF; | ||
mTempflag = getTempflag() != 0xFF ? getTempflag() : 0xFF; | ||
|
||
return SUCCEEDED; | ||
} | ||
|
||
int dTgTelop_c::doDelete() { | ||
return SUCCEEDED; | ||
} | ||
|
||
int dTgTelop_c::actorExecute() { | ||
if (EventManager::isInEvent()) { | ||
return SUCCEEDED; | ||
} | ||
|
||
if (mTempflag != 0xFF && SceneflagManager::sInstance->checkBoolFlag(roomid, mTempflag)) { | ||
return SUCCEEDED; | ||
} | ||
|
||
if (mSceneflag != 0xFF && !SceneflagManager::sInstance->checkBoolFlag(roomid, mSceneflag)) { | ||
return SUCCEEDED; | ||
} | ||
|
||
if (mTempflag != 0xFF) { | ||
SceneflagManager::sInstance->setFlag(roomid, mTempflag); | ||
} | ||
|
||
dLytAreaCaption_c::setArea(mArea); | ||
deleteRequest(); | ||
return SUCCEEDED; | ||
} | ||
|
||
int dTgTelop_c::draw() { | ||
return SUCCEEDED; | ||
} |