World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
SDLmain.cpp
См. документацию.
1 #include "lib/SDL2/include/SDL.h"
2 
3 #include <string>
4 
5 int SDL_main(int argc, char *argv[]) {
6  std::string cmd;
7  for (int i = 1; i < argc; ++i) {
8  cmd += std::string(argv[i]) + " ";
9  }
10 
11  int res = -1;
12  if (SDL_Init(SDL_INIT_VIDEO) >= 0) {
13  extern int MM_Main(const char *);
14  res = MM_Main(cmd.c_str());
15 
16  SDL_Quit();
17  }
18 
19  return res;
20 }
SDL_Quit
DECLSPEC void SDLCALL SDL_Quit(void)
SDL_main
int SDL_main(int argc, char *argv[])
Definition: SDLmain.cpp:5
MM_Main
int MM_Main(const char *pCmdLine)
Definition: Game.cpp:83
SDL_Init
DECLSPEC int SDLCALL SDL_Init(Uint32 flags)
string
GLsizei const GLchar *const * string
Definition: SDL_opengl_glext.h:691
res
GLuint res
Definition: SDL_opengl_glext.h:7940