Indexing in resources added after pkg was originally created

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2066 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2005-12-13 18:00:34 +00:00
parent 47afb42e17
commit e0f08a9bc2
6 changed files with 22 additions and 7 deletions
+2
View File
@@ -461,3 +461,5 @@
283 284 2 slides/ending/sis_skel.ani 283 284 2 slides/ending/sis_skel.ani
284 285 2 ipanims/orbenter.ani 284 285 2 ipanims/orbenter.ani
285 286 2 lbm/setupmenu.ani 285 286 2 lbm/setupmenu.ani
286 98 4 slides/intro/intro.txt
287 99 4 slides/ending/ending.txt
+5 -2
View File
@@ -23,6 +23,7 @@
#include "options.h" #include "options.h"
#include "master.h" #include "master.h"
#include "resinst.h" #include "resinst.h"
#include "nameref.h"
#include "settings.h" #include "settings.h"
#include "setup.h" #include "setup.h"
#include "vidlib.h" #include "vidlib.h"
@@ -141,7 +142,8 @@ Introduction (void)
* not present */ * not present */
if (optWhichIntro == OPT_PC || if (optWhichIntro == OPT_PC ||
!DoFMV ("slides/intro/intro.duk", NULL, TRUE)) !DoFMV ("slides/intro/intro.duk", NULL, TRUE))
ShowPresentation ("slides/intro/intro.txt"); ShowPresentation ( CaptureStringTable (
LoadStringTable (INTROPRES_STRTAB)));
} }
} }
@@ -157,7 +159,8 @@ Victory (void)
* not present */ * not present */
if (optWhichIntro == OPT_PC || if (optWhichIntro == OPT_PC ||
!DoFMV ("slides/ending/victory.duk", NULL, TRUE)) !DoFMV ("slides/ending/victory.duk", NULL, TRUE))
ShowPresentation ("slides/ending/ending.txt"); ShowPresentation ( CaptureStringTable (
LoadStringTable (FINALPRES_STRTAB)));
xform_buf[0] = FadeAllToBlack; xform_buf[0] = FadeAllToBlack;
XFormColorMap ((COLORMAPPTR)xform_buf, 0); XFormColorMap ((COLORMAPPTR)xform_buf, 0);
+1 -1
View File
@@ -29,7 +29,7 @@ extern void DoShipSpin (COUNT index, MUSIC_REF hMusic);
extern BOOLEAN DoFMV (const char *name, const char *loopname, extern BOOLEAN DoFMV (const char *name, const char *loopname,
BOOLEAN uninit); BOOLEAN uninit);
extern BOOLEAN ShowPresentation (const char *name); extern BOOLEAN ShowPresentation (STRING PresStr);
#endif /* _FMV_H */ #endif /* _FMV_H */
+10 -4
View File
@@ -271,6 +271,13 @@ Present_GenerateSIS (PRESENTATION_INPUT_STATE* pPIS)
pPIS->SisFrame = SisFrame; pPIS->SisFrame = SisFrame;
} }
BOOLEAN
ShowPresentationFile (const char *name)
{
return ShowPresentation (CaptureStringTable (
LoadStringTableFile (contentDir, name)));
}
static BOOLEAN static BOOLEAN
DoPresentation (PVOID pIS) DoPresentation (PVOID pIS)
{ {
@@ -668,7 +675,7 @@ DoPresentation (PVOID pIS)
Present_UnbatchGraphics (pPIS, TRUE); Present_UnbatchGraphics (pPIS, TRUE);
CopyTextString (pPIS->Buffer, sizeof(pPIS->Buffer), pStr); CopyTextString (pPIS->Buffer, sizeof(pPIS->Buffer), pStr);
ShowPresentation (pPIS->Buffer); ShowPresentationFile (pPIS->Buffer);
} }
else if (strcmp (Opcode, "NOOP") == 0) else if (strcmp (Opcode, "NOOP") == 0)
{ /* no operation - must be a comment in script */ { /* no operation - must be a comment in script */
@@ -680,7 +687,7 @@ DoPresentation (PVOID pIS)
} }
BOOLEAN BOOLEAN
ShowPresentation (const char *name) ShowPresentation (STRING PresStr)
{ {
CONTEXT OldContext; CONTEXT OldContext;
FONT OldFont; FONT OldFont;
@@ -688,8 +695,7 @@ ShowPresentation (const char *name)
PRESENTATION_INPUT_STATE pis; PRESENTATION_INPUT_STATE pis;
RECT r = {{0, 0}, {SCREEN_WIDTH, SCREEN_HEIGHT}}; RECT r = {{0, 0}, {SCREEN_WIDTH, SCREEN_HEIGHT}};
pis.SlideShow = CaptureStringTable ( pis.SlideShow = PresStr;
LoadStringTableFile (contentDir, name));
if (!pis.SlideShow) if (!pis.SlideShow)
return FALSE; return FALSE;
pis.SlideShow = SetAbsStringTableIndex (pis.SlideShow, 0); pis.SlideShow = SetAbsStringTableIndex (pis.SlideShow, 0);
+2
View File
@@ -97,4 +97,6 @@
#define IPSUN_COLOR_MAP 0x05206004L #define IPSUN_COLOR_MAP 0x05206004L
#define HANGAR_COLOR_TAB 0x18a06104L #define HANGAR_COLOR_TAB 0x18a06104L
#define INTROPRES_STRTAB 0x23c06204L
#define FINALPRES_STRTAB 0x23e06304L
+2
View File
@@ -303,5 +303,7 @@ enum
SISSKEL_PACKAGE, SISSKEL_PACKAGE,
ORBENTER_PACKAGE, ORBENTER_PACKAGE,
MENUBKG_PACKAGE, MENUBKG_PACKAGE,
INTRO_PACKAGE,
FINAL_PACKAGE,
}; };