diff --git a/bin/conf b/bin/conf deleted file mode 100644 index ccec9f1..0000000 --- a/bin/conf +++ /dev/null @@ -1,45 +0,0 @@ ---WINDOW. -width = 1024 -height = 768 -fullscreen = 0 - --- SCREEN. -fps = 0 - --- SOUND. -nosound = 0 -sound = 1. -music = 1. - --- JOYSTICK. --- Can be number or substring of joystick name. -joystick = "Precision" - --- KEYBINDINGS. --- Type can be keyboard, jaxis or jbutton. --- --- If left is an axis, it will automatically set right to the same axis. --- setting both to the same axis (key). --- You can use reverse = 1 option to reverse them. - --- Movement. -accel = { type = "jbutton", key = 0 } -left = { type = "jaxis", key = 0 } -right = { type = "jaxis", key = 0 } - --- Combat. -primary = { type = "jbutton", key = 1 } -target = { type = "jbutton", key = 4 } -target_nearest = { type = "jbutton", key = 3 } -face = { type = "keyboard", key = 38 } -board = { type = "keyboard", key = 57 } -secondary = { type = "jbutton", key = 7 } -secondary_next = { type = "jbutton", key = 5 } - --- Space. - --- Gui. -mapzoomin = { type = "jbutton", key = 4 } -mapzoomout = { type = "jbutton", key = 6 } -screenshot = { type = "keyboard", key = 82 } - diff --git a/src/font.c b/src/font.c index 67bb92e..a255d40 100644 --- a/src/font.c +++ b/src/font.c @@ -179,7 +179,7 @@ int gl_printMid(const glFont* ft_font, const int width, double x, const double y int gl_printText(const glFont* ft_font, const int width, const int height, double bx, double by, glColour* c, const char* fmt, ...) { - float h = ft_font->h / .63; // Slightly increase font size. + //float h = ft_font->h / .63; // Slightly increase font size. char txt[1024]; char buf[128]; va_list ap; diff --git a/src/font.h b/src/font.h index 514c56b..b9ec4fa 100644 --- a/src/font.h +++ b/src/font.h @@ -14,7 +14,7 @@ extern glFont gl_smallFont; // Small font. // glFont loading/freeing. // If font is NULL it uses the internal default font, same with gl_print -void glFontInit(glFont* font, const char* fname, const unsigned int h); +void gl_fontInit(glFont* font, const char* fname, const unsigned int h); void gl_freeFont(glFont* font); // Print text. diff --git a/src/land.c b/src/land.c index 94a66f3..e903c34 100644 --- a/src/land.c +++ b/src/land.c @@ -1,5 +1,4 @@ #include "toolkit.h" -#include "pause.h" #include "player.h" #include "rng.h" #include "music.h" @@ -104,6 +103,7 @@ void land(Planet* p) { // Change music. music_load(MUSIC_LAND); + music_play(); planet = p; land_wid = window_create(p->name, -1, -1, LAND_WIDTH, LAND_HEIGHT); diff --git a/src/lephisto.c b/src/lephisto.c index 2e770e3..4e98483 100644 --- a/src/lephisto.c +++ b/src/lephisto.c @@ -44,6 +44,7 @@ static char version[VERSION_LEN]; #define DATA_NAME_LEN 25 // Max length of data name. char* data = NULL; char dataname[DATA_NAME_LEN]; +int nosound = 0; int show_fps = 1; // Default - True. int max_fps = 0; int indjoystick = -1; @@ -109,9 +110,13 @@ int main(int argc, char** argv) { window_caption(); // OpenAL sound. - if(sound_init()) WARN("Problem setting up sound!"); - music_load("Machina"); - music_play(); + if(nosound) + LOG("Sound is disabled!"); + else { + if(sound_init()) WARN("Problem setting up sound!"); + music_load("Machina"); + music_play(); + } // Input. if((indjoystick >= 0) || (namjoystick != NULL)) { diff --git a/src/outfit.c b/src/outfit.c index 7f28edc..282ed0d 100644 --- a/src/outfit.c +++ b/src/outfit.c @@ -239,7 +239,7 @@ static Outfit* outfit_parse(const xmlNodePtr parent) { MELEMENT(tmp->name==NULL, "name"); MELEMENT(tmp->max==0, "max"); MELEMENT(tmp->tech==0, "tech"); - MELEMENT(tmp->mass==0, "mass"); + // MELEMENT(tmp->mass==0, "mass"); MELEMENT(tmp->type==0, "type"); #undef MELEMENT diff --git a/src/player.c b/src/player.c index 19e29ee..4625371 100644 --- a/src/player.c +++ b/src/player.c @@ -33,7 +33,7 @@ Pilot* player = NULL; // extern in pilot.h // Player global properties. char* player_name = NULL; // Player name. -unsigned int credits = NULL; // Ze monies. +unsigned int credits = 0; // Ze monies. unsigned int combat_rating = 0; // Ze rating. unsigned int player_flags = 0; // Player flags. // Input.c diff --git a/src/ship.c b/src/ship.c index af4693b..3fc2254 100644 --- a/src/ship.c +++ b/src/ship.c @@ -230,7 +230,7 @@ void ships_free(void) { // Used to visualize the ships status. void ship_view(char* shipname) { - Ship* s; + Ship* s = NULL; char buf[1024]; unsigned int wid; wid = window_create(shipname, -1, -1, VIEW_WIDTH, VIEW_HEIGHT);