D:/WorkAround/prequengine/trunk/src/main.c File Reference

This file contains the main engine functions. It also contains configurations file definitions. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "main.h"
#include "resources.h"
#include "sdlengine.h"
#include "images.h"
#include "music.h"
#include "menu.h"
#include "interface.h"
#include "movies.h"
#include "hqrdepack.h"
#include "scene.h"
#include "grid.h"
#include "lbaengine.h"
#include "redraw.h"
#include "dialogues.h"

Include dependency graph for main.c:

Go to the source code of this file.

Defines

#define EUROPE_VERSION   0
#define USA_VERSION   1
#define MODIFICATION_VERSION   2

Functions

void allocate_video_memory ()
int get_config_type_index (char *lineBuffer)
void init_configurations ()
void init_engine ()
void init_keymap ()
void init_resources ()
void init_vars ()
void init_grid_buffer ()
void init_all ()
int main (int argc, char *argv[])

Variables

const char * ENGINE_VERSION = "0.1.0"
const char * CONFIG_FILENAME = "lba.cfg"
const char * SETUP_FILENAME = "setup.lst"
char CFGList [][18]


Detailed Description

This file contains the main engine functions. It also contains configurations file definitions.

Prequengine: a Little Big Adventure engine

Copyright (C) 2008 Prequengine team
Copyright (C) 2002-2007 The TwinEngine team

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file main.c.


Define Documentation

#define EUROPE_VERSION   0

Definition for European version

Definition at line 50 of file main.c.

Referenced by init_engine().

#define MODIFICATION_VERSION   2

Definition for Modification version

Definition at line 54 of file main.c.

Referenced by init_engine().

#define USA_VERSION   1

Definition for American version

Definition at line 52 of file main.c.

Referenced by init_engine().


Function Documentation

void allocate_video_memory (  ) 

Allocate video memory, both front and back buffers

Definition at line 117 of file main.c.

References frontVideoBuffer, frontVideoBufferbis, init_screen_buffer(), SCREEN_HEIGHT, SCREEN_WIDTH, screenLockupTable, and workVideoBuffer.

Referenced by init_engine().

int get_config_type_index ( char *  lineBuffer  ) 

Gets configuration type index from lba.cfg config file

Parameters:
lineBuffer buffer with config line
Returns:
config type index

Definition at line 140 of file main.c.

References CFGList.

Referenced by init_configurations().

void init_all (  ) 

Initialize all needed stuffs at first time running engine

Definition at line 418 of file main.c.

References init_grid_buffer(), init_keymap(), init_resources(), and init_vars().

Referenced by main().

void init_configurations (  ) 

void init_engine (  ) 

void init_grid_buffer (  ) 

Definition at line 411 of file main.c.

References blockBuffer, and brickBuffer.

Referenced by init_all().

void init_keymap (  ) 

Initialize engine auxiliar keymap

Definition at line 284 of file main.c.

References pressedKeyCharMap, and pressedKeyMap.

Referenced by init_all().

void init_resources (  ) 

void init_vars (  ) 

int main ( int  argc,
char *  argv[] 
)

Main engine function

Parameters:
argc numner of arguments
argv array with all arguments strings

Definition at line 430 of file main.c.

References cfgfile, ConfigFile::Debug, ENGINE_VERSION, init_all(), init_engine(), and sdl_close().


Variable Documentation

char CFGList[][18]

Configuration types at lba.cfg file

Fill this with all needed configurations at lba.cfg file. This engine version allows new type of configurations. Check new config lines at lba.cfg file after the first game execution

Definition at line 73 of file main.c.

Referenced by get_config_type_index().

const char* CONFIG_FILENAME = "lba.cfg"

Engine configuration filename

Definition at line 58 of file main.c.

Referenced by init_configurations().

const char* ENGINE_VERSION = "0.1.0"

Engine current version

Definition at line 47 of file main.c.

Referenced by init_engine(), and main().

const char* SETUP_FILENAME = "setup.lst"

Engine install setup filename

This file contains informations about the game version. This is only used for original games. For mod games project you can used lba.cfg file Version tag. If this tag is set for original game it will be used instead of setup.lst file.

Definition at line 66 of file main.c.


Generated on Thu Sep 18 14:14:48 2008 for Prequengine by  doxygen 1.5.5