-
Notifications
You must be signed in to change notification settings - Fork 68
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
Data offset corrections #259
Conversation
The current value of 0x3F40B points to 4b80:3c0b here (subtract 0x3B800 to get the value shown in the 4b80 segment here). The data starts at 3c0a, though, and 3c0a is what the code references, not 3c0b. |
The |
Thanks Allofich. I'm checking this branch but I think the spell prices per charge need to be two bytes each. Otherwise |
You're right. I'll fix that as well. |
I got it, no worries! I'm looking at the water light level values but it seems okay at a glance. Will test some more. I'm pretty sure the game only has 14 light levels, so two extra ones might not make sense. |
|
Done. Yeah so about the light levels, if the water changes during sunrise/sunset like I'm thinking, then the values in that array should be between 1 and 13. They're probably indices into which .LGT light table to use to convert texture colors to shaded colors. See these in constexpr uint8_t PALETTE_INDEX_LIGHT_LEVEL_LOWEST = 1;
constexpr uint8_t PALETTE_INDEX_LIGHT_LEVEL_HIGHEST = 13; |
Well, if counting from the adjusted offset I suggested the final four 00 bytes seem to fit neatly in the array as two "0" values, and also the values are in descending order by 100h, so they fit with that. The last few values of the array (if using the adjusted offset) are 400h, 400h, 300h, 300h, 200h, 200h, 100h, 100h, so the next two values being 0h and 0h fits the pattern. It could be though that the game never accesses the water light level values with an index high enough that it would reach them. |
These probably make the water pitch black at night.
Of course values such as 400h, 300h, wouldn't be what you'd expect as indices. But, as I showed above, the game code does access the data from the adjusted offset. I haven't reversed how the values are used after that. |
I changed it. Maybe Arena treats them like # of bytes to skip. If there's nothing else then I'll merge this now. If you're looking for anything else to help with, it would be awesome to have the screen-space fog finally documented in the wiki in a concise way. I haven't touched it since Carmina gave the info in #201 and honestly it still scares me a little (with the apparent self-modifying assembly from what I heard). |
Here is the only place in the code (as far as I can find) that references them:
You can see that in
|
I may take a look at it, but if it's complicated it may be beyond me. As you can see in the code snippet above, the values from |
I don't intend to add any more commits. |
Sorry, the value I called Edit: I updated the above code to use 1/1024ths of the day. |
Fixes the offsets for
SpellcastingItemAttackSpellPricesPerCharge
. They were pointing into the previous data atSpellcastingItemAttackSpellQualities
.Here's the data in A.EXE (after decompression).
Each set of data has 15 entries for the 15 item attack spells. The value for the start of
SpellcastingItemAttackSpellPricesPerCharge
was pointing at 0x3D5E2, which is 4b80:1de2 here, within theSpellcastingItemAttackSpellQualities
data.