Wei Mingzhi 9 years ago
parent
commit
d701e482b5
4 changed files with 49 additions and 5 deletions
  1. 23 0
      fight.c
  2. 1 1
      font.c
  3. 19 3
      midi.c
  4. 6 1
      script.c

+ 23 - 0
fight.c

@@ -2189,11 +2189,19 @@ PAL_BattleShowPlayerUseItemAnim(
    }
 }
 
+#ifdef PAL_WIN95
+VOID
+PAL_BattleShowPlayerPreMagicAnim(
+   WORD         wPlayerIndex,
+   WORD         wObjectID
+)
+#else
 VOID
 PAL_BattleShowPlayerPreMagicAnim(
    WORD         wPlayerIndex,
    BOOL         fSummon
 )
+#endif
 /*++
   Purpose:
 
@@ -2214,6 +2222,13 @@ PAL_BattleShowPlayerPreMagicAnim(
    int   i, j;
    DWORD dwTime = SDL_GetTicks();
    WORD  wPlayerRole = gpGlobals->rgParty[wPlayerIndex].wPlayerRole;
+#ifdef PAL_WIN95
+   BOOL  fSummon = FALSE;
+   int   iMagicNum = gpGlobals->g.rgObject[wObjectID].magic.wMagicNumber;
+
+   if (gpGlobals->g.lprgMagic[iMagicNum].wType == kMagicTypeSummon)
+      fSummon = TRUE;
+#endif
 
    for (i = 0; i < 4; i++)
    {
@@ -3605,7 +3620,11 @@ PAL_BattlePlayerPerformAction(
 
       if (gpGlobals->g.lprgMagic[wMagicNum].wType == kMagicTypeSummon)
       {
+#ifdef PAL_WIN95
+         PAL_BattleShowPlayerPreMagicAnim(wPlayerIndex, wObject);
+#else
          PAL_BattleShowPlayerPreMagicAnim(wPlayerIndex, TRUE);
+#endif
          PAL_BattleShowPlayerSummonMagicAnim((WORD)-1, wObject);
       }
       else
@@ -3884,8 +3903,12 @@ PAL_BattlePlayerPerformAction(
       wObject = g_Battle.rgPlayer[wPlayerIndex].action.wActionID;
       wMagicNum = gpGlobals->g.rgObject[wObject].magic.wMagicNumber;
 
+#ifdef PAL_WIN95
+      PAL_BattleShowPlayerPreMagicAnim(wPlayerIndex, wObject);
+#else
       PAL_BattleShowPlayerPreMagicAnim(wPlayerIndex,
          (gpGlobals->g.lprgMagic[wMagicNum].wType == kMagicTypeSummon));
+#endif
 
       if (!gpGlobals->fAutoBattle)
       {

+ 1 - 1
font.c

@@ -89,7 +89,7 @@
 #include "gbfont.h"
 #include "big5font.h"
 
-static BOOL fIsBig5 = FALSE;
+BOOL fIsBig5 = FALSE;
 
 INT
 PAL_InitFont(

+ 19 - 3
midi.c

@@ -53,7 +53,10 @@ MIDI_Play(
    FILE            *fp;
    unsigned char   *buf;
    int              size;
-   SDL_RWops       *rw;
+   SDL_RWops       *rw;
+#ifdef PAL_WIN95
+   char             filename[1024];
+#endif
 
    if (g_pMid != NULL && iNumRIX == iMidCurrent && native_midi_active())
    {
@@ -69,7 +72,19 @@ MIDI_Play(
    {
       return;
    }
-
+
+#ifdef PAL_WIN95
+   sprintf(filename, "%s/musics/%.3d.mid", PAL_PREFIX, iNumRIX);
+
+   g_pMid = native_midi_loadsong(filename);
+   if (g_pMid != NULL)
+   {
+      native_midi_start(g_pMid);
+
+      iMidCurrent = iNumRIX;
+      fMidLoop = fLoop;
+   }
+#else
    fp = UTIL_OpenFile("midi.mkf");
    if (fp == NULL)
    {
@@ -106,7 +121,8 @@ MIDI_Play(
    }
 
    SDL_RWclose(rw);
-   free(buf);
+   free(buf);
+#endif
 }
 
 VOID

+ 6 - 1
script.c

@@ -549,7 +549,12 @@ PAL_AdditionalCredits(
 
    int        i = 0;
 
-   PAL_DrawOpeningMenuBackground();
+   PAL_DrawOpeningMenuBackground();
+
+#ifdef PAL_WIN95
+   extern BOOL fIsBig5;
+   fIsBig5 = TRUE;
+#endif
 
    while (rgszStrings[i][0] != '\0')
    {