Skip to content

Conversation

@PARTYMANX
Copy link
Contributor

@PARTYMANX PARTYMANX commented Jun 23, 2025

(This is built off of #110, as I needed both sets of functionality for my own testing, sorry for any confusion!)

Adds new and get_address functions to the UObject struct.

I refactored the THPS 1+2 and 3+4 splitters to use UObject fields wherever possible to make them a bit more generic (in case another game or significant updates come out), which required the UObject struct to be able to be created for arbitrary addresses. I have an example of its usage here: https://github.com/PARTYMANX/thps-autosplitter/blob/unreal-stage2/src/alcatraz_utils/mod.rs#L220

@Jujstme
Copy link
Collaborator

Jujstme commented Aug 31, 2025

Why would you need to make a new UObject instead of reading it directly via process.read::<UObject>()?

@PARTYMANX
Copy link
Contributor Author

I don't remember for sure, but I'm pretty sure I had tried that but ran into issues because UObject only contains an Address of a variable size.

@Jujstme Jujstme enabled auto-merge (squash) September 1, 2025 09:44
@Jujstme Jujstme merged commit 3e00a2a into LiveSplit:master Sep 1, 2025
7 checks passed
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