User:AF: Difference between revisions

From sc2k-reverse
Jump to navigationJump to search
AF (talk | contribs)
AF (talk | contribs)
Line 132: Line 132:


With the two differing paths, in map editing mode at least if you click and your cursor leaves the valid map area and re-enters, it is far less likely to continue scrolling; while in normal mode if you click, leave the valid map area and re-enter it will pick up right where it left off.
With the two differing paths, in map editing mode at least if you click and your cursor leaves the valid map area and re-enters, it is far less likely to continue scrolling; while in normal mode if you click, leave the valid map area and re-enter it will pick up right where it left off.
Replicated the function externally by making use of the IDA-generated code, it works identically however it doesn't resolve the original problem. The next step will likely be the two tool menu functions.

Revision as of 23:00, 11 March 2025

Landing page for information that isn't yet ready to go into the main sections on the site.

It will mostly account for a naming changes concerning marked down functions during the trawl with IDA.

Movie Function References

Oh the pain..

Although for now this is a suspicion, the next target is likely going to be the Smacker functions (specifically SmackOpen()).

Confirmed for now, when SmackOpen() is called, amongst other things it is passing the constructed filename.

Working on importing the "needed" functions at present.. and then we'll see what happens.

As it turns out although the initial failure check had been bypassed with the correct path, the one that SmackOpen() got was still the original.

So half-way there.

LPCSTR - const string.

1

Unsure where this is called from, though DATA XREF: .rdata:004DEE68
Thunk - 0x401C4E
Main - 0x48B2E0

Apparently it is a function within a class. __thiscall

Though this specific case may be a diversion.

2

Called from GameDoIdleUpkeep()
Thunk - 0x401104
Main - 0x48A980

Movie data directory address: 0x4EAA78

By default it references: '\DATA\'

No drive letter by default, so this is touched upon elsewhere.

3

Called from both GameDoIdleUpKeep and '1' just above
Thunk - 0x402360
Main - 0x48A810

It also references: '\DATA\'

Portability

Exploring portability currently, ie storing all relevant registry keys for the sc2kfix module, sc2k and scurk in a specific ini file.

The idea in this case is that the library will create an ini by default with 'portability' disabled, so the current behaviour is preserved, however when it is enabled then it will load/save all settings from there.

This will require a few tweaks concerning binary detection so it knows what to touch, load and save.

At the moment this is an experiment.

Debug Menu

A test has been performed on the following Windows 95 versions:

Simcity 2000 Demo
Simcity 2000 CD Collection
Simcity 2000 Special Edition

They all exhibited the same issue with the attempted use of "Add all inventions".

It's.. most odd.

32908 - 0x808C

Show Version Info...
Thunk: 0x402694
Main: 0x4120E0

Based on a preliminary analysis, it's just reading the version.inf and then displaying it in the requester.

32909 - 0x808D

More Money
Thunk: 0x402B53
Main: 0x412280

32910 - 0x808E

Add All Gifts
Thunk: 0x401C0D
Main: 0x412290

From what I can see aside from granting all rewards, it also touches the invention years (very likely intentional to account for this function being used if the given gift hasn't yet been invented).

32911 - 0x808F

Add All Inventions (one would hope)
Thunk: 0x402388
Main: 0x412320

Center Tool

Thanks to @araxestroy's implementation of the middle-mouse button center control, there's a slight chance the case of the "constant scrolling" with the left-mouse button has jumped out.

The function isn't completely confirmed yet, however these are the address references:
Thunk: 0x401DFC
Main: 0x481780

WM_LBUTTONDOWN - 0x0201 - 513

Since there are multiple paths, this'll require a bit of experimentation.

During a drag not too far back the following was highlighted as well:
Thunk: 0x401406
Main: 0x47DD80

And another (yes this is a scattered approach):

Thunk: 0x402874
Main: 0x40CFB0

Which then goes -->

Thunk: 0x4019C4
Main: 0x40C2B0

Backtracing in-progress: 0x4251D0 -> 0x43F220 -> 0x4106C0

(The following are 'Main' not 'Thunk')
Parent: 0x4106C0
Map Editing: 0x442690
City Building and scenario: 0x43F220

With the two differing paths, in map editing mode at least if you click and your cursor leaves the valid map area and re-enters, it is far less likely to continue scrolling; while in normal mode if you click, leave the valid map area and re-enter it will pick up right where it left off.

Replicated the function externally by making use of the IDA-generated code, it works identically however it doesn't resolve the original problem. The next step will likely be the two tool menu functions.