Skip to content

Commit

Permalink
Add BETA10 macro to enable conditional compilation for BETA10 targets
Browse files Browse the repository at this point in the history
  • Loading branch information
foxtacles committed Dec 24, 2024
1 parent bb29d28 commit 570458d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ if(ISLE_BUILD_BETA10)
OUT_TARGETS beta10_targets
)
reccmp_add_target(beta10 ID BETA10)
target_compile_definitions(beta10 PRIVATE BETA10)
endif()

if (ISLE_BUILD_APP)
Expand Down
12 changes: 6 additions & 6 deletions LEGO1/lego/legoomni/src/actors/act2actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void Act2Actor::Animate(float p_time)
{
int dummy1; // for BETA10, not sure what it is being used for

#ifdef NDEBUG
#ifndef BETA10
MxFloat local48float = 0.0f;
if (g_unk0x100f0f1c != 0.0f) {
local48float = p_time - g_unk0x100f0f1c;
Expand All @@ -221,14 +221,14 @@ void Act2Actor::Animate(float p_time)
m_unk0x20 = 0;
}
else {
#ifdef NDEBUG
#ifndef BETA10
m_unk0x20 += local48float;
#endif
MxMatrix matrix = m_roi->GetLocal2World();
matrix[3][1] += 3.0f;
m_roi->UpdateTransformationRelativeToParent(matrix);

#ifdef NDEBUG
#ifndef BETA10
LegoROI* brickstrROI = FindROI("brickstr");
MxMatrix brickstrMatrix = brickstrROI->GetLocal2World();
brickstrMatrix[3][1] += 3.0f;
Expand Down Expand Up @@ -272,7 +272,7 @@ void Act2Actor::Animate(float p_time)
CurrentWorld()->RemoveActor(this);
return;
}
#ifdef NDEBUG
#ifndef BETA10
else if (m_unk0x1e == 4) {
if (m_worldSpeed == 0.0f) {
return;
Expand Down Expand Up @@ -340,7 +340,7 @@ void Act2Actor::Animate(float p_time)
FUN_100199f0(0);
}
else
#ifdef NDEBUG
#ifndef BETA10
if (p_time - m_unk0x24 > 3000.0f) {
#endif
SetWorldSpeed(m_unk0x28 - 1);
Expand All @@ -350,7 +350,7 @@ void Act2Actor::Animate(float p_time)
if (((LegoAct2*) CurrentWorld())->FUN_100516b0() == SUCCESS) {
FUN_100199f0(1);
}
#ifdef NDEBUG
#ifndef BETA10
}
#endif
}
Expand Down
7 changes: 3 additions & 4 deletions LEGO1/lego/legoomni/src/build/legocarbuild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ MxS32 LegoCarBuild::FUN_10024850(MxLong p_x, MxLong p_y)
return result;
}

#ifdef NDEBUG
#ifndef BETA10

// FUNCTION: LEGO1 0x10024890
undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
Expand Down Expand Up @@ -1494,8 +1494,7 @@ void LegoCarBuild::FUN_10025720(undefined4 p_param)
m_unk0x10a = 0;
MxS32 uVar6;

#ifdef NDEBUG

#ifndef BETA10
if (GameState()->GetCurrentAct() == LegoGameState::e_act2) {
// This is most likely related to the helicopter rebuild in Act 2
switch (p_param) {
Expand Down Expand Up @@ -1597,7 +1596,7 @@ void LegoCarBuild::FUN_10025720(undefined4 p_param)
assert(m_numAnimsRun >= 0);
return;
}
#ifdef NDEBUG
#ifndef BETA10
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion LEGO1/lego/legoomni/src/build/legocarbuildpresenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void LegoCarBuildAnimPresenter::ReadyTickle()
return;
}

#ifdef NDEBUG
#ifndef BETA10
if (!m_anim) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ MxS32 LegoJetskiRaceActor::VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_
}

if (VTable0x80(m_roi->GetWorldPosition(), worldDirection, a, c)) {
#ifdef NDEBUG
#ifndef BETA10
m_unk0x7c = 0;
return 0;
#else
Expand Down
2 changes: 1 addition & 1 deletion LEGO1/lego/legoomni/src/race/legoracespecial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ MxResult LegoCarRaceActor::VTable0x9c()

MxResult res = VTable0x80(m_roi->GetWorldPosition(), point4, point1, point5);

#ifndef NDEBUG // BETA10 only
#ifdef BETA10
if (res) {
assert(0);
return -1;
Expand Down

0 comments on commit 570458d

Please sign in to comment.