#include <iostream>
#include <vector>
#include <stdlib.h>
#include <SDL.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "gameobjs.h"
#include "cam.h"
#include "levels.h"
#include "menu.h"
#include "file.h"
Include dependency graph for graviton.cpp:
Functions | |
void | print_sdl_error (char *printme) |
Wraps SDL_GetError and prints it to cerr. | |
void | do_loop (void) |
The event loop of the game. | |
void | calcfps (void) |
Calculates framerate and prints it in the window caption. | |
void | movestuff (void) |
Handles all the physics of the game, essentially. | |
void | renderit (void) |
Do the actual rendering of the window contents. | |
void | keydownstuff (SDL_keysym *which) |
Handles keypresses. | |
void | keyupstuff (SDL_keysym *which) |
The complement to keydownstuff(). | |
void | run_once (void) |
Initialisation code for some of the objects. | |
void | cleanup (void) |
Delete the objects made in makelevel(). | |
int | main (int argc, char *argv[]) |
Initialisation and main loop. | |
Variables | |
FileConfig | cfg |
Instantiation of the configuration class. | |
Cam | thecam |
The camera of the scene. | |
SDL_Surface * | win = NULL |
The actual game window. | |
bool | looping |
Used to show if the event loop is still running. | |
float | frametime = 1 |
Measures the time taken for each iteration, and passed to the physics engine. | |
int | player1lives = 3 |
Lives of player 1. | |
int | player2lives = 3 |
Unsurprisingly, the number of lives of player 2. | |
vector< AbsObj * > | biglist |
The list of all objects in the scene. | |
Ship | playerOne = Ship(4.0, 8.0, 4.0) |
The first ship. | |
Ship | playerTwo = Ship(4.0, 8.0, 4.0) |
The second ship. | |
Grid | tehgrid = Grid(200,200) |
The grid that fades in. | |
vector< ShipBullet * > | bulletlist |
The global list of all projectiles in the system. | |
vector< ShipExhaust * > | exhaustlist |
The global list of exhaust particles in the system. |
|
Handles keypresses. This currently only works with hard-coded keys. Eventually the keycodes will be stored in the ship object and retrieved by this function (or on startup) to allow user configuration of keys (or joypad).
|
Here is the call graph for this function:
|
The complement to keydownstuff(). This does the same job as keydownstuff, except runs on KEY_UP events. |
Here is the call graph for this function:
|
Initialisation and main loop. No command line flags are currently accepted.
|
Here is the call graph for this function:
|
Handles all the physics of the game, essentially.
|
Here is the call graph for this function:
|
The global list of all projectiles in the system. List of lists. |
|
The global list of exhaust particles in the system. List of lists. |
|
The grid that fades in. I'm l337. |