Main Page | Alphabetical List | Data Structures | File List | Globals

sensei_config.c File Reference

configuration routines (source) to fix Allegro's config.c lakes More...

#include "sensei_config.h"
#include "string.h"
#include <stdio.h>
#include <stdlib.h>
#include "background_process.h"
#include "mp3.h"
#include "macros.h"
#include "logger.h"
#include "loads.h"
#include "allegro.h"
#include "global.h"

Functions

int system_font_exists (Game_variables variables, int font_number)
 Function to know if a system font exists usefull because system fonts aren't stored yet in an array.
FNTInfo * link_system_font (Game_variables variables, int font_number)
 Function that return a pointer to the system font wanted.
char to_minus (char a_char)
 function to convert into minus a char
char * string_to_minus (char *a_string)
char * extract_path (char *a_path)
 function to extract relative path from a .def path
char * remove_end_spaces (char *line)
 function to remove spaces at the end of a line
char * remove_comments (char *a_string)
 function to remove comments from a ligne (and spaces at the beginning too)
int is_section (char *buff, char *section_name)
 function to know if a line is a section tag
int degraded_is_section (char *buff, char *section_name)
int int_var_value (char *var, int default_value)
 function that return a int var value if there's one
int sensei_get_config_int (char *section_name, char *var, int default_value)
 like get_config_int but with spaces
char * char_var_value (char *var, char *default_value)
 function that return a char * var value if there's one
char * sensei_get_config_string (char *section_name, char *var, char *default_value)
 like get_config_string but with spaces
int sensei_set_config_file (char *path)
 like Allegro's set config_file
int sensei_unset_config_file ()
int * convert_string (char *to_parse)
 a little parser to convert colon seprated values (x,y,z,...) into a table of integers
double * convert_stringd (char *to_parse)
 a little parser to convert colon seprated values (x,y,z,...) into a table of integers
char * check_path (char *a_path, char *system_path, char *var_name, int *error)
 function to chek and fix a path accroding to Mugen's path priority
action_structinit_actions (action_struct *action_array, int *nb)
 Function that return the number of actions found in the SENSEI_BUFFERED_FILE.
int action_nb (char *input)
 function to return the number of an action Take a uncommented line as input and return the number of the action as written in the section [Begin Action n]
int action_elt_count ()
int * analyse_act_elt (char *line)
 function to analyze the line of an element action and return a tab of value corresponding
int fill_action (action_struct *an_action)
 function to fill an action Read the sensei_buffered_file, look for the action, allocate the good number of action elements and after that parse them and store them in the array struct
char ** fill_scenes_names (int *nb)
 function to fill an array of char * with scenes names, return the number of scenes found
int * fill_action_nb (int *nb)
int process_action (action_struct *an_action)
 Function to process an action (move from an element to aother if needed.
int convert_char_type (char *path)
 Function to convert a char path into a char type (none,kof91 or Mugen).
char * check_character_path (char *name, int *type)
 function to check path of a character and return the right path of character founded and the right type
char * extract_char_name (char *line, int *type)
 Function to extract the name of a character from a select.def char ligne, take the line to parse, and a names to fill and return the type of char founded.
int kof91_fill_char_ref (char_ref_struct *char_ref)
 Filling kof char_ref struct.
char * sensei_remove_quotes (char *a_string)
 function to remove quotes
int mugen_fill_char_ref (char_ref_struct *char_ref)
 Filling mugen's char_ref struct.
char_ref_structis_not_indexed (char_ref_struct *char_ref_array, char *char_path, int max, int *index, int char_type)
 Function that take the char_ref_array and add the char_path to it if it's not already, return the index where he put/found the char ; max is the size of the array.
int sensei_fill_characters_list (Game_variables variables)
 Function to read select.def file.
int play_music (music_struct *a_music)
 Function to play music struct.
int stop_music (music_struct *a_music)
 Function to stop playing music struct.
BITMAP * sensei_fill_bmp (SFFEntry *a_sff, int a_group, int an_index, int masked, int *xaxis, int *yaxis)
 function to fill an Allegro's bmp with a sprite included in a sff, an set the palette to the good one, and change the axis


Detailed Description

configuration routines (source) to fix Allegro's config.c lakes

Like a degraded config.c but with space support in section names and ';' used for comments and usefull function to dealds with Sensei Global_add.h structs


Function Documentation

char* check_path char *  a_path,
char *  system_path,
char *  var_name,
int *  error
 

function to chek and fix a path accroding to Mugen's path priority

Check if the file is in the specified path, then in the motif dir, then in data dir and then at the root dir Change error into -1 if the file is not found

int sensei_set_config_file char *  path  ) 
 

like Allegro's set config_file

Open the config file and stock it in a Buffer to search for vars with sensei_get_config_string and sensei_get_config_int


Generated on Thu Jan 13 14:13:05 2005 for KOF91 by  doxygen 1.3.9.1