Преглед на файлове

added image to markdown

quantumde1 преди 2 месеца
родител
ревизия
48aead87dd
променени са 8 файла, в които са добавени 24 реда и са изтрити 7 реда
  1. 4 0
      conf/settings.conf
  2. BIN
      image.png
  3. 1 0
      readme.md
  4. 1 1
      source/graphics/engine.d
  5. 3 3
      source/graphics/gamelogic.d
  6. 1 1
      source/graphics/playback.d
  7. 10 2
      source/system/config.d
  8. 4 0
      source/variables.d

+ 4 - 0
conf/settings.conf

@@ -1,3 +1,7 @@
 SCRIPT:scripts/SA00.lua
 TITLE:Remember11 - Self Chapter
+DIALOG_END_INDICATOR:res/misc/circle.png
+DIALOG_BOX:res/misc/TEX#win_01b.PNG
+CHOICE_BOX:res/misc/TEX#win_00b.PNG
+FALLBACK_FONT:res/font_en.png
 ICON:res/icon.png

BIN
image.png


+ 1 - 0
readme.md

@@ -2,6 +2,7 @@
 
 Himmel(equal to Heaven, but in German) is an engine for Visual Novels, written using Dlang and Lua.
 
+![image info](image.png)
 ## Getting Started
 
 ### Getting needed components

+ 1 - 1
source/graphics/engine.d

@@ -50,7 +50,7 @@ void engine_loader()
     //ToggleFullscreen();
     SetTargetFPS(60);
     //fallback font?
-    textFont = LoadFont("res/font_en.png");
+    textFont = LoadFont(systemSettings.fallbackFont.toStringz());
     // Fade In and Out Effects
     InitAudioDevice();
     helloScreen();

+ 3 - 3
source/graphics/gamelogic.d

@@ -23,9 +23,9 @@ import std.file;
  
 void gameInit()
 {
-    circle = LoadTexture("res/misc/circle.png");
-    dialogBackgroundTex = LoadTexture("res/misc/TEX#win_01b.PNG");
-    choiceWindowTex = LoadTexture("res/misc/TEX#win_00b.PNG");
+    circle = LoadTexture(systemSettings.dialogBoxEndIndicator.toStringz());
+    dialogBackgroundTex = LoadTexture(systemSettings.dialogBoxImage.toStringz());
+    choiceWindowTex = LoadTexture(systemSettings.choiceBoxImage.toStringz());
     if (WindowShouldClose()) {
         currentGameState = GameState.Exit;
     } else {

+ 1 - 1
source/graphics/playback.d

@@ -203,7 +203,7 @@ extern (C) void playVideoInternal(char* argv)
     debug
     {
         vlcArgs = [
-            "--verbose=2", "--no-xlib", "--drop-late-frames", "--live-caching=0",
+            "--verbose=1", "--no-xlib", "--drop-late-frames", "--live-caching=0",
             "--no-lua"
         ];
     }

+ 10 - 2
source/system/config.d

@@ -18,7 +18,11 @@ nothrow auto parseConf(string type)(string filename)
         static immutable typeMap = [
             "script": "SCRIPT:",
             "title": "TITLE:",
-            "icon": "ICON:"
+            "icon": "ICON:",
+            "dialog_end_indicator": "DIALOG_END_INDICATOR:",
+            "dialog_box": "DIALOG_BOX:",
+            "choice_box": "CHOICE_BOX:",
+            "fallback_font": "FALLBACK_FONT:"
         ];
 
         if (type in typeMap)
@@ -48,6 +52,10 @@ SystemSettings loadSettingsFromConfigFile()
     return SystemSettings(
         parseConf!"script"("conf/settings.conf"),
         parseConf!"title"("conf/settings.conf"),
-        parseConf!"icon"("conf/settings.conf")
+        parseConf!"icon"("conf/settings.conf"),
+        parseConf!"dialog_end_indicator"("conf/settings.conf"),
+        parseConf!"dialog_box"("conf/settings.conf"),
+        parseConf!"choice_box"("conf/settings.conf"),
+        parseConf!"fallback_font"("conf/settings.conf")
     );
 }

+ 4 - 0
source/variables.d

@@ -29,6 +29,10 @@ struct SystemSettings {
     string scriptPath;
     string windowTitle;
     string iconPath;
+    string dialogBoxEndIndicator;
+    string dialogBoxImage;
+    string choiceBoxImage;
+    string fallbackFont;
 }
 
 struct TextureEngine {