SnowyMouse / chimera

The update to Halo PC that never was
https://chimera.opencarnage.net
GNU General Public License v3.0
137 stars 26 forks source link

Make chimera_load_ui_map load the main menu too #51

Closed MangoFizz closed 3 years ago

MangoFizz commented 3 years ago

Hey Kava, this is what I was talking about. I also have a question, is call the function from ASM better than just reinterpret the pointer using reinterpret_cast? I'm curious about that.

PS: thanks to Sledmine for finding the function to load the main menu.

SnowyMouse commented 3 years ago

I've found that a lot of times, the underlying function can mangle registers, or it requires certain registers to be set to certain values, as Halo passes some things by registers. I don't know why it does what it does (performance maybe?), but it does. Using pushad/pushfd can protect this from occurring.

Calling the functions directly in C/C++ doesn't offer such protections.

If you're satisfied, I can merge this.

MangoFizz commented 3 years ago

Thanks! that explains a lot of things

Edit: Yeah, merge it 👍

SnowyMouse commented 3 years ago

Merged!