Skip to content
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

Use SDL 2.0 or higher #92

Closed
MartinGuehmann opened this issue Feb 8, 2019 · 8 comments · Fixed by #298
Closed

Use SDL 2.0 or higher #92

MartinGuehmann opened this issue Feb 8, 2019 · 8 comments · Fixed by #298
Milestone

Comments

@MartinGuehmann
Copy link
Collaborator

Currently, we use SDL 1.2, which handles non British keyboard layouts not very, well. I am trying to open the chat Window, but nothing happens. And the best is if I set the operating system to use a British keyboard layout then all programs do it, but not CTP2. I hit the ä-key, that is the key that is labled on a British keyboard with '. And still nothing happens. I hit + and I only get +, with shift, too.

It seems that SDL 2.0, can handle localized keyboards much better.

@LynxAbraxas
Copy link
Contributor

This might solve #30.

@williamd67
Copy link
Contributor

williamd67 commented Apr 4, 2020

I started working on the migration to SDL 2.0. I started by compiling the source code with SDL2 while isolating the parts that did not compile by introducing defines. This resulted in 4 areas that caused issues:

  1. screen drawing (SKIP_SDL2_SCREEN_ISSUES)
  2. event handling (SKIP_SDL2_EVENT_ISSUES)
  3. cd-rom (SKIP_SDL2_CDROM_ISSUES)
  4. debug-memory (SKIP_SDL2_DEBUG_MEMORY_ISSUE)

Currently I fixed the SKIP_SDL2_SCREEN_ISSUES and the initial blitting to the screen works. I cannot pass the initial menu as the events do not work properly so I expect some extra work as soon as the events work.

Another big issue is that SDL2 does not support CD-rom any more which mean that there is no migration possible. What is your opinion about this? Can we drop support for CD-rom under Linux or do we need to find another solution?

Next step is to fix the event issues.

@LynxAbraxas
Copy link
Contributor

This is great, thanks for working on this @williamd67.
In my opinion we could drop CD-ROM support, since checking texture.dat from CD was dropped to support GOG, which is without CD. Those that have CTP2 on CD just need to copy the data over, but it is not necessary any more to have the CD inserted for starting the game. @MartinGuehmann what do you think?

@williamd67
Copy link
Contributor

I propose to drop CD-ROM support for Linux as it is not supported by SDL2. Agreed?

@LynxAbraxas
Copy link
Contributor

I agree, @MartinGuehmann what do you think? Do you foresee any problems with that?

@MartinGuehmann
Copy link
Collaborator Author

I agree, @MartinGuehmann what do you think? Do you foresee any problems with that?

Well, not really my favorite, but my laptop has no CD/DVD-ROM drive, either. For my taste it is a bit early to pull CD-support. But I guess it is more hassle then it is worth it.

@MartinGuehmann
Copy link
Collaborator Author

I think we have to add instructions how to copy the videos, and rip the sound files from the CD, then it should be fine.

@MartinGuehmann MartinGuehmann linked a pull request Apr 19, 2020 that will close this issue
@LynxAbraxas
Copy link
Contributor

I'll try to check if the videos of the CD work as they are with SDL2 now, so far I use re-encoded ones for the use with SDL_ffmpeg.
Ripping the sound files from the CD can be avoided with:

youtube-dl  -x -t -i --audio-format vorbis --audio-quality 0 'https://www.youtube.com/watch?v=DtQBlVirrkU&list=PL5Z8d0ZfZ8SbHNEFnlR3jckHDmuZjBUaT'
mln -s 'Call to Power 2 - * - *' Track#1.ogg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants