Giter VIP home page Giter VIP logo

Comments (11)

vanfanel avatar vanfanel commented on July 30, 2024

I have updated my code, I was setting the palette on the screen surface instead of the passed surface in Video::restoreSurfacePalette():

https://github.com/vanfanel/openjazz/blob/5d8e106569ee0609500f25a9eff25b9364a999e5/src/io/gfx/video.cpp#L358

But I am still getting wrong colors, now black & while foregrounds with correct backgrounds :(

from openjazz.

carstene1ns avatar carstene1ns commented on July 30, 2024

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:

(btw. #33 is also a thing)

from openjazz.

vanfanel avatar vanfanel commented on July 30, 2024

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.

KranKRival avatar KranKRival commented on July 30, 2024

OpenJazzNX - i have ported OpenJazz to SDL2 and Nintendo switch , Sauce Soon ...
https://youtu.be/2AI8i5xkAIU

from openjazz.

KranKRival avatar KranKRival commented on July 30, 2024

https://github.com/KranKRival/OpenJazzNX SDL2 sause

from openjazz.

BananaRama203 avatar BananaRama203 commented on July 30, 2024

@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.

vanfanel avatar vanfanel commented on July 30, 2024

@swingflip Great! Now if a new SDL2 branch could be created upstream... SDL1.x is not recommended at all in 2020.

from openjazz.

BananaRama203 avatar BananaRama203 commented on July 30, 2024

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.

KranKRival avatar KranKRival commented on July 30, 2024

oh lets hope so indeed

from openjazz.

vanfanel avatar vanfanel commented on July 30, 2024

@carstene1ns Could you please create the SDL2 branch? This wonderful engine really needs to go SDL2.

from openjazz.

carstene1ns avatar carstene1ns commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.