mirror of
https://github.com/zeldaret/tww.git
synced 2026-10-09 13:36:50 -04:00
Questionable const char*
Some more instances of const char* that either required new casts to compile or seem inconsistent/possibly not real (event-related stuff, etc)
This commit is contained in:
@@ -64,12 +64,12 @@ namespace JAIGlobalParameter {
|
||||
f32 getParamSeDolbyCenterValue();
|
||||
f32 getParamSeDolbyFrontDistanceMax();
|
||||
f32 getParamSeDolbyBehindDistanceMax();
|
||||
char* getParamInitDataFileName();
|
||||
char* getParamWavePath();
|
||||
char* getParamSequenceArchivesPath();
|
||||
char* getParamStreamPath();
|
||||
char* getParamAudioResPath();
|
||||
char* getParamSequenceArchivesFileName();
|
||||
const char* getParamInitDataFileName();
|
||||
const char* getParamWavePath();
|
||||
const char* getParamSequenceArchivesPath();
|
||||
const char* getParamStreamPath();
|
||||
const char* getParamAudioResPath();
|
||||
const char* getParamSequenceArchivesFileName();
|
||||
u32 getParamDopplarMoveTime();
|
||||
u8 getParamDistanceParameterMoveTime();
|
||||
u32 getParamDummyObjectMax();
|
||||
@@ -99,12 +99,12 @@ namespace JAIGlobalParameter {
|
||||
extern u32 stayHeapMax;
|
||||
extern u32 autoHeapRoomSize;
|
||||
extern u32 stayHeapSize;
|
||||
extern char* initDataFileName;
|
||||
extern char* wavePath;
|
||||
extern char* sequenceArchivesPath;
|
||||
extern char* streamPath;
|
||||
extern char* audioResPath;
|
||||
extern char* sequenceArchivesFileName;
|
||||
extern const char* initDataFileName;
|
||||
extern const char* wavePath;
|
||||
extern const char* sequenceArchivesPath;
|
||||
extern const char* streamPath;
|
||||
extern const char* audioResPath;
|
||||
extern const char* sequenceArchivesFileName;
|
||||
extern f32 inputGainDown;
|
||||
extern f32 outputGainUp;
|
||||
extern f32 distanceMax;
|
||||
|
||||
@@ -3623,7 +3623,7 @@ inline int dComIfGp_evmng_getMyActIdx(int staffIdx, char** pActions, int actionC
|
||||
return dComIfGp_getPEvtManager()->getMyActIdx(staffIdx, pActions, actionCount, force, nameType);
|
||||
}
|
||||
|
||||
inline char* dComIfGp_evmng_getMyActName(int staffIdx) {
|
||||
inline const char* dComIfGp_evmng_getMyActName(int staffIdx) {
|
||||
return dComIfGp_getPEvtManager()->getMyActName(staffIdx);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
/* 0x30 */ s32 mNextIdx;
|
||||
/* 0x34 */ u32 field_0x34[3];
|
||||
|
||||
char* getName() { return mName; }
|
||||
const char* getName() { return mName; }
|
||||
s32 getNext() { return mNextIdx; }
|
||||
s32 getNumber() { return mSubstanceSize; }
|
||||
s32 getIndex() { return mSubstanceIdx; }
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
BOOL finish_check();
|
||||
void specialStaffProc(dEvDtStaff_c*);
|
||||
|
||||
char * getName() { return mName; }
|
||||
char* getName() { return mName; }
|
||||
int getStaff(int idx) { return mStaffIdx[idx]; }
|
||||
s32 getNStaff() { return mNStaff; }
|
||||
u32 getPriority() { return mPriority; }
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
dEvDtEvent_c* getEventP(int i) { return &mEventP[i]; }
|
||||
dEvDtData_c* getDataP(int i) { return &mDataP[i]; }
|
||||
dEvDtCut_c* getCutP(int i) { return &mCutP[i]; }
|
||||
char* getEventName(int i) { return mEventP[i].getName(); }
|
||||
const char* getEventName(int i) { return mEventP[i].getName(); }
|
||||
int getStaffCurrentCut(int i) { return mStaffP[i].getCurrentCut(); }
|
||||
dEvDtCut_c* getCutStaffCurrentCutP(int i) { return getCutP(getStaffCurrentCut(i)); }
|
||||
int getStaffStartCut(int i) { return mStaffP[i].getStartCut(); }
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
int getMyStaffId(const char*, fopAc_ac_c*, int);
|
||||
BOOL getIsAddvance(int);
|
||||
int getMyActIdx(int staffIdx, const char* const* action, int actionNum, BOOL force, int nameType);
|
||||
char* getMyActName(int);
|
||||
const char* getMyActName(int);
|
||||
char* getMyNowCutName(int);
|
||||
dEvDtData_c* getMyDataP(int, const char*, int);
|
||||
void* getMySubstanceP(int, const char*, int);
|
||||
|
||||
@@ -301,32 +301,32 @@ f32 JAIGlobalParameter::getParamSeDolbyBehindDistanceMax() {
|
||||
}
|
||||
|
||||
/* 802923E8-802923F0 .text getParamInitDataFileName__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamInitDataFileName() {
|
||||
const char* JAIGlobalParameter::getParamInitDataFileName() {
|
||||
return initDataFileName;
|
||||
}
|
||||
|
||||
/* 802923F0-802923F8 .text getParamWavePath__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamWavePath() {
|
||||
const char* JAIGlobalParameter::getParamWavePath() {
|
||||
return wavePath;
|
||||
}
|
||||
|
||||
/* 802923F8-80292400 .text getParamSequenceArchivesPath__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamSequenceArchivesPath() {
|
||||
const char* JAIGlobalParameter::getParamSequenceArchivesPath() {
|
||||
return sequenceArchivesPath;
|
||||
}
|
||||
|
||||
/* 80292400-80292408 .text getParamStreamPath__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamStreamPath() {
|
||||
const char* JAIGlobalParameter::getParamStreamPath() {
|
||||
return streamPath;
|
||||
}
|
||||
|
||||
/* 80292408-80292410 .text getParamAudioResPath__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamAudioResPath() {
|
||||
const char* JAIGlobalParameter::getParamAudioResPath() {
|
||||
return audioResPath;
|
||||
}
|
||||
|
||||
/* 80292410-80292418 .text getParamSequenceArchivesFileName__18JAIGlobalParameterFv */
|
||||
char* JAIGlobalParameter::getParamSequenceArchivesFileName() {
|
||||
const char* JAIGlobalParameter::getParamSequenceArchivesFileName() {
|
||||
return sequenceArchivesFileName;
|
||||
}
|
||||
|
||||
@@ -398,12 +398,12 @@ u32 JAIGlobalParameter::autoHeapMax = 2;
|
||||
u32 JAIGlobalParameter::stayHeapMax = 2;
|
||||
u32 JAIGlobalParameter::autoHeapRoomSize = 0xC000;
|
||||
u32 JAIGlobalParameter::stayHeapSize = 0x00010000;
|
||||
char* JAIGlobalParameter::initDataFileName = "JaiInit.aaf";
|
||||
char* JAIGlobalParameter::wavePath = "Banks/";
|
||||
char* JAIGlobalParameter::sequenceArchivesPath = "Seqs/";
|
||||
char* JAIGlobalParameter::streamPath = "Stream/";
|
||||
char* JAIGlobalParameter::audioResPath = "AudioRes/";
|
||||
char* JAIGlobalParameter::sequenceArchivesFileName = "JaiSeqs.arc";
|
||||
const char* JAIGlobalParameter::initDataFileName = "JaiInit.aaf";
|
||||
const char* JAIGlobalParameter::wavePath = "Banks/";
|
||||
const char* JAIGlobalParameter::sequenceArchivesPath = "Seqs/";
|
||||
const char* JAIGlobalParameter::streamPath = "Stream/";
|
||||
const char* JAIGlobalParameter::audioResPath = "AudioRes/";
|
||||
const char* JAIGlobalParameter::sequenceArchivesFileName = "JaiSeqs.arc";
|
||||
f32 JAIGlobalParameter::inputGainDown = 0.5f;
|
||||
f32 JAIGlobalParameter::outputGainUp = 1.2f;
|
||||
f32 JAIGlobalParameter::distanceMax = 5000.0f;
|
||||
|
||||
@@ -24,15 +24,15 @@ u32* JAInter::InitData::aafPointer;
|
||||
|
||||
/* 80292460-80292548 .text checkInitDataFile__Q27JAInter8InitDataFv */
|
||||
BOOL JAInter::InitData::checkInitDataFile() {
|
||||
if (!SystemInterface::checkFileExsistence(JAIGlobalParameter::getParamInitDataFileName())) {
|
||||
if (!SystemInterface::checkFileExsistence((char*)JAIGlobalParameter::getParamInitDataFileName())) {
|
||||
char* fileName = (char*)JASDram->alloc(strlen(JAIGlobalParameter::getParamAudioResPath()) + strlen(JAIGlobalParameter::getParamInitDataFileName()) + 1, 0);
|
||||
sprintf(fileName, "%s%s%c", JAIGlobalParameter::getParamAudioResPath(), JAIGlobalParameter::getParamInitDataFileName(), 0);
|
||||
JAIGlobalParameter::setParamInitDataFileName(fileName);
|
||||
if (!SystemInterface::checkFileExsistence(JAIGlobalParameter::getParamInitDataFileName())) {
|
||||
if (!SystemInterface::checkFileExsistence((char*)JAIGlobalParameter::getParamInitDataFileName())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
loadTmpDVDFile(JAIGlobalParameter::getParamInitDataFileName(), (u8**)&aafPointer);
|
||||
loadTmpDVDFile((char*)JAIGlobalParameter::getParamInitDataFileName(), (u8**)&aafPointer);
|
||||
if (aafPointer) {
|
||||
checkInitDataOnMemory();
|
||||
deleteTmpDVDFile((u8**)&aafPointer);
|
||||
|
||||
@@ -1096,7 +1096,7 @@ void daDaiocta_c::modeDemo() {
|
||||
|
||||
if (eventInfo.checkCommandDemoAccrpt()) {
|
||||
int staff_id = dComIfGp_evmng_getMyStaffId("Daiocta");
|
||||
char* cut_name = dComIfGp_getPEvtManager()->getMyNowCutName(staff_id);
|
||||
const char* cut_name = dComIfGp_getPEvtManager()->getMyNowCutName(staff_id);
|
||||
|
||||
cXyz current_pos = current.pos;
|
||||
s16 o_angle;
|
||||
@@ -1228,7 +1228,7 @@ void daDaiocta_c::modeDeleteInit() {
|
||||
void daDaiocta_c::modeDelete() {
|
||||
if (eventInfo.checkCommandDemoAccrpt()) {
|
||||
int staff_id = dComIfGp_evmng_getMyStaffId("Daiocta");
|
||||
char* cut_name = dComIfGp_getPEvtManager()->getMyNowCutName(staff_id);
|
||||
const char* cut_name = dComIfGp_getPEvtManager()->getMyNowCutName(staff_id);
|
||||
|
||||
if (strcmp(cut_name, "DEATH1") == 0) {
|
||||
current.pos.y = mWaterY;
|
||||
|
||||
@@ -1753,7 +1753,7 @@ void daFm_c::modeGrabFootDemo() {
|
||||
} else {
|
||||
if(eventInfo.checkCommandDemoAccrpt()) {
|
||||
int staffIdx = dComIfGp_evmng_getMyStaffId("Fmaster");
|
||||
char* cutName = dComIfGp_getPEvtManager()->getMyNowCutName(staffIdx);
|
||||
const char* cutName = dComIfGp_getPEvtManager()->getMyNowCutName(staffIdx);
|
||||
if(strcmp(cutName, "Dummy") == 0 || strcmp(cutName, "WAIT") == 0) {
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
}
|
||||
@@ -2195,7 +2195,7 @@ void daFm_c::modePlayerStartDemo() {
|
||||
resetInvKine();
|
||||
if(dComIfGp_event_runCheck()) {
|
||||
int staffIdx = dComIfGp_evmng_getMyStaffId("Fmaster");
|
||||
char* cutName = dComIfGp_getPEvtManager()->getMyNowCutName(staffIdx);
|
||||
const char* cutName = dComIfGp_getPEvtManager()->getMyNowCutName(staffIdx);
|
||||
|
||||
daPy_py_c* pLink = (daPy_py_c*)dComIfGp_getLinkPlayer();
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ void daNpc_Nz_c::cutProc() {
|
||||
}
|
||||
};
|
||||
|
||||
static char* a_demo_name_tbl[] = {
|
||||
static const char* a_demo_name_tbl[] = {
|
||||
"DEFAULT_NPC_NZ_ESA",
|
||||
};
|
||||
|
||||
|
||||
@@ -512,7 +512,7 @@ void daObj_Warpt_c::modeEventWarp() {
|
||||
}
|
||||
player->onNoResetFlg0(daPy_py_c::daPyFlg0_NO_FALL_VOICE);
|
||||
int staffIdx = dComIfGp_evmng_getMyStaffId("Warpt");
|
||||
char* cutName = dComIfGp_getPEvtManager()->getMyNowCutName(staffIdx);
|
||||
const char* cutName = dComIfGp_getPEvtManager()->getMyNowCutName(staffIdx);
|
||||
|
||||
bool cVar3 = true;
|
||||
if (strcmp(cutName, "WARP") == 0) {
|
||||
|
||||
@@ -598,7 +598,7 @@ BOOL daPy_lk_c::setGetDemo() {
|
||||
mMsgId = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
m34CE |= 0x01;
|
||||
char* cutName = dComIfGp_getPEvtManager()->getMyNowCutName(staffIdx);
|
||||
const char* cutName = dComIfGp_getPEvtManager()->getMyNowCutName(staffIdx);
|
||||
if (cutName != NULL) {
|
||||
// TODO: is there an inline for parsing link's cut name -> cut
|
||||
// index?
|
||||
|
||||
@@ -10364,7 +10364,7 @@ void daPy_lk_c::setDemoData() {
|
||||
mDemo.setSystemDemoType();
|
||||
}
|
||||
if (mStaffIdx != -1) {
|
||||
char* cut_name = dComIfGp_getPEvtManager()->getMyNowCutName(mStaffIdx);
|
||||
const char* cut_name = dComIfGp_getPEvtManager()->getMyNowCutName(mStaffIdx);
|
||||
if (cut_name != NULL) {
|
||||
// Take the first 3 chars in cut_name, convert them to integers, and calculate demo_mode
|
||||
demo_mode = ((cut_name[0] - '0') * 100 + (cut_name[1] - '0') * 10 + (cut_name[2] - '0'));
|
||||
|
||||
@@ -488,11 +488,11 @@ int dEvent_manager_c::getMyActIdx(int staffIdx, const char* const* action, int a
|
||||
}
|
||||
|
||||
/* 80074964-800749A0 .text getMyActName__16dEvent_manager_cFi */
|
||||
char* dEvent_manager_c::getMyActName(int staffIdx) {
|
||||
const char* dEvent_manager_c::getMyActName(int staffIdx) {
|
||||
if (staffIdx == -1)
|
||||
return NULL;
|
||||
|
||||
char* cutName = getMyNowCutName(staffIdx);
|
||||
const char* cutName = getMyNowCutName(staffIdx);
|
||||
if (cutName == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
+1
-1
@@ -2246,7 +2246,7 @@ void dStage_Create() {
|
||||
|
||||
/* 80043464-80043514 .text dStage_Delete__Fv */
|
||||
void dStage_Delete() {
|
||||
char* demoArcName = dStage_roomControl_c::getDemoArcName();
|
||||
const char* demoArcName = dStage_roomControl_c::getDemoArcName();
|
||||
if (*demoArcName != 0) {
|
||||
dComIfG_deleteObjectRes(demoArcName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user