Browse Source

Add AVI configuration GUI & Optimize logging level strings & Add more OPL sample rates for Android

Lou Yihua 7 years ago
parent
commit
ff00f425eb

+ 6 - 3
android/app/src/main/java/io/github/sdlpal/SettingsActivity.java

@@ -36,6 +36,7 @@ public class SettingsActivity extends AppCompatActivity {
     private static final String Stereo = "Stereo";
     private static final String UseSurroundOPL = "UseSurroundOPL";
     private static final String UseTouchOverlay = "UseTouchOverlay";
+    private static final String EnableAviPlay = "EnableAviPlay";
     private static final String AudioBufferSize = "AudioBufferSize";
     private static final String LogLevel = "LogLevel";
     private static final String OPLSampleRate = "OPLSampleRate";
@@ -54,7 +55,7 @@ public class SettingsActivity extends AppCompatActivity {
 
     private static final int AudioSampleRates[] = { 11025, 22050, 44100 };
     private static final int AudioBufferSizes[] = { 512, 1024, 2048, 4096, 8192 };
-    private static final int OPLSampleRates[] = { 12429, 24858, 49716 };
+    private static final int OPLSampleRates[] = { 11025, 12429, 22050, 24858, 44100, 49716 };
     private static final String CDFormats[] = { "MP3", "OGG" };
     private static final String MusicFormats[] = { "MIDI", "RIX", "MP3", "OGG" };
     private static final String OPLFormats[] = { "DOSBOX", "MAME", "DOSBOXNEW" };
@@ -196,6 +197,7 @@ public class SettingsActivity extends AppCompatActivity {
         ((SwitchCompat)findViewById(R.id.swMsgFile)).setChecked(false);
         ((SwitchCompat)findViewById(R.id.swFontFile)).setChecked(false);
         ((SwitchCompat)findViewById(R.id.swLogFile)).setChecked(false);
+        ((SwitchCompat)findViewById(R.id.swAVI)).setChecked(getConfigBoolean(EnableAviPlay, true));
         ((SwitchCompat)findViewById(R.id.swTouch)).setChecked(getConfigBoolean(UseTouchOverlay, true));
         ((SwitchCompat)findViewById(R.id.swAspect)).setChecked(getConfigBoolean(KeepAspectRatio, true));
         ((SwitchCompat)findViewById(R.id.swSurround)).setChecked(getConfigBoolean(UseSurroundOPL, true));
@@ -207,7 +209,7 @@ public class SettingsActivity extends AppCompatActivity {
         ((AppCompatSpinner)findViewById(R.id.spCDFmt)).setSelection(findMatchedStringIndex(getConfigString(CDFormat, true), CDFormats, 1));     // OGG
         ((AppCompatSpinner)findViewById(R.id.spMusFmt)).setSelection(findMatchedStringIndex(getConfigString(MusicFormat, true), MusicFormats, 1));    // RIX
         ((AppCompatSpinner)findViewById(R.id.spOPL)).setSelection(findMatchedStringIndex(getConfigString(OPLFormat, true), OPLFormats, 1));       // MAME
-        ((AppCompatSpinner)findViewById(R.id.spOPLRate)).setSelection(findMatchedIntIndex(getConfigInt(OPLSampleRate, true), OPLSampleRates, 2));  // 49716Hz
+        ((AppCompatSpinner)findViewById(R.id.spOPLRate)).setSelection(findMatchedIntIndex(getConfigInt(OPLSampleRate, true), OPLSampleRates, 5));  // 49716Hz
     }
 
 
@@ -230,6 +232,7 @@ public class SettingsActivity extends AppCompatActivity {
         ((SwitchCompat)findViewById(R.id.swMsgFile)).setChecked(msgFile != null && !msgFile.isEmpty());
         ((SwitchCompat)findViewById(R.id.swFontFile)).setChecked(fontFile != null && !fontFile.isEmpty());
         ((SwitchCompat)findViewById(R.id.swLogFile)).setChecked(logFile != null && !logFile.isEmpty());
+        ((SwitchCompat)findViewById(R.id.swAVI)).setChecked(getConfigBoolean(EnableAviPlay, false));
         ((SwitchCompat)findViewById(R.id.swTouch)).setChecked(getConfigBoolean(UseTouchOverlay, false));
         ((SwitchCompat)findViewById(R.id.swAspect)).setChecked(getConfigBoolean(KeepAspectRatio, false));
         ((SwitchCompat)findViewById(R.id.swSurround)).setChecked(getConfigBoolean(UseSurroundOPL, false));
@@ -241,7 +244,7 @@ public class SettingsActivity extends AppCompatActivity {
         ((AppCompatSpinner)findViewById(R.id.spCDFmt)).setSelection(findMatchedStringIndex(getConfigString(CDFormat, false), CDFormats, 1));     // OGG
         ((AppCompatSpinner)findViewById(R.id.spMusFmt)).setSelection(findMatchedStringIndex(getConfigString(MusicFormat, false), MusicFormats, 1));    // RIX
         ((AppCompatSpinner)findViewById(R.id.spOPL)).setSelection(findMatchedStringIndex(getConfigString(OPLFormat, false), OPLFormats, 1));       // MAME
-        ((AppCompatSpinner)findViewById(R.id.spOPLRate)).setSelection(findMatchedIntIndex(getConfigInt(OPLSampleRate, false), OPLSampleRates, 2));  // 49716Hz
+        ((AppCompatSpinner)findViewById(R.id.spOPLRate)).setSelection(findMatchedIntIndex(getConfigInt(OPLSampleRate, false), OPLSampleRates, 5));  // 49716Hz
     }
 
     protected boolean setConfigs() {

+ 8 - 0
android/app/src/main/res/layout/content_settings.xml

@@ -97,6 +97,14 @@
                 tools:layout_editor_absoluteX="8dp"
                 tools:layout_editor_absoluteY="228dp" />
 
+            <android.support.v7.widget.SwitchCompat
+                android:id="@+id/swAVI"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="@string/action_avi"
+                tools:layout_editor_absoluteX="8dp"
+                tools:layout_editor_absoluteY="228dp" />
+
             <android.support.v7.widget.SwitchCompat
                 android:id="@+id/swAspect"
                 android:layout_width="match_parent"

+ 6 - 6
android/app/src/main/res/values-zh-rTW/arrays.xml

@@ -1,10 +1,10 @@
 <resources>
     <string-array name="log_level">
-        <item>詳細</item>
-        <item>調試</item>
-        <item>信息</item>
-        <item>警告</item>
-        <item>錯誤</item>
-        <item>致命</item>
+        <item>詳細信息</item>
+        <item>調試信息</item>
+        <item>運行信息</item>
+        <item>普通警告</item>
+        <item>嚴重錯誤</item>
+        <item>致命錯誤</item>
     </string-array>
 </resources>

+ 1 - 0
android/app/src/main/res/values-zh-rTW/strings.xml

@@ -13,6 +13,7 @@
     <string name="action_stereo">立體聲</string>
     <string name="action_suropl">環繞聲 OPL</string>
     <string name="action_touch">啟用觸屏輔助</string>
+    <string name="action_avi">啟用 AVI 過場動畫</string>
     <string name="title_settings">設定模式</string>
     <string name="label_sfxvol">音效音量</string>
     <string name="label_musvol">音樂音量</string>

+ 6 - 6
android/app/src/main/res/values-zh/arrays.xml

@@ -1,10 +1,10 @@
 <resources>
     <string-array name="log_level">
-        <item>详细</item>
-        <item>调试</item>
-        <item>信息</item>
-        <item>警告</item>
-        <item>错误</item>
-        <item>致命</item>
+        <item>详细信息</item>
+        <item>调试信息</item>
+        <item>运行信息</item>
+        <item>普通警告</item>
+        <item>严重错误</item>
+        <item>致命错误</item>
     </string-array>
 </resources>

+ 1 - 0
android/app/src/main/res/values-zh/strings.xml

@@ -5,6 +5,7 @@
     <string name="title_settings">设置模式</string>
     <string name="action_touch">启用触屏辅助</string>
     <string name="action_aspect">保持纵横比</string>
+    <string name="action_avi">启用 AVI 过场动画</string>
     <string name="action_default">默认设置</string>
     <string name="action_finish">完成设置</string>
     <string name="action_suropl">环绕声 OPL</string>

+ 3 - 0
android/app/src/main/res/values/arrays.xml

@@ -27,8 +27,11 @@
         <item>DOSBOXNEW</item>
     </string-array>
     <string-array name="opl_rate" translatable="false">
+        <item>11025</item>
         <item>12429</item>
+        <item>22050</item>
         <item>24858</item>
+        <item>44100</item>
         <item>49716</item>
     </string-array>
     <string-array name="log_level">

+ 1 - 0
android/app/src/main/res/values/strings.xml

@@ -6,6 +6,7 @@
     <string name="action_touch">Enable touch overlay</string>
     <string name="action_aspect">Keep aspect ratio</string>
     <string name="action_stereo">Stereo</string>
+    <string name="action_avi">Enable AVI animation</string>
     <string name="label_musvol">Music volume</string>
     <string name="label_sfxvol">SFX volume</string>
     <string name="label_quality">Audio quality</string>

+ 22 - 17
unix/unix.cpp

@@ -29,6 +29,7 @@ struct {
    Fl_Check_Button* touch;
    Fl_Check_Button* aspect;
    Fl_Check_Button* fullscreen;
+   Fl_Check_Button* avi;
    Fl_Choice* loglevel;
    Fl_Choice* cd;
    Fl_Choice* bgm;
@@ -57,6 +58,7 @@ struct {
    const char* touch;
    const char* aspect;
    const char* fullscreen;
+   const char* avi;
    const char* cd;
    const char* bgm;
    const char* opl;
@@ -75,22 +77,22 @@ struct {
 } gLabels[3] = {
    { "SDLPAL Launcher",     "Language & Font",    "Display",      "Audio",      "Logging",
      "Game resource path:", "Message file:",      "Font file:",   "Log file:",  "Log level:",
-     "Use touc&h overlay",  "&Keep aspect ratio", "&Full screen", "&CD type:",  "&BGM type:",
-     "&OPL type:",          "Sample rate:",       "Ste&reo",      "OPL rate:",  "Surround O&PL",
-     "Music volume:",       "Sound volume:",      "Buffer:",      "Quality:",   "E&xit",
-     "&Launch game",        "&Default",           "Verbose|Debug|Informational|Warning|Error|Fatal" },
+     "Use touc&h overlay",  "&Keep aspect ratio", "&Full screen", "Enable A&VI","&CD type:",
+     "&BGM type:",          "&OPL type:",         "Sample rate:", "Ste&reo",    "OPL rate:",
+     "Surround O&PL",       "Music volume:",      "Sound volume:","Buffer:",    "Quality:",
+     "E&xit",               "&Launch game",       "&Default",     "Verbose|Debug|Informational|Warning|Error|Fatal" },
    { "SDLPAL 启动器",        "字体及语言设置",      "显示设置",      "音频设置",     "日志记录设置",
      "游戏资源目录:",        "语言文件:",         "字体文件",      "日志文件",     "日志记录级别:",
-     "启用触屏辅助(&H)",      "保持纵横比(&K)",     "全屏模式(&F)",  "&CD 音源:",   "&BGM 音源:",
-     "&OPL 类型:",          "采样率:",           "立体声(&R)",    "OPL 采样率:", "环绕声 O&PL",
-     "音乐音量:",            "音效音量:",         "缓冲区:",      "质量:",       "退出(&X)",
-     "启动游戏(&L)",          "默认设置(&D)",       "详细|调试|信息|警告|错误|致命" },
+     "启用触屏辅助(&H)",      "保持纵横比(&K)",     "全屏模式(&F)",  "AVI 动画(&V)", "&CD 音源:",
+     "&BGM 音源:",          "&OPL 类型:",        "采样率:",      "立体声(&R)",   "OPL 采样率:",
+     "环绕声 O&PL",          "音乐音量:",         "音效音量:",     "缓冲区:",     "质量:",
+     "退出(&X)",             "启动游戏(&L)",       "默认设置(&D)",  "详细信息|调试信息|运行信息|普通警告|严重错误|致命错误" },
    { "SDLPAL 啟動器",        "字體及語言設定",      "顯示設定",      "音訊設定",      "日誌記錄設定",
      "遊戲資源檔夾:",        "語言檔:",           "字體檔:",      "日誌檔:",      "日誌記錄級別:",
-     "啟用觸屏輔助(&H)",      "保持縱橫比(&K)",     "全屏模式(&F)",  "&CD 音源:",    "&BGM 音源:",
-     "&OPL 類型:",          "取樣速率:",          "立體聲(&R)",   "OPL 取樣速率:", "環繞聲 O&PL",
-     "音樂音量:",            "音效音量:",         "緩衝區:",      "品質:",        "退出(&X)",
-     "啟動遊戲(&L)",          "默認設定(&D)",       "詳細|調試|信息|警告|錯誤|致命" },
+     "啟用觸屏輔助(&H)",      "保持縱橫比(&K)",     "全屏模式(&F)",  "AVI 動畫(&V)",  "&CD 音源:",
+     "&BGM 音源:",          "&OPL 類型:",        "取樣速率:",    "立體聲(&R)",    "OPL 取樣速率:",
+     "環繞聲 O&PL",          "音樂音量:",          "音效音量:",    "緩衝區:",      "品質:",
+     "退出(&X)",             "啟動遊戲(&L)",       "默認設定(&D)",  "詳細信息|調試信息|運行信息|普通警告|嚴重錯誤|致命錯誤" },
 };
 
 void InitControls()
@@ -104,6 +106,7 @@ void InitControls()
    gWidgets.touch->value(gConfig.fUseTouchOverlay ? 1 : 0);
    gWidgets.aspect->value(gConfig.fKeepAspectRatio ? 1 : 0);
    gWidgets.fullscreen->value(gConfig.fFullScreen ? 1 : 0);
+   gWidgets.avi->value(gConfig.fEnableAviPlay ? 1 : 0);
    gWidgets.cd->value(gConfig.eCDType - MUSIC_MP3);
    gWidgets.bgm->value(gConfig.eMusicType);
    gWidgets.stereo->value(gConfig.iAudioChannels == 2 ? 1 : 0);
@@ -133,6 +136,7 @@ void SaveControls()
    gConfig.fUseTouchOverlay = gWidgets.touch->value();
    gConfig.fKeepAspectRatio = gWidgets.aspect->value();
    gConfig.fFullScreen = gWidgets.fullscreen->value();
+   gConfig.fEnableAviPlay = gWidgets.avi->value();
    gConfig.eCDType = (MUSICTYPE)(gWidgets.cd->value() + MUSIC_MP3);
    gConfig.eMusicType = (MUSICTYPE)(gWidgets.bgm->value());
    gConfig.iAudioChannels = gWidgets.stereo->value() ? 2 : 1;
@@ -178,18 +182,19 @@ Fl_Window* InitWindow()
    gWidgets.logfile = new Fl_Input(284, 131, 341, 22, gLabels[lang].logfile);
 
    (new Fl_Box(FL_BORDER_BOX, 5, 180, 630, 30, gLabels[lang].display))->align(FL_ALIGN_TOP);
-   gWidgets.touch = new Fl_Check_Button(30, 185, 160, 20, gLabels[lang].touch);
-   gWidgets.aspect = new Fl_Check_Button(260, 185, 160, 20, gLabels[lang].aspect);
-   gWidgets.fullscreen = new Fl_Check_Button(510, 185, 120, 20, gLabels[lang].fullscreen);
+   gWidgets.touch = new Fl_Check_Button(10, 185, 150, 20, gLabels[lang].touch);
+   gWidgets.aspect = new Fl_Check_Button(200, 185, 150, 20, gLabels[lang].aspect);
+   gWidgets.avi = new Fl_Check_Button(390, 185, 100, 20, gLabels[lang].avi);
+   gWidgets.fullscreen = new Fl_Check_Button(530, 185, 100, 20, gLabels[lang].fullscreen);
 
    (new Fl_Box(FL_BORDER_BOX, 5, 230, 630, 130, gLabels[lang].audio))->align(FL_ALIGN_TOP);
    (gWidgets.cd = new Fl_Choice(84, 239, lang ? 100 : 120, 22, gLabels[lang].cd))->add("MP3|OGG");
    (gWidgets.bgm = new Fl_Choice(285, 239, 60, 22, gLabels[lang].bgm))->add("MIDI|RIX|MP3|OGG");
-   gWidgets.stereo = new Fl_Check_Button(365, 240, 60, 20, gLabels[lang].stereo);
+   gWidgets.stereo = new Fl_Check_Button(365, 240, 70, 20, gLabels[lang].stereo);
    gWidgets.samplerate = new Fl_Int_Input(570, 239, 60, 22, gLabels[lang].samplerate);
    (gWidgets.opl = new Fl_Choice(84, 269, lang ? 100 : 120, 22, gLabels[lang].opl))->add("DOSBOX|MAME|DOSBOXNEW");
    gWidgets.oplrate = new Fl_Int_Input(285, 269, 60, 22, gLabels[lang].oplrate);
-   gWidgets.surround = new Fl_Check_Button(365, 270, 60, 20, gLabels[lang].surround);
+   gWidgets.surround = new Fl_Check_Button(365, 270, 120, 20, gLabels[lang].surround);
    gWidgets.buffer = new Fl_Int_Input(570, 269, 60, 22, gLabels[lang].buffer);
 
    gWidgets.quality = new Fl_Hor_Value_Slider(72, 299, 180, 22, gLabels[lang].quality);

+ 3 - 1
win32/resource.h

@@ -33,6 +33,8 @@
 #define IDC_USELOGFILE                  1024
 #define IDC_BRLOG                       1025
 #define IDC_LOGFILE                     1026
+#define IDC_CHECK1                      1027
+#define IDC_ENABLEAVI                   1027
 #define IDC_STATIC                      -1
 
 // Next default values for new objects
@@ -41,7 +43,7 @@
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        104
 #define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1024
+#define _APS_NEXT_CONTROL_VALUE         1028
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

+ 12 - 9
win32/sdlpal.rc

@@ -37,9 +37,9 @@ BEGIN
     LTEXT           "CD source:",IDC_STATIC,14,160,36,8
     GROUPBOX        "Font && Language",IDC_STATIC,7,30,391,50
     GROUPBOX        "Display",IDC_STATIC,7,110,391,30
-    CONTROL         "&Keep aspect ratio",IDC_ASPECTRATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,124,72,10
+    CONTROL         "&Keep aspect ratio",IDC_ASPECTRATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,124,72,10
     LTEXT           "BGM source:",IDC_STATIC,115,160,41,8
-    CONTROL         "&Full screen",IDC_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,124,50,10
+    CONTROL         "Start game in &full screen",IDC_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,124,93,10
     EDITTEXT        IDC_MSGFILE,70,61,270,14,ES_AUTOHSCROLL | ES_READONLY
     GROUPBOX        "Audio",IDC_STATIC,7,140,391,85
     COMBOBOX        IDC_CD,54,157,48,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@@ -57,7 +57,7 @@ BEGIN
     EDITTEXT        IDC_AUDIOBUFFER,342,176,40,14,ES_AUTOHSCROLL | ES_NUMBER
     PUSHBUTTON      "&Browse",IDC_BRGAME,348,7,50,14
     CONTROL         "Message file:",IDC_USEMSGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,64,56,8
-    CONTROL         "Enable &touch overlay",IDC_TOUCHOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,124,83,10
+    CONTROL         "Enable &touch overlay",IDC_TOUCHOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,314,124,80,10
     LTEXT           "Quality:",IDC_STATIC,14,198,26,8
     LTEXT           "Low                              High",IDC_STATIC,31,212,88,8
     CONTROL         "",IDC_QUALITY,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,43,197,60,15
@@ -77,6 +77,7 @@ BEGIN
     PUSHBUTTON      "&Browse",IDC_BRFONT,348,43,50,14,WS_DISABLED
     PUSHBUTTON      "&Browse",IDC_BRMSG,348,61,50,14,WS_DISABLED
     PUSHBUTTON      "&Browse",IDC_BRLOG,348,92,50,14,WS_DISABLED
+    CONTROL         "Enable A&VI animation",IDC_ENABLEAVI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,214,124,77,10
 END
 
 
@@ -226,7 +227,7 @@ BEGIN
     LTEXT           "CD 音源:",IDC_STATIC,14,160,36,8
     GROUPBOX        "字体及语言设置",IDC_STATIC,7,30,391,50
     GROUPBOX        "显示设置",IDC_STATIC,7,110,391,30
-    CONTROL         "保持纵横比(&K)",IDC_ASPECTRATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,124,65,10
+    CONTROL         "保持纵横比(&K)",IDC_ASPECTRATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,124,65,10
     LTEXT           "BGM 音源:",IDC_STATIC,115,160,41,8
     CONTROL         "全屏启动游戏(&F)",IDC_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,124,73,10
     EDITTEXT        IDC_MSGFILE,70,61,270,14,ES_AUTOHSCROLL | ES_READONLY
@@ -246,7 +247,7 @@ BEGIN
     EDITTEXT        IDC_AUDIOBUFFER,335,176,40,14,ES_AUTOHSCROLL | ES_NUMBER
     PUSHBUTTON      "浏览(&B)",IDC_BRGAME,348,7,50,14
     CONTROL         "语言文件:",IDC_USEMSGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,64,56,8
-    CONTROL         "启用触屏辅助(&T)",IDC_TOUCHOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,309,124,73,10
+    CONTROL         "启用触屏辅助(&T)",IDC_TOUCHOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,314,124,73,10
     LTEXT           "音频质量:",IDC_STATIC,14,198,41,8
     LTEXT           "低                              高",IDC_STATIC,47,212,77,8
     CONTROL         "",IDC_QUALITY,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,55,197,60,15
@@ -266,6 +267,7 @@ BEGIN
     PUSHBUTTON      "浏览(&B)",IDC_BRFONT,348,43,50,14,WS_DISABLED
     PUSHBUTTON      "浏览(&B)",IDC_BRMSG,348,61,50,14,WS_DISABLED
     PUSHBUTTON      "浏览(&B)",IDC_BRLOG,348,92,50,14,WS_DISABLED
+    CONTROL         "启用 AVI 过场动画(&V)",IDC_ENABLEAVI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,214,124,86,10
 END
 
 
@@ -344,7 +346,7 @@ END
 STRINGTABLE
 BEGIN
     IDC_MSGFILE             "语言文件(*.msg)|*.msg|所有文件 (*.*)|*.*||"
-    IDC_LOGLEVEL            "详细;调试;信息;警告;错误;致命"
+    IDC_LOGLEVEL            "详细信息;调试信息;运行信息;普通警告;严重错误;致命错误"
     IDC_BRFONT              "选择自定义字体文件"
     IDC_FONTFILE            "字体文件(*.bdf)|*.bdf|所有文件 (*.*)|*.*||"
 END
@@ -384,7 +386,7 @@ BEGIN
     LTEXT           "CD �方�",IDC_STATIC,14,160,36,8
     GROUPBOX        "�砰の粂ē砞﹚",IDC_STATIC,7,30,391,50
     GROUPBOX        "陪ボ砞﹚",IDC_STATIC,7,110,391,30
-    CONTROL         "玂�羇绢ゑ(&K)",IDC_ASPECTRATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,124,65,10
+    CONTROL         "玂�羇绢ゑ(&K)",IDC_ASPECTRATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,124,65,10
     LTEXT           "BGM �方�",IDC_STATIC,115,160,41,8
     CONTROL         "��币笆笴栏(&F)",IDC_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,124,73,10
     EDITTEXT        IDC_MSGFILE,70,61,270,14,ES_AUTOHSCROLL | ES_READONLY
@@ -406,7 +408,7 @@ BEGIN
     EDITTEXT        IDC_AUDIOBUFFER,342,175,40,14,ES_AUTOHSCROLL | ES_NUMBER
     PUSHBUTTON      "聅凝(&B)",IDC_BRGAME,348,7,50,14
     CONTROL         "�璹粂ē郎�",IDC_USEMSGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,64,56,8
-    CONTROL         "币ノ牟�徊�(&T)",IDC_TOUCHOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,309,124,73,10
+    CONTROL         "币ノ牟�徊�(&T)",IDC_TOUCHOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,314,124,73,10
     LTEXT           "�                              蔼",IDC_STATIC,47,212,77,8
     LTEXT           "�贾�秖�",IDC_STATIC,131,198,41,8
     CONTROL         "",IDC_MUSICVOLUME,"msctls_trackbar32",WS_TABSTOP,172,197,80,15
@@ -424,6 +426,7 @@ BEGIN
     PUSHBUTTON      "聅凝(&B)",IDC_BRFONT,348,43,50,14,WS_DISABLED
     PUSHBUTTON      "聅凝(&B)",IDC_BRMSG,348,61,50,14,WS_DISABLED
     PUSHBUTTON      "聅凝(&B)",IDC_BRLOG,348,92,50,14,WS_DISABLED
+    CONTROL         "币ノ AVI 筁初笆礶(&V)",IDC_ENABLEAVI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,214,124,85,10
 END
 
 
@@ -476,7 +479,7 @@ END
 STRINGTABLE
 BEGIN
     IDC_MSGFILE             "粂ē郎(*.msg)|*.msg|┮Τ郎� (*.*)|*.*||"
-    IDC_LOGLEVEL            "冈灿;秸刚;獺�;牡�;岿粇;璓㏑"
+    IDC_LOGLEVEL            "冈灿獺�;秸刚獺�;笲︽獺�;炊硄牡�;腨�岿粇;璓㏑岿粇"
     IDC_BRFONT              "匡拒�璹�砰郎"
     IDC_FONTFILE            "�砰郎(*.bdf)|*.bdf|┮Τ郎� (*.*)|*.*||"
 END

+ 2 - 0
win32/win32.cpp

@@ -150,6 +150,7 @@ void SaveSettings(HWND hwndDlg, BOOL fWriteFile)
 
 	gConfig.fFullScreen = IsDlgButtonChecked(hwndDlg, IDC_FULLSCREEN);
 	gConfig.fUseTouchOverlay = IsDlgButtonChecked(hwndDlg, IDC_TOUCHOVERLAY);
+	gConfig.fEnableAviPlay = IsDlgButtonChecked(hwndDlg, IDC_ENABLEAVI);
 	gConfig.fKeepAspectRatio = IsDlgButtonChecked(hwndDlg, IDC_ASPECTRATIO);
 	gConfig.eCDType = (MUSICTYPE)(ComboBox_GetCurSel(hwndDlg, IDC_CD) + MUSIC_MP3);
 	gConfig.eMusicType = (MUSICTYPE)ComboBox_GetCurSel(hwndDlg, IDC_BGM);
@@ -181,6 +182,7 @@ void ResetControls(HWND hwndDlg)
 
 	CheckDlgButton(hwndDlg, IDC_FULLSCREEN, gConfig.fFullScreen);
 	CheckDlgButton(hwndDlg, IDC_TOUCHOVERLAY, gConfig.fUseTouchOverlay);
+	CheckDlgButton(hwndDlg, IDC_ENABLEAVI, gConfig.fEnableAviPlay);
 	CheckDlgButton(hwndDlg, IDC_ASPECTRATIO, gConfig.fKeepAspectRatio);
 	CheckDlgButton(hwndDlg, IDC_SURROUNDOPL, gConfig.fUseSurroundOPL);
 	CheckDlgButton(hwndDlg, IDC_STEREO, gConfig.iAudioChannels == 2);

+ 7 - 6
winrt/SDLPal.Common/MainPage.xaml

@@ -46,12 +46,12 @@
                     <Button x:Name="btnBrowseFontFile" x:Uid="ButtonBrowse" Grid.Column="1" Content="浏览" HorizontalAlignment="Right" Click="btnBrowseFileOpen_Click" />
                 </Grid>
                 <ComboBox x:Name="cbLogLevel" x:Uid="LogLevel" HorizontalAlignment="Stretch" Header="日志记录级别" PlaceholderText="选择日志记录级别">
-                    <ComboBoxItem x:Uid="Verbose" Content="详细"/>
-                    <ComboBoxItem x:Uid="Debug" Content="调试"/>
-                    <ComboBoxItem x:Uid="Information" Content="信息"/>
-                    <ComboBoxItem x:Uid="Warning" Content="警告"/>
-                    <ComboBoxItem x:Uid="Error" Content="错误"/>
-                    <ComboBoxItem x:Uid="Fatal" Content="致命"/>
+                    <ComboBoxItem x:Uid="Verbose" Content="详细信息"/>
+                    <ComboBoxItem x:Uid="Debug" Content="调试信息"/>
+                    <ComboBoxItem x:Uid="Information" Content="运行信息"/>
+                    <ComboBoxItem x:Uid="Warning" Content="普通警告"/>
+                    <ComboBoxItem x:Uid="Error" Content="严重错误"/>
+                    <ComboBoxItem x:Uid="Fatal" Content="致命错误"/>
                 </ComboBox>
                 <CheckBox x:Name="cbUseLogFile" x:Uid="UseLogFile" Content="记录日志到文件" Checked="cbUseFile_CheckChanged" Unchecked="cbUseFile_CheckChanged" />
                 <Grid x:Name="gridLogFile">
@@ -64,6 +64,7 @@
                 </Grid>
                 <ToggleSwitch x:Name="tsTouchOverlay" x:Uid="TouchOverlay" Header="启用触屏辅助" OffContent="否" OnContent="是" />
                 <ToggleSwitch x:Name="tsKeepAspect" x:Uid="AspectRatio" Header="保持纵横比" OffContent="否" OnContent="是" />
+                <ToggleSwitch x:Name="tsEnableAVI" x:Uid="EnableAVI" Header="启用 AVI 过场动画" OffContent="否" OnContent="是" />
                 <ToggleSwitch x:Name="tsStereo" x:Uid="Stereo" Header="立体声" OffContent="否" OnContent="是" />
                 <Slider x:Name="slMusicVolume" x:Uid="MusicVolume" Header="音乐音量" TickPlacement="Inline" TickFrequency="10" />
                 <Slider x:Name="slSoundVolume" x:Uid="SoundVolume" Header="音效音量" TickPlacement="Inline" TickFrequency="10" />

+ 2 - 0
winrt/SDLPal.Common/MainPage.xaml.cpp

@@ -98,6 +98,7 @@ void SDLPal::MainPage::LoadControlContents(bool loadDefault)
 	tsStereo->IsOn = (gConfig.iAudioChannels == 2);
 	tsSurroundOPL->IsOn = (gConfig.fUseSurroundOPL == TRUE);
 	tsTouchOverlay->IsOn = (gConfig.fUseTouchOverlay == TRUE);
+	tsEnableAVI->IsOn = (gConfig.fEnableAviPlay == TRUE);
 
 	slMusicVolume->Value = gConfig.iMusicVolume;
 	slSoundVolume->Value = gConfig.iSoundVolume;
@@ -143,6 +144,7 @@ void SDLPal::MainPage::SaveControlContents()
 	gConfig.iAudioChannels = tsStereo->IsOn ? 2 : 1;
 	gConfig.fUseSurroundOPL = tsSurroundOPL->IsOn ? TRUE : FALSE;
 	gConfig.fUseTouchOverlay = tsTouchOverlay->IsOn ? TRUE : FALSE;
+	gConfig.fEnableAviPlay = tsEnableAVI->IsOn ? TRUE : FALSE;
 
 	gConfig.iMusicVolume = (int)slMusicVolume->Value;
 	gConfig.iSoundVolume = (int)slSoundVolume->Value;

+ 9 - 0
winrt/SDLPal.Common/Strings/en/Resources.resw

@@ -162,6 +162,15 @@
   <data name="Debug.Content" xml:space="preserve">
     <value>Debug</value>
   </data>
+  <data name="EnableAVI.Header" xml:space="preserve">
+    <value>Enable AVI animation</value>
+  </data>
+  <data name="EnableAVI.OffContent" xml:space="preserve">
+    <value>No</value>
+  </data>
+  <data name="EnableAVI.OnContent" xml:space="preserve">
+    <value>Yes</value>
+  </data>
   <data name="Error.Content" xml:space="preserve">
     <value>Error</value>
   </data>

+ 15 - 6
winrt/SDLPal.Common/Strings/zh-hans/Resources.resw

@@ -160,13 +160,22 @@
     <value>选择 CD 音轨格式</value>
   </data>
   <data name="Debug.Content" xml:space="preserve">
-    <value>调试</value>
+    <value>调试信息</value>
+  </data>
+  <data name="EnableAVI.Header" xml:space="preserve">
+    <value>启用 AVI 过场动画</value>
+  </data>
+  <data name="EnableAVI.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="EnableAVI.OnContent" xml:space="preserve">
+    <value>是</value>
   </data>
   <data name="Error.Content" xml:space="preserve">
-    <value>错误</value>
+    <value>严重错误</value>
   </data>
   <data name="Fatal.Content" xml:space="preserve">
-    <value>致命</value>
+    <value>致命错误</value>
   </data>
   <data name="FontFile.PlaceholderText" xml:space="preserve">
     <value>无自定义字体文件</value>
@@ -178,7 +187,7 @@
     <value>未选择文件夹</value>
   </data>
   <data name="Information.Content" xml:space="preserve">
-    <value>信息</value>
+    <value>运行信息</value>
   </data>
   <data name="LogFile.PlaceholderText" xml:space="preserve">
     <value>无日志文件</value>
@@ -278,9 +287,9 @@
     <value>自定义语言文件</value>
   </data>
   <data name="Verbose.Content" xml:space="preserve">
-    <value>详细</value>
+    <value>详细信息</value>
   </data>
   <data name="Warning.Content" xml:space="preserve">
-    <value>警告</value>
+    <value>普通警告</value>
   </data>
 </root>

+ 15 - 6
winrt/SDLPal.Common/Strings/zh-hant/Resources.resw

@@ -160,13 +160,22 @@
     <value>選擇 CD 音軌格式</value>
   </data>
   <data name="Debug.Content" xml:space="preserve">
-    <value>調試</value>
+    <value>調試信息</value>
+  </data>
+  <data name="EnableAVI.Header" xml:space="preserve">
+    <value>啟用 AVI 過場動畫</value>
+  </data>
+  <data name="EnableAVI.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="EnableAVI.OnContent" xml:space="preserve">
+    <value>是</value>
   </data>
   <data name="Error.Content" xml:space="preserve">
-    <value>錯誤</value>
+    <value>嚴重錯誤</value>
   </data>
   <data name="Fatal.Content" xml:space="preserve">
-    <value>致命</value>
+    <value>致命錯誤</value>
   </data>
   <data name="FontFile.PlaceholderText" xml:space="preserve">
     <value>無自訂字體檔案</value>
@@ -178,7 +187,7 @@
     <value>未選擇檔案夾</value>
   </data>
   <data name="Information.Content" xml:space="preserve">
-    <value>信息</value>
+    <value>運行信息</value>
   </data>
   <data name="LogFile.PlaceholderText" xml:space="preserve">
     <value>無日誌檔案</value>
@@ -278,9 +287,9 @@
     <value>自訂語言檔案</value>
   </data>
   <data name="Verbose.Content" xml:space="preserve">
-    <value>詳細</value>
+    <value>詳細信息</value>
   </data>
   <data name="Warning.Content" xml:space="preserve">
-    <value>警告</value>
+    <value>普通警告</value>
   </data>
 </root>

+ 2 - 0
winrt/SDLPal.UWP/SDLPal.Core.vcxproj

@@ -226,6 +226,7 @@
     <ClInclude Include="..\..\adplug\rix.h" />
     <ClInclude Include="..\..\adplug\surroundopl.h" />
     <ClInclude Include="..\..\ascii.h" />
+    <ClInclude Include="..\..\aviplay.h" />
     <ClInclude Include="..\..\battle.h" />
     <ClInclude Include="..\..\codepage.h" />
     <ClInclude Include="..\..\common.h" />
@@ -313,6 +314,7 @@
     <ClInclude Include="..\..\players.h" />
     <ClInclude Include="..\..\res.h" />
     <ClInclude Include="..\..\resampler.h" />
+    <ClInclude Include="..\..\riff.h" />
     <ClInclude Include="..\..\rngplay.h" />
     <ClInclude Include="..\..\scene.h" />
     <ClInclude Include="..\..\script.h" />

+ 9 - 0
winrt/SDLPal.UWP/SDLPal.Core.vcxproj.filters

@@ -393,6 +393,12 @@
     <ClInclude Include="..\..\generated.h">
       <Filter>generated</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\aviplay.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\riff.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\adplug\binfile.cpp">
@@ -644,6 +650,9 @@
     <ClCompile Include="..\..\midi.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\aviplay.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\libmad\D.dat">

+ 3 - 0
winrt/SDLPal.Windows/SDLPal.Core.vcxproj

@@ -224,6 +224,7 @@
     <ClInclude Include="..\..\adplug\rix.h" />
     <ClInclude Include="..\..\adplug\surroundopl.h" />
     <ClInclude Include="..\..\ascii.h" />
+    <ClInclude Include="..\..\aviplay.h" />
     <ClInclude Include="..\..\battle.h" />
     <ClInclude Include="..\..\codepage.h" />
     <ClInclude Include="..\..\common.h" />
@@ -309,6 +310,7 @@
     <ClInclude Include="..\..\players.h" />
     <ClInclude Include="..\..\res.h" />
     <ClInclude Include="..\..\resampler.h" />
+    <ClInclude Include="..\..\riff.h" />
     <ClInclude Include="..\..\rngplay.h" />
     <ClInclude Include="..\..\scene.h" />
     <ClInclude Include="..\..\script.h" />
@@ -336,6 +338,7 @@
     <ClCompile Include="..\..\adplug\rix.cpp" />
     <ClCompile Include="..\..\adplug\surroundopl.cpp" />
     <ClCompile Include="..\..\audio.c" />
+    <ClCompile Include="..\..\aviplay.c" />
     <ClCompile Include="..\..\battle.c" />
     <ClCompile Include="..\..\ending.c" />
     <ClCompile Include="..\..\fight.c" />

+ 9 - 0
winrt/SDLPal.Windows/SDLPal.Core.vcxproj.filters

@@ -384,6 +384,12 @@
     <ClInclude Include="..\pal_config.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\aviplay.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\riff.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\adplug\binfile.cpp">
@@ -428,6 +434,9 @@
     <ClCompile Include="..\..\audio.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\aviplay.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="..\..\liboggvorbis\src\analysis.c">
       <Filter>liboggvorbis\src</Filter>
     </ClCompile>

+ 3 - 0
winrt/SDLPal.WindowsPhone/SDLPal.Core.vcxproj

@@ -145,6 +145,7 @@
     <ClInclude Include="..\..\adplug\rix.h" />
     <ClInclude Include="..\..\adplug\surroundopl.h" />
     <ClInclude Include="..\..\ascii.h" />
+    <ClInclude Include="..\..\aviplay.h" />
     <ClInclude Include="..\..\battle.h" />
     <ClInclude Include="..\..\codepage.h" />
     <ClInclude Include="..\..\common.h" />
@@ -230,6 +231,7 @@
     <ClInclude Include="..\..\players.h" />
     <ClInclude Include="..\..\res.h" />
     <ClInclude Include="..\..\resampler.h" />
+    <ClInclude Include="..\..\riff.h" />
     <ClInclude Include="..\..\rngplay.h" />
     <ClInclude Include="..\..\scene.h" />
     <ClInclude Include="..\..\script.h" />
@@ -257,6 +259,7 @@
     <ClCompile Include="..\..\adplug\rix.cpp" />
     <ClCompile Include="..\..\adplug\surroundopl.cpp" />
     <ClCompile Include="..\..\audio.c" />
+    <ClCompile Include="..\..\aviplay.c" />
     <ClCompile Include="..\..\battle.c" />
     <ClCompile Include="..\..\ending.c" />
     <ClCompile Include="..\..\fight.c" />

+ 9 - 0
winrt/SDLPal.WindowsPhone/SDLPal.Core.vcxproj.filters

@@ -384,6 +384,12 @@
     <ClInclude Include="..\pal_config.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\aviplay.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\riff.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\adplug\binfile.cpp">
@@ -428,6 +434,9 @@
     <ClCompile Include="..\..\audio.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\aviplay.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="..\..\liboggvorbis\src\analysis.c">
       <Filter>liboggvorbis\src</Filter>
     </ClCompile>