blini_plz

why songs effects crash with magic spells

Feb 4th, 2021 (edited)
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. "The absolute space appears to work like this:
  2. - The first time an actor of alloc type 1 needs to be spawned, the absolute space is allocated with a fixed size (based on the version, 0x24E0 in 1.0, 0x27A0 in DBG...) on the high end of the heap, using the same allocation routine as when loading overlays of alloc type 2.
  3. - Then, the actor overlay is loaded in this space and the actor is spawned as normal.
  4. - When attempting to deallocate overlays of alloc type 1 (when the last actor of this type is deleted), the absolute space will not be deallocated and will instead be kept around to be used for other times where these overlays need to be loaded. This means this space will stay allocated in the same location until the scene is destructed.
  5. - When spawning other actors after the space is already allocated, overlays will simply load at the start of the absolute space, regardless if the space is already being used by another overlay of this allocation type. This is why the game will always crash when different actors of this allocation type exist at the same time, since it will literally write over the content of an overlay still being used.
  6.  
  7. Basically the game is coded with the assumption that only one actor overlay of alloc type 1 will ever be loaded at the same time, so it fails hard when that's not the case."
  8. -Roman
Add Comment
Please, Sign In to add comment