jorio / BillyFrontier

Pangea Software’s Billy Frontier for modern systems
https://pangeasoft.net/billy
Other
26 stars 5 forks source link

big endian port #1

Open kas1e opened 2 years ago

kas1e commented 2 years ago

Howdy ! :) This game also works fine now, except one issue : while sounds are good, music are distored , like not endian swapped. But gameplay itself and whole game in terms of colors, etc all fine.

jorio commented 2 years ago

Please modify the two lines below in Pomme::Sound::LoadMP3AsResource and let me know if the music sounds better:

    info.compressionType = 'swot';   // ---> change to 'twos'
    info.bigEndian       = false;    // ---> change to true

If that works, I'll push the fix to Pomme.

kas1e commented 2 years ago

Yeah, now music fine ! :) so you can push the fix. Thanks again ! The only problem left for all the Pomme based games is save/load prefs/highscore which for now saves on our side to the root of volume (probabaly this : in the path like work:games/xxxx kill the logic of function which handle paths

kas1e commented 2 years ago

I uploaded aos4version for amigaos4 users, and everywhere in readmes point out that it all your work, and if someone wish he can donate to you, etc. And made a new proper video of how it looks like, check this out:

https://youtu.be/10Ff3GF0uRQ

jorio commented 2 years ago

Awesome! Thank you for bringing the games to Amiga :)

kas1e commented 2 years ago

By the way, is all games support SDL2 gamepads ? I asking because it didn't work on my side, so if they should, it is something to look at for me .. But if not, then at least i will know they should't :)

jorio commented 2 years ago

They do, in fact, CMR requires gamepads for multiplayer.

The only exception is Billy Frontier, it's designed for mouse and keyboards only so I didn't bother adding controller support.

jorio commented 2 years ago

The only caveat is your controller must be recognized by SDL_GameController. This is an API that provides standardized button mappings across different gamepad models.

My ports read a big database of button mappings in Data/System/gamecontrollerdb.txt. Perhaps that needs to be tweaked for Amiga, because I think the mappings are OS-specific. The database comes from https://github.com/gabomdq/SDL_GameControllerDB

kas1e commented 2 years ago

I just see that Billy have this piece of code in main.cpp

    // Init joystick subsystem
    {
        SDL_Init(SDL_INIT_GAMECONTROLLER);
        auto gamecontrollerdbPath8 = (dataPath / "System" / "gamecontrollerdb.txt").u8string();
        if (-1 == SDL_GameControllerAddMappingsFromFile((const char*)gamecontrollerdbPath8.c_str()))
        {
            SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "Billy Frontier", "Couldn't load gamecontrollerdb.txt!", gSDLWindow);
        }
    }

But i think it just left-over from copy-paste from another games ?:) Will check CMR and OttoMatic

jorio commented 2 years ago

Yup, there is some gamepad support, but you can't get very far without a mouse in Billy Frontier — even on the "big 3" OSes ;) (Windows/Mac/Linux)

kas1e commented 2 years ago

Oh, found something intersting (at least in CMR) - once i add my gamepad to the database, it then works in the game, but not in menu till i start the game and exit back.

I.e. to reproduce: run CMR and try to go to options gamepad settings : it says there is no gamepad. But then, start a game from keyboard, and exit immediately : and now gamepad start to works. It works then and when navigate in menu, and when go to settings, etc. It just looks like that actual initialisation of gamepad happens not at start as expeted, but at start of actual gameplay. It is the same for you ? If not it can be some issues on our side ..

kas1e commented 2 years ago

In OttiMatic all seems fine : gamepad recognized from start and i can navigate in menu, etc right once i start the game.

jorio commented 2 years ago

In CMR, you can try to call TryFillUpVacantControllerSlots() in InitInput(). (You'll need to remove static from TryFillUpVacantControllerSlots and declare it in input.h so InitInput can see it)

kas1e commented 2 years ago

Yeas, in CRM what you say help :) So you probabaly need to commit this change, it helps fur sure :)

jorio commented 2 years ago

Great, when I have time I'll push the mp3 fix for BF and the gamepad fix for CMR. Thanks!