-
Notifications
You must be signed in to change notification settings - Fork 2
/
titleseq.c
84 lines (66 loc) · 1.7 KB
/
titleseq.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* :ts=8 bk=0
*
* titleseq.c: Title sequence.
*
* Leo L. Schwab 9309.12
*/
#include <types.h>
#include <graphics.h>
#include "castle.h"
#include "imgfile.h"
#include "flow.h"
#include "app_proto.h"
/***************************************************************************
* #defines
*/
#define XMARGIN ((320 - 256) / 2)
#define YMARGIN ((240 - 196) / 2)
/***************************************************************************
* Globals.
*/
extern RastPort *rpvis, *rprend;
extern JoyData jd;
extern Item vblIO;
extern int32 wide, high;
extern uint32 ccbextra;
/***************************************************************************
* Code
*/
int
dotitle ()
{
register CCB *ccb;
CelArray *ca_logo;
/*
* Load stupid damn contemptability logo.
*/
if (!(ca_logo = parse3DO ("$progdir/LaurieProbstMadeMeUseThis")))
die ("Laurie's out to lunch.\n");
ccb = ca_logo->celptrs[0];
ccb->ccb_Flags |= CCB_LAST | CCB_NPABS | CCB_LDSIZE |
CCB_LDPRS | CCB_LDPPMP | CCB_YOXY |
CCB_ACW | ccbextra;
ccb->ccb_Flags &= ~(CCB_ACCW | CCB_TWD);
/*
* Position and render logo, and let it languish there for three
* seconds.
*/
ccb->ccb_XPos = ((wide - REALCELDIM (ccb->ccb_Width)) / 2) << 16;
ccb->ccb_YPos = (high - YMARGIN - REALCELDIM (ccb->ccb_Height)) << 16;
fadetolevel (rpvis, 0);
SetRast (rpvis, 0);
DisplayScreen (rpvis->rp_ScreenItem, 0);
DrawCels (rpvis->rp_BitmapItem, ccb);
fadeup (rpvis, 32);
WaitVBL (vblIO, 180);
fadetoblank (rpvis, 32);
freecelarray (ca_logo);
/*
* Play CinePak intro.
*/
if (playcpak ("$progdir/Streams/PublisherLogo"))
return (FC_USERABORT);
if (playcpak ("$progdir/Streams/Intro"))
return (FC_USERABORT);
return (FC_NOP);
}