|
World of Might and Magic
0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
|
Классы | |
| struct | SDLTest_CommonState |
Функции | |
| SDLTest_CommonState * | SDLTest_CommonCreateState (char **argv, Uint32 flags) |
| Parse command line parameters and create common state. Подробнее... | |
| int | SDLTest_CommonArg (SDLTest_CommonState *state, int index) |
| Process one common argument. Подробнее... | |
| void | SDLTest_CommonLogUsage (SDLTest_CommonState *state, const char *argv0, const char **options) |
| Logs command line usage info. Подробнее... | |
| const char * | SDLTest_CommonUsage (SDLTest_CommonState *state) |
| Returns common usage information. Подробнее... | |
| SDL_bool | SDLTest_CommonInit (SDLTest_CommonState *state) |
| Open test window. Подробнее... | |
| SDL_bool | SDLTest_CommonDefaultArgs (SDLTest_CommonState *state, const int argc, char **argv) |
| Easy argument handling when test app doesn't need any custom args. Подробнее... | |
| void | SDLTest_CommonEvent (SDLTest_CommonState *state, SDL_Event *event, int *done) |
| Common event handler for test windows. Подробнее... | |
| void | SDLTest_CommonQuit (SDLTest_CommonState *state) |
| Close test window. Подробнее... | |
Include file for SDL test framework.
This code is a part of the SDL2_test library, not the main SDL library.
См. определение в файле SDL_test_common.h
| SDLTest_CommonState* SDLTest_CommonCreateState | ( | char ** | argv, |
| Uint32 | flags | ||
| ) |
Parse command line parameters and create common state.
| argv | Array of command line parameters |
| flags | Flags indicating which subsystem to initialize (i.e. SDL_INIT_VIDEO | SDL_INIT_AUDIO) |
| int SDLTest_CommonArg | ( | SDLTest_CommonState * | state, |
| int | index | ||
| ) |
Process one common argument.
| state | The common state describing the test window to create. |
| index | The index of the argument to process in argv[]. |
| void SDLTest_CommonLogUsage | ( | SDLTest_CommonState * | state, |
| const char * | argv0, | ||
| const char ** | options | ||
| ) |
Logs command line usage info.
This logs the appropriate command line options for the subsystems in use plus other common options, and then any application-specific options. This uses the SDL_Log() function and splits up output to be friendly to 80-character-wide terminals.
| state | The common state describing the test window for the app. |
| argv0 | argv[0], as passed to main/SDL_main. |
| options | an array of strings for application specific options. The last element of the array should be NULL. |
| const char* SDLTest_CommonUsage | ( | SDLTest_CommonState * | state | ) |
Returns common usage information.
You should (probably) be using SDLTest_CommonLogUsage() instead, but this function remains for binary compatibility. Strings returned from this function are valid until SDLTest_CommonQuit() is called, in which case those strings' memory is freed and can no longer be used.
| state | The common state describing the test window to create. |
| SDL_bool SDLTest_CommonInit | ( | SDLTest_CommonState * | state | ) |
Open test window.
| state | The common state describing the test window to create. |
| SDL_bool SDLTest_CommonDefaultArgs | ( | SDLTest_CommonState * | state, |
| const int | argc, | ||
| char ** | argv | ||
| ) |
Easy argument handling when test app doesn't need any custom args.
| state | The common state describing the test window to create. |
| argc | argc, as supplied to SDL_main |
| argv | argv, as supplied to SDL_main |
| void SDLTest_CommonEvent | ( | SDLTest_CommonState * | state, |
| SDL_Event * | event, | ||
| int * | done | ||
| ) |
Common event handler for test windows.
| state | The common state used to create test window. |
| event | The event to handle. |
| done | Flag indicating we are done. |
| void SDLTest_CommonQuit | ( | SDLTest_CommonState * | state | ) |
Close test window.
| state | The common state used to create test window. |