Page 1 of 1

Coding problems.

Posted: Sun Oct 19, 2003 7:12 pm
by Mattizme
Mit,

Please explain to me what's going wrong in here.

I've just include the Tractor Land game, I have all the functions needed, I think I've done everything correctly here, but if I hit F2 to try and go to the game it just sits on the select screen. If I then hit F1, it will go to the Invaders game and play just fine. What have I forgotten?

Code: Select all

#include <StandardDef.h>
#include <Arcade.h>

#include "Invaders\Invaders.h"
#include "TracLand\TracLand.h"
#include "Arcade Data.h"

#define		NUM_GAMES_AVAILABLE		2

char*	mszArcadeGameNames[NUM_GAMES_AVAILABLE] = 
{
	"Invaders",
	"Tractor Land",

//    "Your new game name"
};

ARCADE_GAME_FUNCTION_TABLE	maxArcadeFunctionTable[NUM_GAMES_AVAILABLE] = 
{
	//	Update Function,	Free function,		Init function,		Keypress functions
	{	InvadersUpdate, InvadersFreeGraphics, InvadersInitGraphics, InvadersKeyDown, InvadersKeyUp	},
	{	LandUpdate, LandFreeGraphics, LandInitGraphics, LandKeyDown, LandKeyUp						},

//	{	YourNewUpdateFunction, YourNewFreeGraphics, YourNewInitGraphics, YourNewKeyDown, YourNewKeyUp },
};

Posted: Sun Oct 19, 2003 9:22 pm
by Mit
Most likely jus a wee bug in the arcade sys.. never tried it with more than 1 game that i remember so prolly jus forgot to connect the other keys. Will post a full update of the interface and arcade libs with the fix in in the next couple of days.

Posted: Mon Oct 20, 2003 5:28 pm
by Mattizme
Cheers mate, sounds spiffy..

Just a question though, what happens when we get above 12 games? :)

yey

Posted: Mon Oct 20, 2003 8:41 pm
by Knoxjoey
thnx mit ! i'd like too get some of this updated code ;p

Posted: Wed Oct 29, 2003 12:55 pm
by Mattizme
Please Note that until Mit fixes this, you can just as easily comment out the 'Tractor Invaders' game and swap in your new own one :)

*pokes Mit to get him to make the fix*

Posted: Thu Nov 20, 2003 9:02 am
by DeVice
If Mit tell me what he usually sends you, i would be happy to code the changes needed, as i'm also planning to add an arcade game myself.

Posted: Sun Jul 04, 2004 3:26 pm
by darealnash
I`ve got a problem too. I have a source code:
//This is my first program with if statements
#include <iostream.h>
int main()
{
int age,goodbye;
cout<<"Please enter your age";
cin>>age;
if (age==12)
{
cout<<"You are the same age as me!";
}
else if (age<12)
{
cout<<"You are younger than i am";
}
else if (age>12)
{
cout<<"You are older than i am";
}
cin>>goodbye;
return 0
}
I use Borland C++BuilderX and when I try to run the program it says Error: Unresolved external 'WinMain' referenced from C:\CBUILDERX\LIB\C0W32.OBJ
Am I doing something wrong here?