Skip to content

Add tool to extract hardcoded data from swep1rcr.exe#27

Open
JayFoxRox wants to merge 2 commits into
OpenSWE1R:masterfrom
JayFoxRox:extract-data
Open

Add tool to extract hardcoded data from swep1rcr.exe#27
JayFoxRox wants to merge 2 commits into
OpenSWE1R:masterfrom
JayFoxRox:extract-data

Conversation

@JayFoxRox

@JayFoxRox JayFoxRox commented May 7, 2018

Copy link
Copy Markdown
Member

Closes OpenSWE1R/swe1r-re#13
Closes OpenSWE1R/swe1r-re#15
Closes OpenSWE1R/swe1r-re#16

It also makes the gcc CFLAGS more strict and turns on -Werror. This is to protect against printf issues and other oddities.

After merge, a new issue has to be created that reminds us to make this tool more compatible with other versions of the game.

@JayFoxRox
JayFoxRox force-pushed the extract-data branch 3 times, most recently from 96582ee to e5298ee Compare May 7, 2018 15:38
@JayFoxRox
JayFoxRox force-pushed the extract-data branch 3 times, most recently from d2d8abb to 87f01b2 Compare May 8, 2018 15:05
Comment thread extract-data.c Outdated
printf("PodracerHandlingData podracerHandling[] = {\n");
for(unsigned int i = 0; i < podracerHandlingCount; i++) {
PodracerHandlingData* d = &podracerHandling[i];
printf(" { %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f },",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nit: float suffix missing

Comment thread extract-data.c

// Dump the list of replacement parts
unsigned int replacementPartCount = 7 * 6; // 7 categories x 6 levels - FIXME: Read from file?
PartData* replacementParts = readExe(f, replacementPartOffset, replacementPartCount * sizeof(PartData));

@JayFoxRox JayFoxRox May 19, 2018

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

rename to upgradeParts or just upgrades

Comment thread extract-data.c
float BumpMass; // 48
float DmgImmunity; // 52
float IsectRadius; // 56 //FIXME: Not sure
} PACKED PodracerHandlingData;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

PodracerHandlingTableData; this allows re-using this structure elsewhere.
See handling.h in future swe1r-re PR.

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