1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-15 09:08:29 +02:00

Add -addresses command-line argument

This prints the address of every global class to the console, and then
exits.

This is useful for autosplitters, which read memory addresses directly.
Any time a new version of the game is shipped, this makes updating the
autosplitters much easier as people don't have to find the addresses of
the global classes themselves.
This commit is contained in:
Misa 2023-02-17 20:41:11 -08:00
parent acca4747f7
commit 64be99d496

View File

@ -420,6 +420,26 @@ int main(int argc, char *argv[])
#endif
VVV_exit(0);
}
else if (ARG("-addresses"))
{
#ifndef NO_CUSTOM_LEVELS
printf("cl : %p\n", (void*) &cl);
# ifndef NO_EDITOR
printf("ed : %p\n", (void*) &ed);
# endif
#endif
printf("game : %p\n", (void*) &game);
printf("gameScreen : %p\n", (void*) &gameScreen);
printf("graphics : %p\n", (void*) &graphics);
printf("help : %p\n", (void*) &help);
printf("key : %p\n", (void*) &key);
printf("map : %p\n", (void*) &map);
printf("music : %p\n", (void*) &music);
printf("obj : %p\n", (void*) &obj);
printf("script : %p\n", (void*) &script);
VVV_exit(0);
}
else if (ARG("-renderer"))
{
ARG_INNER({