Shift the PC Ship "spins" to use Presentations.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2849 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
Changes towards version 0.7:
|
Changes towards version 0.7:
|
||||||
|
- Non-3DO Shipspin anims now use Presentations - Michael
|
||||||
- Added presentaion commands TEXT, TE (text effect), MOVIE - Alex
|
- Added presentaion commands TEXT, TE (text effect), MOVIE - Alex
|
||||||
- Increased the size of display queue (elements were sometimes missing
|
- Increased the size of display queue (elements were sometimes missing
|
||||||
in e.g. Nemesis vs. Nemesis battles with many marines out) - Alex
|
in e.g. Nemesis vs. Nemesis battles with many marines out) - Alex
|
||||||
|
|||||||
+13
-27
@@ -45,9 +45,12 @@ DoShipSpin (COUNT index, MUSIC_REF hMusic)
|
|||||||
|
|
||||||
SetGraphicUseOtherExtra (1);
|
SetGraphicUseOtherExtra (1);
|
||||||
LoadIntoExtraScreen (0);
|
LoadIntoExtraScreen (0);
|
||||||
|
#if 0
|
||||||
|
/* This is cut out right now but should be part of the 3DO side */
|
||||||
clut_buf[0] = FadeAllToBlack;
|
clut_buf[0] = FadeAllToBlack;
|
||||||
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 4));
|
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 4));
|
||||||
FlushColorXForms ();
|
FlushColorXForms ();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (hMusic)
|
if (hMusic)
|
||||||
StopMusic ();
|
StopMusic ();
|
||||||
@@ -58,37 +61,20 @@ DoShipSpin (COUNT index, MUSIC_REF hMusic)
|
|||||||
sprintf (snbuf, "slides/spins/ship%02u.aif", (unsigned)index);
|
sprintf (snbuf, "slides/spins/ship%02u.aif", (unsigned)index);
|
||||||
if (optWhichIntro == OPT_PC || !DoFMVEx (vnbuf, "slides/spins/spin.aif", snbuf, SHIP_SPIN_LOOP_FRAME))
|
if (optWhichIntro == OPT_PC || !DoFMVEx (vnbuf, "slides/spins/spin.aif", snbuf, SHIP_SPIN_LOOP_FRAME))
|
||||||
{
|
{
|
||||||
FRAME p, f;
|
STRING f;
|
||||||
/* Display Standby frame */
|
|
||||||
p = CaptureDrawable (LoadGraphicFile ("slides/spins/ship.0.ani"));
|
|
||||||
if (p)
|
|
||||||
{
|
|
||||||
STAMP prologue;
|
|
||||||
|
|
||||||
prologue.origin.x = SCREEN_WIDTH >> 1;
|
sprintf (vnbuf, "slides/spins/ship%02u.txt", (unsigned)index);
|
||||||
prologue.origin.y = SCREEN_HEIGHT >> 1;
|
f = CaptureStringTable (LoadStringTableFile (contentDir, vnbuf));
|
||||||
prologue.frame = p;
|
|
||||||
|
|
||||||
DrawStamp (&prologue);
|
|
||||||
}
|
|
||||||
|
|
||||||
clut_buf[0] = FadeAllToColor;
|
|
||||||
XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 20);
|
|
||||||
FlushColorXForms ();
|
|
||||||
|
|
||||||
sprintf (vnbuf, "slides/spins/ship%02u.ani", (unsigned)index);
|
|
||||||
f = CaptureDrawable (LoadGraphicFile (vnbuf));
|
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
ShowShipAnim (f);
|
ShowPresentation (f);
|
||||||
|
/* BUG: Leak? This is also in ShowPresentationFile */
|
||||||
|
/* DestroyStringTable (ReleaseStringTable (f)); */
|
||||||
|
|
||||||
|
clut_buf[0] = FadeAllToBlack;
|
||||||
|
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 4));
|
||||||
|
FlushColorXForms ();
|
||||||
}
|
}
|
||||||
|
|
||||||
DestroyDrawable (ReleaseDrawable (f));
|
|
||||||
DestroyDrawable (ReleaseDrawable (p));
|
|
||||||
|
|
||||||
clut_buf[0] = FadeAllToBlack;
|
|
||||||
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 4));
|
|
||||||
FlushColorXForms ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GetContextClipRect (&old_r);
|
GetContextClipRect (&old_r);
|
||||||
|
|||||||
@@ -36,7 +36,5 @@ extern BOOLEAN DoFMVEx (const char *name, const char *audname,
|
|||||||
extern BOOLEAN ShowPresentation (STRING PresStr);
|
extern BOOLEAN ShowPresentation (STRING PresStr);
|
||||||
extern BOOLEAN ShowPresentationFile (const char *name);
|
extern BOOLEAN ShowPresentationFile (const char *name);
|
||||||
|
|
||||||
extern BOOLEAN ShowShipAnim (FRAME anim);
|
|
||||||
|
|
||||||
#endif /* _FMV_H */
|
#endif /* _FMV_H */
|
||||||
|
|
||||||
|
|||||||
+1
-74
@@ -512,7 +512,7 @@ DoPresentation (void *pIS)
|
|||||||
{
|
{
|
||||||
TEXT t;
|
TEXT t;
|
||||||
|
|
||||||
t.align = ALIGN_LEFT;
|
t.align = ALIGN_CENTER;
|
||||||
t.pStr = pPIS->Buffer;
|
t.pStr = pPIS->Buffer;
|
||||||
t.CharCount = (COUNT)~0;
|
t.CharCount = (COUNT)~0;
|
||||||
t.baseline.x = x;
|
t.baseline.x = x;
|
||||||
@@ -839,76 +839,3 @@ ShowPresentation (STRING PresStr)
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This needs expansion; in particular, it needs to handle pause
|
|
||||||
* frames and annotations */
|
|
||||||
|
|
||||||
static BOOLEAN
|
|
||||||
DoSpinAnim (void *pIS)
|
|
||||||
{
|
|
||||||
SPINANIM_INPUT_STATE *pSIS = (SPINANIM_INPUT_STATE *)pIS;
|
|
||||||
STAMP *s = &pSIS->anim;
|
|
||||||
int f = GetFrameIndex (s->frame);
|
|
||||||
|
|
||||||
if (GLOBAL (CurrentActivity) & CHECK_ABORT)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AnyButtonPress (FALSE) && !pSIS->debounce)
|
|
||||||
{
|
|
||||||
pSIS->debounce = 15;
|
|
||||||
if (f < 299)
|
|
||||||
{
|
|
||||||
f = 299;
|
|
||||||
s->frame = SetAbsFrameIndex (s->frame, 299);
|
|
||||||
}
|
|
||||||
else if (f == 299)
|
|
||||||
{
|
|
||||||
f = 300;
|
|
||||||
s->frame = SetAbsFrameIndex (s->frame, 300);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (pSIS->debounce) --pSIS->debounce;
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawStamp (s);
|
|
||||||
if (f != 299)
|
|
||||||
{
|
|
||||||
s->frame = SetRelFrameIndex (s->frame, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GetFrameIndex (s->frame) == 0)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
SleepThread (pSIS->last_time + ONE_SECOND / 30 - GetTimeCounter ());
|
|
||||||
pSIS->last_time = GetTimeCounter ();
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
ShowShipAnim (FRAME anim)
|
|
||||||
{
|
|
||||||
SPINANIM_INPUT_STATE is;
|
|
||||||
|
|
||||||
is.anim.origin.x = SCREEN_WIDTH >> 1;
|
|
||||||
is.anim.origin.y = SCREEN_HEIGHT >> 1;
|
|
||||||
is.anim.frame = anim;
|
|
||||||
is.last_time = GetTimeCounter ();
|
|
||||||
is.debounce = 15;
|
|
||||||
|
|
||||||
is.InputFunc = DoSpinAnim;
|
|
||||||
is.MenuRepeatDelay = 0;
|
|
||||||
|
|
||||||
DoInput (&is, TRUE);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user