Comments (11)
I have updated my code, I was setting the palette on the screen surface instead of the passed surface in Video::restoreSurfacePalette():
But I am still getting wrong colors, now black & while foregrounds with correct backgrounds :(
from openjazz.
Sorry for the late reply, low on free time these days. I like the SDL2 stuff not too invasive, so we can keep compatibility with some older platforms.
The problem with palette conversion I had before is the logical palette (which is grayscale in OJ). We currently need this for some effects to work correctly.
Others have tried this before, but the palette stuff was a blocker:
- https://github.com/Chemrat/openjazz/tree/sdl2
- https://github.com/MaddTheSane/openjazz/tree/sdl2
- https://github.com/sergiou87/openjazz/tree/port-to-sdl2
(btw. #33 is also a thing)
from openjazz.
Dont worry about the late reply, it is a hobby after all.
I am surprised to see that other people tried to port to SDL2 and failed on the same point...
So, any ideas on what could we do about it? The very concept of "logical palette" sounds strange to me: 8bit paletted modes just have pixel values that point to a palette, and I dont understand anything more about it.
So, maybe we should somehow operate both palettes in video::expose() before calling SDL2 SetPaletteColors()? How?
from openjazz.
OpenJazzNX - i have ported OpenJazz to SDL2 and Nintendo switch , Sauce Soon ...
https://youtu.be/2AI8i5xkAIU
from openjazz.
https://github.com/KranKRival/OpenJazzNX SDL2 sause
from openjazz.
@vanfanel FWIW I cross referenced KranKRival's work and added it to a fork of the latest SC of OpenJazz and have it running fine with SDL2 without the Nintendo Switch specifics.
Whilst it's 80% clean, it does have the same issue with the bonus levels which are removed on this build as the libNX build. I can do a PR but It wouldn't be wise unless they created a new SDL2 branch upstream.
(huge thanks to KranKRival of course)
from openjazz.
@swingflip Great! Now if a new SDL2 branch could be created upstream... SDL1.x is not recommended at all in 2020.
from openjazz.
I think @carstene1ns is the latest active member, hopefully he reads this and creates a SDL2 branch which we can push a PR to and hopefully fix up.
from openjazz.
oh lets hope so indeed
from openjazz.
@carstene1ns Could you please create the SDL2 branch? This wonderful engine really needs to go SDL2.
from openjazz.
I am not going to push this in the current state. It is full of bad palette hacks, so needs serious cleanup.
I do not have the time currently to work on this, so nothing is going to happen soon.
from openjazz.
Related Issues (20)
- music stutters during "planet" animation HOT 4
- Can we have alternate character skins for Jazz and Spaz from JJ2 in multiplayer? HOT 2
- Latest windows version detected as malware HOT 2
- Windows 11 says OpenJazz.exe is a virus HOT 1
- Unable to start OpenJazz Continuous build HOT 2
- Wii build instructions - need help HOT 2
- 240p non-interlaced mode - need help
- No sound in latest version HOT 3
- Web port
- Can't save or load games. JJ cheats not working either. HOT 1
- Add-on Support: [EASY :)]] HOT 1
- Impossible to map joystick HOT 5
- Add Flatpak package to Flathub HOT 1
- Jazz disappears when moving HOT 10
- How to use "other options"? HOT 5
- How to implement saving HOT 2
- Names of episodes are not alligned properly on X axis with original 320px wide resolution.
- PSP build failure, apparantly compiler lacks zstd LTO compression? HOT 10
- Cherry-pick upstream modplug changes
- Version 20231028 Issues HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openjazz.