I'm completely lost here on why my source code isn't compiling...yes, I'm a noob at C++(not really, did some GBA programming) so I will need some help trying to figure this out.
It actually compiled up until I added the Main Func, btw I'm trying to port this code over from Darkbasic Pro.
// Dark GDK - The Game Creators - www.thegamecreators.com
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
#include "string.h" //used for loading strings
//Include Other Source Files
#include "Main.cpp" //Contains main function.
//Setup global Variables.
const int GS_INITSETUP = 10 ; //Setup display, load main menu graphics, set globals
const int GS_TITLESCREEN = 20; //Display Team Logo, maybe even intro movie
const int GS_MAINMENU = 30; //Games Main Menu to select different menu options
const int GS_OPTIONS = 40; // Options Menu
const int GS_GAMEOPTIONS = 50; // Change game settings here
const int GS_INPUTOPTIONS = 60; //Change input settings here
const int GS_SOUNDOPTIONS = 70; //Change sound settings here
const int GS_VIDEOOPTIONS = 80; // Change video settings here
const int GS_LOADGAME = 90; // load save games
const int GS_SAVEGAME = 100; // save games to load later
const int GS_GAMELOOP = 110; // init level graphics,sound,music,3d objects,textures,etc... then go into game play loop.
const int GS_INGAMEMENU = 120; // ?
const int GS_CREDITS = 130; // Give credit where credit is due ;)
const int GS_SHUTDOWN = 140; // delete memory/resources used. then exit game...
int global_GameStage;
int global_ExitGame;
// window resoluton
int global_ScreenWidth;
int global_ScreenHeight;
int global_ScreenDepth;
// key controls
int global_leftkey;
int global_rightkey;
bool global_SPACEPRESSED; //check if spacekey is being held.
// Logo's and Main menu images
int global_LoadLogoImg;
int global_MainLogoImg;
int global_PressStartImg;
int global_NewGameImg;
int global_LoadGameImg;
int global_SettingsMenuImg;
int global_DebugMenuImg;
int global_ExitGameImg;
// Logo's and Main menu 3d objects
int global_MainLogoObj;
int global_PressStartObj;
int global_NewGameObj;
int global_LoadGameObj;
int global_SettingsMenuObj;
int global_ExitGameObj;
int global_TableObj;
int global_EggObj1;
int global_EggObj2;
int global_EggObj3;
int global_EggObj4;
int global_EggObj5;
// Main menu globals
int global_MenuOption;
bool global_Debug; //Variable to turn on/off debug mode.
// RWP File Settings
char global_RWPFileSettings;
// FILE NUMBERS IN USE
int global_RWPFileSettings_FileNumber = 1;
// Counter's
int global_StartButtonCounter;
int global_ShowStartButton;
// Main menu Arrays
//DIM Array_MenuItem(5) as integer
// Main Character Object ID's
int global_CharID; //Characters Object ID.
int global_PlayerMoving; //Direction player is moving.
int global_Timer; //Timer for player animation.
int global_CurSpace; //Current space player is standing on.
//Other 3d objects.
int global_GroundObj; //Ground object in levels.
int global_BackdropObj; //Backdrop Object in levels.
//Texture/Image variables
int Array_CharTex[12]; //Player texture vars.
int global_PlayerFrame; //Player Animation frame#.
int global_StartTexture; //Start space
int global_Battle1Texture; //Battle space type 1
int global_BossTexture; //Boss image space.
int global_ShopTexture; //Shop space.
int global_PathwayTexture; //Path space textures.
int global_GroundTexture; //Normal Ground Texture.
int global_Backdrop; //Backdrop image for levels.
//# of Gameboard pieces
int global_LastByte;
//Game board piece ID's , create the GameBoard Type.
class GameBoard
{
public:
int Xpos;
int Zpos;
int SpaceID;
int Completed;
};
GameBoard Array_GamePiece[1000]; //Make an array for tile pieces.
int global_BoardXsize;
//Player Status...
int global_PlayerHP; //Players current HP amount.
int global_PlayerMaxHP; //Players total HP amount.
int global_PlayerPoints; //How many points player has.
// the main entry point for the application is this function
void DarkGDK ( void )
{
//Call main Function.
MainFunc( );
dbSyncOn ( );
dbSyncRate ( 60 );
}
void MainFunc ( void )
{
/*
Parameters: N/A
Returns: N/A
Description: The main game loop.
*/
global_ExitGame = 0;
global_GameStage = GS_INITSETUP;
//Turn on/off debug menu
global_Debug = 1;
//initiate vars.
global_PlayerFrame = 1;
//main loop
while ( LoopGDK ( ) )
{
//Note this is just a rough draft of game stages. Add/Delete when needed.
if (global_GameStage == GS_INITSETUP)
{
//AS_InitSetup(); // Setup display, load main menu graphics, set globals
}
if (global_GameStage == GS_TITLESCREEN)
{
//AS_TitleScreen(); // Display Team Logo, mabie even intro movie
}
if (global_GameStage == GS_MAINMENU)
{
//AS_MainMenu(); // Game's Main Menu to select different options
}
//if (global_GameStage == GS_LOADGAME)
//AS_LoadGame(); // load save games
//if (global_GameStage == GS_SAVEGAME)
//AS_SaveGame(); // save games to load later
if (global_GameStage == GS_GAMELOOP)
{
//AS_GameLoop(); // init level graphics,sound,music,3d objects,textures,etc... then go into game play loop.
}
//if (global_GameStage == GS_INGAMEMENU)
//AS_InGameMenu(); // ?
//if (global_GameStage == GS_CREDITS)
//AS_Credits(); // Give credit where credit is due ;)
//if (global_GameStage == GS_SHUTDOWN)
//AS_ShutDown(); // delete memory/resources used. then exit game...
dbsync(); // Refresh screen.
}
}
Check out my dev forums at:
http://z15.invisionfree.com/ProjectRWP