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
WIP: Proper video scaling, sdl blitting, 32bpp resource support, etc. #738
base: master
Are you sure you want to change the base?
Conversation
Hmm, how will this differ from the scaling SDL2 already provides us? Eg. start in windowed mode and just maximize the window. Either way, I like the idea of highres file override options. |
Scaling should be better quality and different parts of screen can be scaled with different ratio. |
5706211
to
df4f305
Compare
04a026f
to
c43af33
Compare
This is becoming a big chunk of changes. First part of commits upto "Removed useless defines." f8ecb2d is all about rewriting blit code, adding support for 32bpp and making everything looks nice. And it works fine without later commits. Later ones handle change of coordinates where everything is drawn on screen and how much it's scaled. And they touch code everywhere, but aren't big changes. Have also separated cosmetic code changes and cleanups from functional changes into different commits. BTW have found few buffer overruns in blit code that became serious as buffers grew/changed size. |
Yes please! |
Hey @maxrd2 is the TODO in the first post still up to date? If so, did you plan to finalize the changes? Besides the laptop&tactical items, most of the remaining look like bonuses that could be done separately, later. The current conflict is trivial, but these things are best solved by a timely merge into master. :) |
Yes I plan to finish these, and yes wanted to merge them before completing everything, once all interface changes/fixes are done and game is usable/looks good. EDIT: have rebased to current master, will try to get that issues investigated/solved this weekend and get rest of the changes completed ASAP so it can be merged. |
//#define RIGHT_X -2 | ||
//#define RIGHT_Y 11 | ||
//#define LEFT_X 2 | ||
//#define LEFT_Y 5 |
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.
Why not just delete them?
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.
I kept all obsolete coordinate defines commented out like this... in case something somewhere uses hardcoded 11 or -2 (because there are a lot of places that do that when calculating coordinates) so it's easier to find it. Once I'm done with all the changes will go through commits and remove ugly stuff like this.
Great, thanks! And holy carp, I forgot what a gargantuan effort this was — practically unreviewable. Still, I tried, lightly, though I admit that I didn't check all the files. One benchmark of the completeness of the changeset is how many of your own fixmes remain in the final version. We're thinking of speeding up the next release, but this is more like something that we'd merge right at the start of a cycle, so little cuts can get patched over. If there are few, we can always make a new release quickly. |
This reverts commit 6748af1.
Replaced with FromCellToScreenCoordinates() call which should be accurate now.
Old code used palette to render different characters. We don't use palette anymore so multiple surfaces are loaded for each skin/head/pants/vest color combination. Cached surfaces are loaded during rendering when they miss color combination. TODO: improve/rewrite caching FIXME: pallete was replaced by UTF8 string class - this is possibly borked now
I have rebased to current master. It compiles, it runs and it's not looking right. Some time ago these changes were all looking right and now they're not. During all that I should hope that nothing will change on master that will again undo all the work and time invested. I'm sorry everyone I just don't have the will to do that in the foreseeable future - if anyone wants to pick up and continue where I left please do.
|
It was naive to think the codebase would remain the same for 5 years. Thanks for the work either way, it's still salvageable. |
5 years would be naive yes. Few months not so much. |
Have done an experiment with scaling all resources to screen size immediately as they are loaded to improve size and look of the screen graphics.
Here is the progress of the planned changes:
Am not sure if SDL 2D allows for z buffers which are used for blits on tactical map.
Anyone has any thoughts on this? Is this something you guys wanted to implement at some point?