Skip to content
BeholdMyGlory edited this page Apr 15, 2014 · 2 revisions

This page is very outdated and only represents the very initial thoughts a while after having started porting the game. The only thing that still applies at the time of writing is the dependencies as well as the fact that there are problems with the FMOD Ex API.

Dependencies:

  • Allegro
  • FMOD Ex

The game is far from being able to compile on Linux in several aspects. Right now the blocker is some outdated FMOD code, will have to be reworked in order to support newer versions. In fact, the whole game code is quite outdated and is using a lot of deprecated functions. Would be nice if it was possible to rewrite some of the code to stop using the deprecated functions.

FireyFly translated some assembly code to C at the end of /src/draw.c, but there's no certainty that the code actually works considering none of us really know ASM.

Right now, since there's really no point in even trying to make the game find the data yet, I've dumped the source code and the media (such as graphics, maps, sounds, etc.) in separate folders. The directory structure when installed on Windows, however, is:

  • Fiend.exe
  • config.dat
  • readme.txt
  • ./sound
  • ./data
  • ./graphic
  • ./save
  • ./maps
  • ./music

I've started on a CMake build system, I think it should be able to compile the whole project now, assuming the source code itself compiles. CMake might be overkill for this project, but at least the output is cool ;)

In theory, compiling should be as easy as cd fiend && mkdir build && cd build && cmake ../ && make. (Creating a build directory is optional, but the directories will be littered with various CMake files and folders otherwise.) Building on Windows should be done using the Fiend.vcproj project file with Microsoft Visual Studio, however I haven't attempted this myself.

If possible, moving from FMOD to an open source library would be preferable. I can't imagine it being too difficult to change the sound libraries, assuming you have a fairly good grasp of the Fiend source code.

There were some earlier issuse with maps linking to other maps using invalid file paths, from using the Windows \ path separator. The following bash script was used to transform the paths into valid Unix paths:

strings $1 | grep '\\[^\\]*\\[^.]*\.map'
if [ $? != 0 ]; then
  exit
fi

echo "---"
sed -i 's|\\\([^\\]*\)\\\(.*\.map\)|/\1/\2|g' $1
strings $1 | grep '\.map'
Clone this wiki locally