Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an ida script to rename gamemaker engine functions #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Forwindz
Copy link

Add an IDA script to rename gamemaker engine functions (2600+functions)
Example function: audio_group_set_gain sprite_get_bbox_mode
(I use IDA v8.3)

How it works:
I find a function that uses this string D:\\a\\GameMaker\\GameMaker\\GameMaker\\Runner\\VC_Runner\\Files\\Code\\Code_Function.cpp
This function will allocate and store the reference and name of the GML functions.
In 1.0.2.1 it should be sub_14176D940

And some functions will call this function to link the function addresses and function names.
It should looks like this:

xor     r9d, r9d
lea     rdx, sub_141687040
lea     rcx, aIsBool    ; "is_bool"
lea     r8d, [r9+1]
call    sub_14176D940
xor     r9d, r9d
lea     rdx, sub_1416874E0
lea     rcx, aIsReal    ; "is_real"
lea     r8d, [r9+1]
call    sub_14176D940

I rename functions mainly based on this information. And rename 2587 functions.

I also rename the function that invokes sub_14176D940 to link function addresses and function names, based on the word frequency. Example: gamemaker_init_func_name_shader_uniform_array_61.
27 functions are renamed in this way. (It is a bit ugly, maybe I can rename it with a better name. These functions could be regarded as a procedure of initialization).

fuzzything44 added a commit that referenced this pull request Aug 2, 2024
Added knockback_line to battle patterns
Fixed steelheart damage bug (probably) due to the variable being int64 instead of real, sometimes
A bit of work on Ran & Xin #2 (added a couple new mechs, cleaned things up a bit)
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.

1 participant