]> git.0x19.co - doomgeneric-snom360/commitdiff
Update README.md
authorozkl <ozkl@users.noreply.github.com>
Tue, 14 Mar 2023 20:34:06 +0000 (23:34 +0300)
committerGitHub <noreply@github.com>
Tue, 14 Mar 2023 20:34:06 +0000 (23:34 +0300)
README.md

index 64371c4d56d8520d9d67e7bd5ad05e8935b614e0..01b6e0eb3aa559e7c0412e5b53a9506015099288 100644 (file)
--- 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.