diff --git a/README.md b/README.md index 64371c4..01b6e0e 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,26 @@ Create a file named doomgeneric_yourplatform.c and just implement these function |DG_GetKey |Provide keyboard events. |DG_SetWindowTitle |Not required. This is for setting the window title as Doom sets this from WAD file. +### main loop +At start, call doomgeneric_Create(). + +In a loop, call doomgeneric_Tick(). + +In simplest form: +``` +int main(int argc, char **argv) +{ + doomgeneric_Create(argc, argv); + + while (1) + { + doomgeneric_Tick(); + } + + return 0; +} +``` + # sound Sound is much harder to implement! If you need sound, take a look at SDL port. It fully supports sound and music! Where to start? Define FEATURE_SOUND, assign DG_sound_module and DG_music_module.