-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise TR2 texture limits #2405
Raise TR2 texture limits #2405
Conversation
This raises TR2's game_buf limit to match TR1, at 128 MB.
This moves object texture storage to use game_buf rather than the regular heap.
This moves sprite texture storage to use game_buf rather than the regular heap.
Download the built assets for this pull request: |
Found an issue - the game crashes when I play The Deck (10) or Catacombs of the Talion (13), then use the level skip cheat. |
Thanks @aredfan, fixed. @rr- I've added an |
This splits the output module to keep the texture handling separate.
This removes the cap on object and sprite textures in TR1 and TR2, and raises the TR2 page limit to 128. Resolves LostArtefacts#1795. Resolves LostArtefacts#1796.
77d1051
to
74adedd
Compare
Apologies – I missed your comment earlier. I think that normally, the module that loads the backgrounds should also be the one to unload them. The Having With all that in mind, how do you feel about adding a function to check the background type, then unloading it only if it's |
This avoids the background being retained across levels potentially.
74adedd
to
7b3b2d2
Compare
Thanks, I've added this check now. LMK if this looks OK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aredfan looks OK to me in-game, but would appreciate a second quick test if you get a chance.
Of course. 👍
I can confirm all the OG levels are loading properly, LGTM.
@@ -11,7 +11,8 @@ | |||
- added exit fade-out effects (#2348) | |||
- added optional dynamic lighting for gun flashes and explosions, similar to TR2+ (#2357) | |||
- ⚠️ changed the game data to use a separate strings file for text information, removing it from the game flow file | |||
- changed the sprite limit from 512 to 1024 | |||
- changed the sprite texture limit from 2048 to unlimited (within game's overall memory cap) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I can fix in the next texture PR. Thanks!
Resolves #1795.
Resolves #1796.
Checklist
Description
This raises the following limits:
The internal
game_buf
now also matches TR1 at 128 MB. Object and sprite textures are now allocated in game memory as opposed to keeping two permanent arrays at the maximum size. Texture pages are already using game memory. As an aside, there is a bit of a disjoint in the way we initially process texture pages, mainly because of injections in TR1, so I'll aim to get this behaving more commonly in a follow-up PR.I've also separated the texture storage/handling from
output.c
, making split modules here instead. I'm aiming also to get texture pages moved from globals into the new texture module. The split is in its own commit, so this may be best reviewed overall per-commit.I've tested a level with everything at the maximum and it loads fine. For regular levels, there should be no change.