Port Requests


"Gilbert and the doors"

I compiled it but when i run i have in debugger (gdb) :
Program received signal SIGSEGV, Segmentation fault.
#0 0x400a2994 in Mix_VolumeChunk()
from /mnt/utmp/codeblocks/usr/lib/libSDL_mixer-1.2-so.0

#1 0x000119d4 in main (argc=1, argv=0xbeffe874) at Gilbert.c:94


Where the code in Gilbert.c at line 94 is:

Mix_VolumeChunk(jump, MIX_MAX_VOLUME);

here in spoiler the code that initialize the SDL at file Gilbert.c:
int main(int argc,char *argv[]){
MainBoot();//initialisation des variable public au demarage
//FreeConsole(); //efface le terminal pour windows
if ((SDL_Init(SDL_INIT_EVERYTHING)) == -1 ){
fprintf(stderr,"Erreur SDL\n");return -1;}
//Joystick variable
SDL_Joystick* Joyst=NULL;
NumberofJoystick=SDL_NumJoysticks();


SDL_WM_SetCaption("Gilbert and the Doors v1.0 (2016-2017)", NULL);

// debut Configuration du son
if (Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS,2048) == -1) //Mixer init music
{
printf("%s", Mix_GetError());
}

//definition du nombre de canaux et du volume
Mix_AllocateChannels(12);
Mix_Volume(1, MIX_MAX_VOLUME/2);
Mix_VolumeMusic(MUSICVOLUME);

Mix_Music *music;
music=Mix_LoadMUS("MUSIC/intro.wav");

//Créer les pointeurs pour stocker les .WAV
Mix_Chunk *jump;
Mix_Chunk *jump2;
Mix_Chunk *key;
Mix_Chunk *bump;
Mix_Chunk *outch;
Mix_Chunk *coin;
Mix_Chunk *explose;
Mix_Chunk *gameover;
Mix_Chunk *switchon;
Mix_Chunk *switchoff;
Mix_Chunk *opendoor;
Mix_Chunk *badaboum;
Mix_Chunk *vital;
//Charge les wav dans les pointeurs
jump = Mix_LoadWAV("SND/jump.wav");
jump2 = Mix_LoadWAV("SND/jump2.wav");
key = Mix_LoadWAV("SND/key.wav");
bump = Mix_LoadWAV("SND/bump.wav");
outch = Mix_LoadWAV("SND/outch.wav");
coin = Mix_LoadWAV("SND/coin.wav");
explose = Mix_LoadWAV("SND/explose.wav");
gameover = Mix_LoadWAV("SND/game over.wav");
switchon = Mix_LoadWAV("SND/switchon.wav");
switchoff = Mix_LoadWAV("SND/switchoff.wav");
opendoor = Mix_LoadWAV("SND/opendoor.wav");
vital = Mix_LoadWAV("SND/vital.wav");
badaboum = Mix_LoadWAV("SND/badaboum.wav");

//attribuer les volumes pour les wav
Mix_VolumeChunk(jump, MIX_MAX_VOLUME);
Mix_VolumeChunk(jump2, MIX_MAX_VOLUME);
Mix_VolumeChunk(key, MIX_MAX_VOLUME/2);
Mix_VolumeChunk(bump, MIX_MAX_VOLUME/2);
Mix_VolumeChunk(outch, MIX_MAX_VOLUME/4);
Mix_VolumeChunk(coin, MIX_MAX_VOLUME);
Mix_VolumeChunk(explose, MIX_MAX_VOLUME);
Mix_VolumeChunk(gameover, MIX_MAX_VOLUME);
Mix_VolumeChunk(switchon, MIX_MAX_VOLUME/2);
Mix_VolumeChunk(switchoff, MIX_MAX_VOLUME/2);
Mix_VolumeChunk(opendoor, MIX_MAX_VOLUME/8);
Mix_VolumeChunk(badaboum, MIX_MAX_VOLUME);
Mix_VolumeChunk(vital, MIX_MAX_VOLUME/2);
// fin Configuration du son
 
@Farox : check if the game is linked with libvorbisfile.so

If yes, change it to libvorbisidec.so instead, and also change all #include <vorbis/vorbisfile.h> to #include <tremor/ivorbisfile.h>
 
Ah ok.
Then it simply looks like one the WAV sound file is not loaded correctly (the one referenced at line 96 probably).
 
Thanks i'll try to investigate.
[doublepost=1491080899,1491078486][/doublepost]Ok fixed.
First problem the WAV file was not found by my mistake, i was running into the src directory :)
Second problem the game will try to get a char from a config file...waiting for this char that is in wrong format (maybe) so i try to recompile with -fsigned-char and it work.:cool:
 
I did compile Liberation Circuit, but the lowest resolution is 1024x768. It seems it would need some code for down scaling.
And the game uses bitmap fonts, but will use ttf fonts in the future. More easy to read at 480p or 1080p, ;)
 
I have just added some auto-scalling function in Allegro5 to test Liberation Circuit (not yet pushed to my github yet).
It does work (with good speed), but the text is barely readable, and, unfortunatly, it's a game were you need to read.
liberationcircuit4.png
 
I have just added some auto-scalling function in Allegro5 to test Liberation Circuit (not yet pushed to my github yet).
It does work (with good speed), but the text is barely readable, and, unfortunatly, it's a game were you need to read.
View attachment 30228

Did you played with the init.txt? There seems to be a double font size option included "Version 1.1 (20 March 2017) fixes some bugs and adds a double-sized fonts option (edit init.txt for this)."

ah, and there is also large_fonts with 1.5x font size

in init.txt
# display_w 1600
# display_h 900
fullscreen
vol_music 60
vol_effect 80

#1.5x size
large_fonts
#2x size
double_fonts


from line 541 in main.c
<code>
if (settings.option [OPTION_DOUBLE_FONTS])
{
load_font(FONT_BASIC, "data/images/fwss_font_L.bmp", 20, 1.9, 1.6);
load_font(FONT_SQUARE, "data/images/fwt_font_L.bmp", 20, 1.9, 1.6);
load_font(FONT_SQUARE_LARGE, "data/images/large_font_L.bmp", 20, 1.9, 1.9);
}
else
{
if (settings.option [OPTION_LARGE_FONTS])
{
load_font(FONT_BASIC, "data/images/fwss_font_M.bmp", 14, 1.3, 1.2);
load_font(FONT_SQUARE, "data/images/fwt_font_M.bmp", 18, 1.5, 1.4);
load_font(FONT_SQUARE_LARGE, "data/images/large_font_M.bmp", 20, 1.5, 1.5);
}
else
{
load_font(FONT_BASIC, "data/images/fwss_font.bmp", 12, 1.0, 1.0);
load_font(FONT_SQUARE, "data/images/fwt_font.bmp", 16, 1.0, 1.0);
load_font(FONT_SQUARE_LARGE, "data/images/large_font.bmp", 20, 1.0, 1.0);
}
}
</code>
 
Last edited:
large font does help a lot. There is still something odd with filtering. It looks like fonts are using GL_NEAREST filter instead of GL_LINEAR
Of course there is now some overlapping, but at least it's readable.
liberationcircuit3.png
 
I only ported ASCIIpOrtal from Cymon's game, wich is a great game. That github links looks nice, with plenty of simple things inside.
 
Last edited:
I have a re- request :)
Could some one take a look at OpenRA again?
It's been a while and things have improved on both Pandora and OpenRA side. If I recall correctly ptitseb was working on it... long ago ;)
 
Back
Top