-
Notifications
You must be signed in to change notification settings - Fork 793
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
Draft: allow for more light sources #3128
base: master
Are you sure you want to change the base?
Draft: allow for more light sources #3128
Conversation
Draft because: Untested. See also PR #3122 |
In |
When you're ready you can use the Ready for review button that appears in the workflow status area: The mark as draft "button" is disguised as a text link, that appears in the side menu at the bottom of the Reviewers section, it'll be in the region I marked with a yellow box in this screenshot, but looks like a link: |
da226b8
to
0fccf5f
Compare
It is used with int_8, cap it to 127. https://github.com/diasurgical/devilutionX/blob/master/Source/monster.h#L218 |
a053302
to
2a2840a
Compare
2a2840a
to
8e57a67
Compare
It's a lot of noise for a single int change 😉 |
I'm working on the save right now. Should have a test version today... |
Just to note here: We‘re also saving:
So there are little more tricks to do. I find it strange that we‘re saving the whole activelights array even if most of them are in fact not really active. |
b1bbc4a
to
4053614
Compare
a0d46a7
to
5ebce7b
Compare
It was much more complicated then I thought at first. |
1376707
to
50616b9
Compare
crashes when saving with active firewall (missle light)... |
50616b9
to
8efe121
Compare
crash solved. Needs more testing and tidying up |
@AJenbo
or
I did find both styles |
With is usually best since it's safer |
Perfect. I personally prefer with braces! |
Once this gets merged it would be nice if you wold work on the same for missiles :) |
8efe121
to
f6d1ff1
Compare
... you change the line endings in loadsave.cpp so now it looks like all of it is rewritten |
f6d1ff1
to
d552302
Compare
Yay! Seems that I've triggered a bug... https://youtrack.jetbrains.com/issue/IDEA-262067 |
d552302
to
0172c7c
Compare
As noted in #3292
What else is there left? I know that we have light sources for unique monsters (which also can be applied after loading), and all the other light sources I can think of (player, golem...) can also be applied AFTER loading. To me there is no sense in saving lights at all. Am I wrong? |
I'm capping this to 127 for the moment because in https://github.com/diasurgical/devilutionX/blob/master/Source/monster.h#L218 we're using it with an signed int8
0172c7c
to
0442268
Compare
I'm capping this to 255 for the moment because we're using it with an uint_8. Can be further increased if we change the uint_8 in lighting.h and lighting.cpp.
lighting.h, Line 43
extern uint8_t ActiveLights[MAXLIGHTS];
lighting.cpp, Line 21
uint8_t ActiveLights[MAXLIGHTS];