-
Notifications
You must be signed in to change notification settings - Fork 40
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
output: remove texture info globals #2403
Conversation
This replaces g_ObjectTextures with static storage in the common output module, and introduces an accessor.
This replaces g_SpriteTextures with static storage in the common output module, and introduces an accessor.
This replaces g_ObjectTextureCount with static storage in the common output module, and introduces an accessor. TR1 will also set this value although it remains unused.
This removes the g_LabTextureUVFlag array and shifts responsibility to the renderer fully for resetting these values.
Download the built assets for this pull request: |
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.
LGTM. The UV adjustment code is fine too. BTW maybe we could allocate textures dynamically via gamebuf like level.c things? The pixel data will be held in GFX Surface anyway so it shouldn't use up too much space.
Offtop: do we know what the Lab Texture UV Flag is for?
Sounds good. I was thinking we could tackle raising the various limits next too, so shifting to game buf would be nice to do in the same task. I think we'd need to increase the game memory though to match TR1 as we're currently only on 7.5MB compared with 128MB. I think the lab UV flag is related to the bleeding issue with bilinear filter on, but I admit I don't fully understand how it works. |
Checklist
Description
This removes
g_ObjectTextures
,g_SpriteTextures
,g_ObjectTextureCount
andg_LabTextureUVFlag
in favour of common accessors. LMK about the last commit for the renderer if this is an acceptable approach. We would have to shift the routine for setting up the UV adjustments anyway ahead of injection work to allow for additional tex infos to be added, so thought it best to tackle now.Just a quick test is needed I think in game to ensure textures appear OK, as well as sprites, and with bilinear toggled and SWR etc.