@Marlon
Quote:
@kas1e if you have done any changes to make this work with OS4, please submit these changes in a PR so I can add it to the AmigaPorts repo. I am in talks with the official maintainers of DevilutionX to add our Amiga specific changes to the official repo, which means they will distribute official builds for AmigaOS 3.x, AmigaOS 4.x, WarpOS, MorphOS and AROS with every release.
Imho for os4 its enough to build just SDL2 version, as really SDL2 version supported by DevolutionX better. So there changes i do (but which anyway fits also and in build SDL1 version).
1. In those files:
Source/diablo.h
SourceX/controls/devices/game_controller.h
SourceX/controls/devices/joystick.h
SourceX/storm/storm_dx.cpp
i add at top #include <cstdio>
(to avoid errors about non declared snprintf)
2. In the 3rdParty/Radon/Radon/source/key.cpp add at top:
#define _GLIBCXX_USE_C99_STDIO 1
(to make to_string() works)
3. evilutionx.dir/SourceX/dx.cpp have some bad for c++ stuff, on line 235, in the ifdef __amiga__ part : old_buffer = surface->pixels; , so need to add to build/cmakefiles/devolutionx.dir/flags.make : -fpermissive
4. in SourceX/dx.cpp i comment out all __AMIGA__ ifdefs (they to check if it 680800 / vamprire)
Also in SourceS/sdl_compat.h commeout out whole __AMIGA__ ifdef block.
Because if not, it bring errors on linking. Probably it can be just if __AMIGA__ and !__amigaos4__
5. In SourceX/storm/storm.cpp i had to modify GetPrefPath() to make all works with paths and stuff (that for SDL2 version, probabaly you didn't meet with it as build SDL1 version for os3):
void GetPrefPath(char *buffer, size_t size)
{
#ifdef __amigaos4__
snprintf(buffer, size, "%s", "PROGDIR:");
#else
char *path = SDL_GetPrefPath("diasurgical", "devilution");
if (path == NULL) {
buffer[0] = '\0';
return;
}
snprintf(buffer, size, "%s", path);
SDL_free(path);
#endif
}
And that all. I also had to change CMakeLists.txt a bit, but not sure if it worth mention as if all builds already for you then all fine.
Also if for automatic builds only SDL1 will be choicen (but better still SDL2 for os4), then there need some more changes (like, not use 8bit modes, because intro then broken visually).
Edited by kas1e on 2020/1/12 19:01:04