#include "color.h"
#include "iothread.h"
#include "tanksprite.h"
#include "game.h"
#include "gameconfig.h"
#include "net.h"
#include "random.h"
#include "states.h"
#include "menustate.h"
#include <SDL_ttf.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
Include dependency graph for main.c:
Go to the source code of this file.
Defines | |
#define | _USE_MATH_DEFINES |
Functions | |
int | main (int argc, char *argv[]) |
The entry point for Tank! main() is responsible for:
| |
Variables | |
char | binPath [128] |
Stores the path to where the binary is located. | |
static Sint32 | elapsedTime |
The elapsed time of the frame. | |
Uint32 | frameTime |
The current simulation time in milliseconds. | |
SDL_Joystick * | stick = NULL |
Uint32 | videoFlags |
The SDL video flags used in all calls to SDL_SetVideoMode(). |
Copyright (C) 2007 Jeff Jackowski
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Or visit their website at: http://www.gnu.org/
Definition in file main.c.
int main | ( | int | argc, | |
char * | argv[] | |||
) |
The entry point for Tank! main() is responsible for:
Command line parameters can be used to modify the program's operation. At present, the command line parsing is very simple and will only parse one argument. The arguments are:
main()'s role has been expanded to include frame rate management, calling Render(), and invoking the network module to send and receive messages.
Definition at line 102 of file main.c.
References binPath, dInfo, DisplayInfo_t::display, DrawTank(), elapsedTime, FALSE, FontInit(), FRAME_DURATION, frameTime, GenTankSprites(), InitAudio(), RenderItem_t::loc, DisplayInfo_t::luh, DisplayInfo_t::luw, menuSettings, NetInit(), NetInitSrv(), NetUninit(), DisplayInfo_t::ph, RenderItem_t::physLocX, RenderItem_t::physLocY, prnfile, prnout, DisplayInfo_t::pw, RandInit(), RandUninit(), Render(), RenderInit(), RenderUninit(), Player_t::rot, RunState(), SetupColorVals(), DisplayInfo_t::showLabels, StartIOThread(), stick, StopIOThread(), STRING_ERR_FNTINIT, STRING_ERR_RENDER, STRING_ERR_SDL, STRING_ERR_TTFINIT, STRING_ERR_VIDMODE, STRING_ERR_VIDQ, STRING_STAT_DOUBLEBUFF, STRING_STAT_ENTERSTATE, STRING_STAT_EXITSTATE, STRING_STAT_HWACCEL, STRING_STAT_JOYSTICK, STRING_STAT_NOAUDIO, STRING_STAT_NOHWACCEL, STRING_STAT_OUTGRPMEM, STRING_STAT_OUTSYSMEM, STRING_STAT_SINGLEBUFF, STRING_STAT_VIDDRNAME, strings, Player_t::tank, Player_t::team, TextInit(), TextSetWindowTitle(), TextUninit(), TRUE, UninitAudio(), and videoFlags.
Here is the call graph for this function:
char binPath[128] |
Stores the path to where the binary is located.
The data files for the program should also be here.
Definition at line 69 of file main.c.
Referenced by FontInit(), and main().
Sint32 elapsedTime [static] |
Uint32 frameTime |
Uint32 videoFlags |