-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dead.cpp
85 lines (64 loc) · 1.53 KB
/
Dead.cpp
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
85
/*
1999-2000 Copyright (c) mahalo, the nogada worker.. (Amigo~*). All rights reserved.
Copyright (c) Hyung-seok Choi, the Graphics Designer. All rights reserved.
*/
#include <ddraw.h>
#include <mmsystem.h>
#include <dsound.h>
#include "dead.h"
#include "main.h"
//#include "sound.h"
#include "dsutil.h"
extern LPDIRECTDRAWSURFACE DeadScreen;
extern LPDIRECTDRAWSURFACE GameOver;
extern LPDIRECTSOUNDBUFFER g_dsDead;
extern DWORD dwGameCount;
void Dead(void)
{
static DWORD cur,last;
static RECT UpRect, DownRect;
static int Firs;
Score1p=Score2p=0;
if(Firs==0)
{
UpRect.top=240;
UpRect.left=0;
UpRect.right=640;
UpRect.bottom=240;
DownRect.top=240;
DownRect.left=0;
DownRect.right=640;
DownRect.bottom=240;
last=cur=timeGetTime();
Firs++;
}
if(Firs==1)
{
if(g_dsDead)g_dsDead->Play(0,0,0);
if(UpRect.top==0)Firs++;
else
{
UpRect.top-=40;
DownRect.bottom+=40;
}
g_pDDSBack->BltFast(0,0,DeadScreen,&UpRect,DDBLTFAST_NOCOLORKEY);
g_pDDSBack->BltFast(0,UpRect.top+240,DeadScreen,&DownRect,DDBLTFAST_NOCOLORKEY);
}
if(Firs==2)
{
g_pDDSBack->BltFast(0,0,DeadScreen,NULL,DDBLTFAST_NOCOLORKEY);
cur=timeGetTime();
if((cur-last)>2500)
{
Firs=0;
//AlphaTransition(DeadScreen,GameOver);
// g_pDDSBack->BltFast(0,0, GameOver, NULL, DDBLTFAST_NOCOLORKEY);
//FadeToBlack();
Start1p=Start2p=FALSE;
dwGameCount=0;
// ProgramState=GAMETITLE;
ProgramState=GAMEOVER;
}
}
Flipp();
}