okay i am creating a game of pong and i cant get my menu to load their is no errors in my code that i can see but i am new so here is the codes for my main function and my menu fuction.
main function here:
// SDL_App.cpp : Defines the entry point for our Project
//
//#include "stdafx.h"
#include <Windows.h>
#include "GL_Functions.h"
#include "pctimer.h"
#include <string>
#include <cmath>
#include <stdio.h>
#include <crtdbg.h>
int main(int argc, char* argv[])
{
//Lets open the window and initialise opengl
InitGL(1024,768);
int background = LoadTexture ("./images/background.png");
int mball = LoadTexture ("./images/mball.png");
int leftpaddle_2 = LoadTexture ("./images/paddle_2.png");
int rightpaddle_1 = LoadTexture ("./images/paddle_1.png");
//int menu = LoadTexture ("./images/menu.png");
// SDL_App.cpp : Defines the entry point for our Project
//
//#include "stdafx.h"
#include <Windows.h>
#include "GL_Functions.h"
#include "pctimer.h"
#include <string>
#include <cmath>
#include <stdio.h>
#include <crtdbg.h>
enum STATE
{
MAINMENU, // will take user to main menu at start of game or during
SINGLEPLAYER, // one player mode
MULTIPLAYER, // player vs player mode
HIGHSCORES, //lists high score
INSTRUCTIONS, // opens the options menu
QUIT // when user presses escape key program closes
};
//Moving the selector
if (IsKeyDown(KEY_DOWN))
{
ArrowY = ArrowY + 100;
}
if (ArrowY > 700)
{
ArrowY = 250;
}
if (IsKeyDown(KEY_UP))
{
ArrowY = ArrowY - 100;
}
if (ArrowY < 255)
{
ArrowY = 250;
}
//Slows the game
Sleep(60);
}
//Do some secret stuff
while (FrameworkUpdate());
//Clean up after yourself
FreeTexture(Arrow);
//Close down
CloseDown();
_CrtDumpMemoryLeaks();
}
i not sure if i linked them properly either and on a side note i dont have any collision going cause i cant figure that out but thats for another day, just want to know how to get my menu to work,
also using vs 2010 if that is relivante to anyone.