main.cpp File Reference

#include <windows.h>
#include "resource.h"
#include "Sound.h"
#include "TextureManager.h"
#include "Effect.h"
#include "glText.h"
#include "Camera.h"
#include "Light.h"
#include "CubeEffect.h"
#include "Load3dsEffect.h"
#include "CircleScrollerEffect.h"
#include "CubeMapEffect.h"
#include "PongEffect.h"
#include "WhiteEffect.h"
#include "EndEffect.h"
#include "MorphBumpEffect.h"

Classes

struct  _CGLRGBTRIPLE

Defines

#define MAX_EFFECTS   10
#define SCREEN_TEXTURE_SIZE   512
#define SCREEN_BPP   3

Typedefs

typedef _CGLRGBTRIPLE CGLRGBTRIPLE

Functions

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM)
BOOL CALLBACK DialogProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
void koch (VECTOR a, VECTOR b, int n)
void makeScreenshot ()
GLvoid ReSizeGLScene (GLsizei width, GLsizei height)
GLvoid setGLCamera ()
GLvoid setGLLighting ()
int InitGL (GLvoid)
 OpenGL setup.
void drawFPS (int fps)
int DrawGLScene (GLvoid)
GLvoid KillGLWindow (GLvoid)
BOOL CreateGLWindow (char *title, int width, int height, int bits, bool fullscreenflag)
void drawLoadScreen (int progress)
void initEffects ()
void removeEffects ()
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)

Variables

float aspectRatio = 1.0f
int screenWidth = 640
int screenHeight = 480
GLfloat pi = 3.1415926535897932
GLfloat radian = pi / 180
GLfloat epsilon = 0.05
int GL_LIGHT [8] = {GL_LIGHT0, GL_LIGHT1, GL_LIGHT2, GL_LIGHT3, GL_LIGHT4, GL_LIGHT5, GL_LIGHT6, GL_LIGHT7}
int currentLight = 0
int numLights = 1
LIGHTlight = new LIGHT[numLights + 1]
int currentCamera = 0
int numCameras = 4
GLfloat step = 30.0
CAMERAcam = new CAMERA[numCameras + 1]
HDC hDC = NULL
HGLRC hRC = NULL
HWND hWnd = NULL
HINSTANCE hInstance
bool keys [256]
bool active = TRUE
LONGLONG frequency
LONGLONG currentTime
LONGLONG lastTime
LONGLONG startTime
double timeElapsed = 0
double timeOverall = 0
double timeScale
double timeSecond = 0
bool highPerformance
double demoRuntime = 0
double frames
double currentFPS
double lastFrameTime
GLint fontFPS
double timeElapsedFPS = 0.0
CEffecteffects [MAX_EFFECTS]
float effectTiming [MAX_EFFECTS][2]
bool effectFirstCall [MAX_EFFECTS]
bool fullscreen = false
bool showFPS = false
bool loop = false
int resolutionIndex = 0
int resolutionCount = 4
char resolutions [4][20] = { "640x480", "800x600", "1024x768", "1600x1200" }
int resX [4] = { 640, 800, 1024, 1600 }
int resY [4] = { 480, 600, 768, 1200 }
int colorDepth = 32
BYTE * m_pBits
GLint fontLoad

Define Documentation

#define MAX_EFFECTS   10
 

#define SCREEN_BPP   3
 

#define SCREEN_TEXTURE_SIZE   512
 


Typedef Documentation

typedef struct _CGLRGBTRIPLE CGLRGBTRIPLE
 


Function Documentation

BOOL CreateGLWindow char *  title,
int  width,
int  height,
int  bits,
bool  fullscreenflag
 

BOOL CALLBACK DialogProc HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam
 

initialize dialog

handle OK button click

handle Cancel button click

void drawFPS int  fps  ) 
 

int DrawGLScene GLvoid   ) 
 

void drawLoadScreen int  progress  ) 
 

void initEffects  ) 
 

int InitGL GLvoid   ) 
 

OpenGL setup.

Setup OpenGL states. This is only done for security. The real setup is up to every effect.

GLvoid KillGLWindow GLvoid   ) 
 

void koch VECTOR  a,
VECTOR  b,
int  n
 

void makeScreenshot  ) 
 

void removeEffects  ) 
 

GLvoid ReSizeGLScene GLsizei  width,
GLsizei  height
 

GLvoid setGLCamera  ) 
 

GLvoid setGLLighting  ) 
 

int WINAPI WinMain HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
LPSTR  lpCmdLine,
int  nCmdShow
 

LRESULT CALLBACK WndProc HWND  ,
UINT  ,
WPARAM  ,
LPARAM 
 


Variable Documentation

bool active = TRUE
 

float aspectRatio = 1.0f
 

CAMERA* cam = new CAMERA[numCameras + 1]
 

int colorDepth = 32
 

int currentCamera = 0
 

double currentFPS
 

int currentLight = 0
 

LONGLONG currentTime
 

double demoRuntime = 0
 

bool effectFirstCall[MAX_EFFECTS]
 

CEffect* effects[MAX_EFFECTS]
 

float effectTiming[MAX_EFFECTS][2]
 

GLfloat epsilon = 0.05
 

GLint fontFPS
 

GLint fontLoad
 

double frames
 

LONGLONG frequency
 

bool fullscreen = false
 

int GL_LIGHT[8] = {GL_LIGHT0, GL_LIGHT1, GL_LIGHT2, GL_LIGHT3, GL_LIGHT4, GL_LIGHT5, GL_LIGHT6, GL_LIGHT7}
 

HDC hDC = NULL
 

bool highPerformance
 

HINSTANCE hInstance
 

HGLRC hRC = NULL
 

HWND hWnd = NULL
 

bool keys[256]
 

double lastFrameTime
 

LONGLONG lastTime
 

LIGHT* light = new LIGHT[numLights + 1]
 

bool loop = false
 

BYTE* m_pBits
 

int numCameras = 4
 

int numLights = 1
 

GLfloat pi = 3.1415926535897932
 

GLfloat radian = pi / 180
 

int resolutionCount = 4
 

int resolutionIndex = 0
 

char resolutions[4][20] = { "640x480", "800x600", "1024x768", "1600x1200" }
 

int resX[4] = { 640, 800, 1024, 1600 }
 

int resY[4] = { 480, 600, 768, 1200 }
 

int screenHeight = 480
 

int screenWidth = 640
 

bool showFPS = false
 

LONGLONG startTime
 

GLfloat step = 30.0
 

double timeElapsed = 0
 

double timeElapsedFPS = 0.0
 

double timeOverall = 0
 

double timeScale
 

double timeSecond = 0
 


Generated on Sun Jan 22 16:23:49 2006 for Inside Time by  doxygen 1.4.5