Skip to content

Link MobilePlatform.cpp - #1

Open
boebie-dev wants to merge 7 commits into
1superchip:mainfrom
boebie-dev:mobile-platform
Open

boebie-dev wants to merge 7 commits into
1superchip:mainfrom
boebie-dev:mobile-platform

Conversation

@boebie-dev

Copy link
Copy Markdown

Still need to tag some names that weren't taken from original sources.

@decomp-dev

decomp-dev Bot commented Oct 9, 2026

Copy link
Copy Markdown

Report for GTYE69 (22d5483 - 454b7b8)

📈 Matched code: 27.75% (+0.19%, +4540 bytes)
📈 Linked code: 25.76% (+0.19%, +4540 bytes)
📈 Matched data: 67.14% (+0.02%, +292 bytes)
📈 Linked data: 68.93% (+0.06%, +1068 bytes)

✅ 21 new matches
Unit Item Bytes Before After
main/ty/source/props/MobilePlatform MobilePlatform::LoadDone() +760 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform::LoadLine(KromeIniLine*) +564 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform::Message(MKMessage*) +548 0.00% 100.00%
main/ty/source/props/MobilePlatform LoadDescriptors<MobilePlatformDesc>(KromeIni*, char*, MobilePlatformDesc*) +464 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform::SetYaw(float, float) +436 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform::UpdateMove() +332 0.00% 100.00%
main/ty/source/props/MobilePlatform ModuleInfo<MobilePlatform>::Init() +300 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform::UpdateBob() +284 0.00% 100.00%
main/ty/source/props/MobilePlatform .bss +280 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform::GetTime() +196 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform_LoadResources(KromeIni*) +148 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform::Init(GameObjDesc*) +128 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform::Update() +76 0.00% 100.00%
main/ty/source/props/MobilePlatform ModuleInfo<MobilePlatform>::ConstructObject(void*) +76 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform::Reset() +68 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatformDesc::Init(ModuleInfoBase*, char*, char*, int, int) +60 0.00% 100.00%
main/ty/source/props/MobilePlatform MobilePlatform::Deinit() +56 0.00% 100.00%
main/ty/source/props/MobilePlatform __sinit_MobilePlatform_cpp +40 0.00% 100.00%
main/ty/source/props/MobilePlatform .sbss +8 0.00% 100.00%
main/ty/source/props/MobilePlatform .ctors +4 0.00% 100.00%
main/ty/source/props/MobilePlatform descr_cast<MobilePlatformDesc*>(MKPropDescriptor*) +4 0.00% 100.00%
📈 3 improvements in unmatched items
Unit Item Bytes Before After
main/ty/source/props/MobilePlatform .data +549 0.00% 95.33%
main/ty/source/props/MobilePlatform .sdata +116 0.00% 91.18%
main/ty/source/props/MobilePlatform .sdata2 +64 0.00% 90.00%

@1superchip

Copy link
Copy Markdown
Owner

Looks great. Before merging, going through the debug build to get inlines correct would be great.

Comment thread src/ty/source/props/MobilePlatform.cpp Outdated
// Face the platform towards the second waypoint
// mixing pWayPoints and mpfLoadInfo is needed to match
float dx = mpfLoadInfo.wayPoints.vecs[1].x - mpfLoadInfo.wayPoints.vecs[0].x;
float dz = mpfLoadInfo.wayPoints.vecs[1].z - pWayPoints->vecs[0].z;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From local testing, the variable is not needed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/ty/source/props/MobilePlatform.cpp Outdated

if (GetDesc()->bobSpeed) {
MobilePlatformDesc* pDesc = GetDesc();
bobFrameOffset = (gDisplay.fps * RandomFR(&gb.mRandSeed, 0.0f, 1.0f)) / pDesc->bobSpeed;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable for pDesc is not needed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boebie-dev
boebie-dev marked this pull request as ready for review October 11, 2026 00:55
@1superchip

Copy link
Copy Markdown
Owner

Is there a reason to mark all names with "Unofficial"? if this was done consistently, "Unofficial" would be everywhere in the decomp.

extern "C" double atan2(double, double);
void GameCamera_AddDynamicCollisionItem(Model* pModel, int subObjectIndex);

static ModuleInfo<MobilePlatform> mobilePlatformModuleInfo; // Unofficial

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable name should not have been guessed as it is a variable in the symbols. So it is not "Unofficial"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants