summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_coach_2D.cpp
diff options
context:
space:
mode:
authorLuke Street <luke@street.dev>2026-02-28 21:19:17 -0700
committerGitHub <noreply@github.com>2026-02-28 20:19:17 -0800
commit6a48380461bc9baabe1706ba57ca0cedfa2d0c51 (patch)
tree593e054cfcb0250e63917c58b445a7e1f025a023 /src/d/actor/d_a_coach_2D.cpp
parentb5d3b8c059c10711370437f7db7539cd90f1cb29 (diff)
More GCC compatibility/warning fixes (#3118)
* Wrap >4-char literals in a MULTI_CHAR macro Modern compilers do not support CW's non-standard behavior with >4 char literals. We can, however, use a constexpr function to compute the u64 values directly. This leaves <=4 char literals unchanged. * Replace non-pointer usages of NULL with 0 * Define NULL to nullptr on C++11 and above * Fix more -Wpointer-arith and -Woverflow warnings * Replace u32/s32 with uintptr_t/intptr_t where appropriate * JSUOutputStream: Overload all standard int types
Diffstat (limited to 'src/d/actor/d_a_coach_2D.cpp')
-rw-r--r--src/d/actor/d_a_coach_2D.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/d/actor/d_a_coach_2D.cpp b/src/d/actor/d_a_coach_2D.cpp
index 660d279218..2a457132c9 100644
--- a/src/d/actor/d_a_coach_2D.cpp
+++ b/src/d/actor/d_a_coach_2D.cpp
@@ -125,13 +125,13 @@ int daCoach2D_c::createHeap() {
mpFireIconBrk->searchUpdateMaterialID(mpScrn);
setBrkAnime(true);
- mpPaneAll = new CPaneMgr(mpScrn, 'n_all', 2, NULL);
- mpPaneBasha = new CPaneMgr(mpScrn, 'basha_n', 2, NULL);
- mpPaneFire = new CPaneMgr(mpScrn, 'fire_n', 2, NULL);
+ mpPaneAll = new CPaneMgr(mpScrn, MULTI_CHAR('n_all'), 2, NULL);
+ mpPaneBasha = new CPaneMgr(mpScrn, MULTI_CHAR('basha_n'), 2, NULL);
+ mpPaneFire = new CPaneMgr(mpScrn, MULTI_CHAR('fire_n'), 2, NULL);
- mpScrn->search('fire_b_n')->move(mpPaneFire->getPosX(), mpPaneFire->getPosY());
+ mpScrn->search(MULTI_CHAR('fire_b_n'))->move(mpPaneFire->getPosX(), mpPaneFire->getPosY());
- mpPaneFireB = new CPaneMgr(mpScrn, 'fire_b_n', 2, NULL);
+ mpPaneFireB = new CPaneMgr(mpScrn, MULTI_CHAR('fire_b_n'), 2, NULL);
mMsgLight = new dMsgScrnLight_c(6, 0xFF);
@@ -288,7 +288,7 @@ void daCoach2D_c::update() {
icon_pos_x -= var_f29;
}
- f32 var_f30 = 4.0f * ((J2DPicture*)mpScrn->search('basha_p0'))->getWhite().r;
+ f32 var_f30 = 4.0f * ((J2DPicture*)mpScrn->search(MULTI_CHAR('basha_p0')))->getWhite().r;
if (var_f30 > 255.0f) {
var_f30 = 255.0f;
}
@@ -320,14 +320,14 @@ void daCoach2D_c::setBrkAnime(bool param_0) {
if (mBrkFrame >= mpFireIconBrk->getFrameMax()) {
mBrkFrame -= mpFireIconBrk->getFrameMax();
}
- mpScrn->search('basha_f0')->show();
+ mpScrn->search(MULTI_CHAR('basha_f0'))->show();
} else {
- mpScrn->search('basha_f0')->hide();
+ mpScrn->search(MULTI_CHAR('basha_f0'))->hide();
mBrkFrame = 0.0f;
}
mpFireIconBrk->setFrame(mBrkFrame);
- mpScrn->search('basha_p0')->setAnimation(mpFireIconBrk);
+ mpScrn->search(MULTI_CHAR('basha_p0'))->setAnimation(mpFireIconBrk);
}
static int daCoach2D_create(daCoach2D_c* i_this) {