-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathBKGDTEMP.C
More file actions
154 lines (121 loc) · 3.48 KB
/
BKGDTEMP.C
File metadata and controls
154 lines (121 loc) · 3.48 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/******************************************************************************
File: bkgdtemp.c
Date: August 1994
(C) Williams Entertainment
Mortal Kombat III Temple Routines
******************************************************************************/
/* INCLUDES */
#include "system.h"
#ifdef SONY_PSX
#include "mksony.h"
#endif /* SONY_PSX */
#include "mkbkgd.h"
#include "mkobj.h"
#include "mkos.h"
#include "mkgame.h"
#include "mkutil.h"
#include "mkfx.h"
#include "mkani.h"
#include "mkinit.h"
#include "mkpal.h"
#include "mksound.h"
#include "valloc.h"
/* local prototypes */
void temple_calla(void);
void candle_flame(void);
/************************************************************
* T E M P L E S T U F F *
************************************************************/
/*****************
Externals
*****************/
extern void *temple_anims[];
extern void *a_tflame[];
extern void *a_candle_flame[];
extern void *SKTORCH1[];
extern void *SKTORCH2[];
extern void *SKTORCH3[];
extern void *SKTORCH4[];
extern void *SKTORCH5[];
extern void *SKTORCH6[];
extern void *wik1[];
extern void *wik2[];
extern void *wik3[];
extern void *wik4[];
extern void *KANDLE1[];
/*****************
*****************/
DTBL_INITA tony_candle_table[] =
{
{4,0xd5+2,0x2c-3,a_tflame,&baklst7},
{4,0x14d+2,0x2c-3,a_tflame,&baklst7},
{4|0x8000,0x26d+2,0x2c-3,a_tflame,&baklst7},
{4|0x8000,0x2e4+2,0x2c-3,a_tflame,&baklst7},
{0}
};
ADDRESS *temple_perm_list[] =
{
(ADDRESS *)SKTORCH1,
(ADDRESS *)SKTORCH2,
(ADDRESS *)SKTORCH3,
(ADDRESS *)SKTORCH4,
(ADDRESS *)SKTORCH5,
(ADDRESS *)SKTORCH6,
(ADDRESS *)wik1,
(ADDRESS *)wik2,
(ADDRESS *)wik3,
(ADDRESS *)wik4,
(ADDRESS *)KANDLE1,
NULL
};
/******************************************************************************
Function: void temple_calla(void)
By: David Schwartz
Date: Feb 1995
Parameters: None
Returns: None
Description: setup the bridge background
******************************************************************************/
void temple_calla(void)
{
OBJECT *obj;
alloc_vram_perm_bg_list((ADDRESS *)temple_perm_list,&temple_anims);
current_proc->a10=10;
(long)current_proc->a11=-1;
do
{
/* candd */
gso_dmawnz(obj,(ADDRESS)KANDLE1,temple_anims,0);
obj->oxpos.u.intpos=(short)current_proc->a11+8+2;
obj->oypos.u.intpos=0xb2+6; //+36;
alloc_cache(KANDLE1,temple_anims,obj);
insert_object(obj,&baklst6);
/* flame */
(OBJECT *)current_proc->pa9=obj;
gso_dmawnz(obj,(ADDRESS)wik1,temple_anims,0);
alloc_cache(wik1,temple_anims,current_proc->pa8);
insert_object(current_proc->pa8,&baklst6);
obj->oxpos.u.intpos=((OBJECT *)current_proc->pa9)->oxpos.u.intpos+SCX(7);
obj->oypos.u.intpos=((OBJECT *)current_proc->pa9)->oypos.u.intpos-SCY(12);
CREATE(PID_BANI,candle_flame);
(long)current_proc->a11+=SCX(0x96);
}
while(--current_proc->a10>0);
create_dumb_animators(tony_candle_table,&temple_anims);
return;
}
/******************************************************************************
Function: void candle_flame(void)
By: David Schwartz
Date: Feb 1995
Parameters: None
Returns: None
Description: animate the candles on the temple bkgd
******************************************************************************/
void candle_flame(void)
{
process_sleep(randu(10));
current_proc->pa9=a_candle_flame;
framew(3+randu(2));
wait_forever();
}