Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Brick Atelier

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
Well.. spoke too soon maybe. After changing to SDL3 in the project and replacing SDL2 includes with SDL3 it still gives 211 errors. Mostly because a number of names have changed and I guess some functions are simpler, like SDL_CreateSurface. Good thing is that I have tried to use SDL directly as little as possible, abstracting the use in classes.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
Then again this project has maybe unusually large number of event loops, because every specific part of the program is an event loop. Games often have only one event loop I think. Each event loop has to be fixed, because SDL_EVENT... change and other changes. 73 errors left to fix, but after those fixes I think mouse coordinates have to be fixed also, because they are now float type instead of int. I don't know why they changed it to float, there must be some kind of reason.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
After fixing everything (except a number of float - int conversions) I had to rewrite the file dialog routine. The old way was a hack where you would use windows.h to call the windows file dialog, but in SDL3 there is an internal file dialog system so you don't need to include windows.h which is great. SDL3 itself is calling the native file dialog, but it's doing it in a funky way using a callback function that returns from the file dialog function. To make it work you need to write an event loop that waits for the file dialog to end, by checking out if the file name has been selected. Then I just made the callback to set static variables in the dialog class, because you can't return anything from it.

There are some weird bugs. The tile strip seems to have inverted RGB values or something else going on, some tiles are blue! And when you switch the tileset it seems like texture update is not working, or scene update.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
Colors were wrong because the pixel format was wrong, in SDL3 you decide the format yourself so it can be anything you want. Scene switching had bugs, I don't know how I missed them before, but now fixed. Save tiles dialog is still a missing feature, but I guess it works pretty much the same way as loading. I also have to remove the code I was writing for the manual file dialog, that was quite an adventure.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
Tidying up for 0.88 release. If I can get this to compile in linux it would be great so I could check and fix all screen update bugs. I think creating a release makes me go through each feature and check out if it works.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
Now it compiles on Linux, because SDL3-devel is in package manager, but the program hangs for some reason and Fedora displays a popup dialog to stop it. Must be something wrong with SDL event loop or something, because it does work for a moment, but it's really slow. I wonder how to debug this some way to see what happens.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
SDL3 example project seems to work fine, so it's not SDL3 I guess. It's slow, but seems to take around 10% processor speed. The best part is that you can't debug this, right? I think this means there will not be a linux version.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom