OpenGTA/main.cpp

41 lines
707 B
C++
Raw Normal View History

2015-12-03 00:37:02 +00:00
#include <iostream>
#include <SDL.h>
void on_exit();
void run_main();
void initGL();
void initVideo(int w, int h, int bpp);
int global_EC = 0;
int global_Done = 0;
2018-09-14 15:42:44 +00:00
SDL_Window* screen = NULL;
2015-12-03 00:37:02 +00:00
SDL_Surface* surface = NULL;
int city_num = 0;
int main(int argc, char* argv[]) {
2018-09-14 15:42:44 +00:00
2015-12-03 00:37:02 +00:00
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
std::cerr << "Fatal error initialising SDL!" << std::endl;
global_EC = 1;
exit(1);
}
atexit(on_exit);
if (argc == 2) {
city_num = atoi(argv[1]);
}
2018-09-14 15:42:44 +00:00
//Xperimental -- Vladislav Khorev vladislav.khorev@fishrungames.com
//SDL_EnableKeyRepeat( 100, SDL_DEFAULT_REPEAT_INTERVAL );
. initVideo(1024, 768, 32);
2015-12-03 00:37:02 +00:00
initGL();
run_main();
exit(0);
2018-09-14 15:42:44 +00:00
return 0;
2015-12-03 00:37:02 +00:00
}