Subversion Repositories eduke32

Rev

Rev 8685 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8685 Rev 8798
1
//-------------------------------------------------------------------------
1
//-------------------------------------------------------------------------
2
/*
2
/*
3
Copyright (C) 1997, 2005 - 3D Realms Entertainment
3
Copyright (C) 1997, 2005 - 3D Realms Entertainment
4

4

5
This file is part of Shadow Warrior version 1.2
5
This file is part of Shadow Warrior version 1.2
6

6

7
Shadow Warrior is free software; you can redistribute it and/or
7
Shadow Warrior is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License
8
modify it under the terms of the GNU General Public License
9
as published by the Free Software Foundation; either version 2
9
as published by the Free Software Foundation; either version 2
10
of the License, or (at your option) any later version.
10
of the License, or (at your option) any later version.
11

11

12
This program is distributed in the hope that it will be useful,
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15

15

16
See the GNU General Public License for more details.
16
See the GNU General Public License for more details.
17

17

18
You should have received a copy of the GNU General Public License
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21

21

22
Original Source: 1997 - Frank Maddin and Jim Norwood
22
Original Source: 1997 - Frank Maddin and Jim Norwood
23
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
23
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
24
*/
24
*/
25
//-------------------------------------------------------------------------
25
//-------------------------------------------------------------------------
26
#include "build.h"
26
#include "build.h"
27
27
28
#include "keys.h"
28
#include "keys.h"
29
#include "names2.h"
29
#include "names2.h"
30
#include "panel.h"
30
#include "panel.h"
31
#include "game.h"
31
#include "game.h"
32
#include "tags.h"
32
#include "tags.h"
33
#include "ai.h"
33
#include "ai.h"
34
#include "pal.h"
34
#include "pal.h"
35
#include "actor.h"
35
#include "actor.h"
36
#include "sprite.h"
36
#include "sprite.h"
37
#include "track.h"
37
#include "track.h"
38
38
39
ANIMATOR InitRipperHang;
39
ANIMATOR InitRipperHang;
40
ANIMATOR DoActorMoveJump;
40
ANIMATOR DoActorMoveJump;
41
ANIMATOR DoRipperMoveJump;
41
ANIMATOR DoRipperMoveJump;
42
ANIMATOR DoRipperHangJF;
42
ANIMATOR DoRipperHangJF;
43
ANIMATOR DoRipperQuickJump;
43
ANIMATOR DoRipperQuickJump;
44
44
45
DECISION RipperBattle[] =
45
DECISION RipperBattle[] =
46
{
46
{
47
    {748, InitActorMoveCloser},
47
    {748, InitActorMoveCloser},
48
    {750, InitActorAlertNoise},
48
    {750, InitActorAlertNoise},
49
//    {900, InitRipperHang},
49
//    {900, InitRipperHang},
50
    {755, InitActorAttackNoise},
50
    {755, InitActorAttackNoise},
51
    {1024, InitActorAttack}
51
    {1024, InitActorAttack}
52
};
52
};
53
53
54
DECISION RipperOffense[] =
54
DECISION RipperOffense[] =
55
{
55
{
56
    {700, InitActorMoveCloser},
56
    {700, InitActorMoveCloser},
57
    {710, InitActorAlertNoise},
57
    {710, InitActorAlertNoise},
58
    {1024, InitActorAttack}
58
    {1024, InitActorAttack}
59
};
59
};
60
60
61
DECISION RipperBroadcast[] =
61
DECISION RipperBroadcast[] =
62
{
62
{
63
    {3, InitActorAlertNoise},
63
    {3, InitActorAlertNoise},
64
    {6, InitActorAmbientNoise},
64
    {6, InitActorAmbientNoise},
65
    {1024, InitActorDecide}
65
    {1024, InitActorDecide}
66
};
66
};
67
67
68
DECISION RipperSurprised[] =
68
DECISION RipperSurprised[] =
69
{
69
{
70
    {30, InitRipperHang},
70
    {30, InitRipperHang},
71
    {701, InitActorMoveCloser},
71
    {701, InitActorMoveCloser},
72
    {1024, InitActorDecide}
72
    {1024, InitActorDecide}
73
};
73
};
74
74
75
DECISION RipperEvasive[] =
75
DECISION RipperEvasive[] =
76
{
76
{
77
    {6, InitRipperHang},
77
    {6, InitRipperHang},
78
    {1024, NULL}
78
    {1024, NULL}
79
};
79
};
80
80
81
DECISION RipperLostTarget[] =
81
DECISION RipperLostTarget[] =
82
{
82
{
83
    {980, InitActorFindPlayer},
83
    {980, InitActorFindPlayer},
84
    {1024, InitActorWanderAround}
84
    {1024, InitActorWanderAround}
85
};
85
};
86
86
87
DECISION RipperCloseRange[] =
87
DECISION RipperCloseRange[] =
88
{
88
{
89
    {900,   InitActorAttack             },
89
    {900,   InitActorAttack             },
90
    {1024,  InitActorReposition         }
90
    {1024,  InitActorReposition         }
91
};
91
};
92
92
93
PERSONALITY RipperPersonality =
93
PERSONALITY RipperPersonality =
94
{
94
{
95
    RipperBattle,
95
    RipperBattle,
96
    RipperOffense,
96
    RipperOffense,
97
    RipperBroadcast,
97
    RipperBroadcast,
98
    RipperSurprised,
98
    RipperSurprised,
99
    RipperEvasive,
99
    RipperEvasive,
100
    RipperLostTarget,
100
    RipperLostTarget,
101
    RipperCloseRange,
101
    RipperCloseRange,
102
    RipperCloseRange
102
    RipperCloseRange
103
};
103
};
104
104
105
ATTRIBUTE RipperAttrib =
105
ATTRIBUTE RipperAttrib =
106
{
106
{
107
    {200, 220, 240, 280},               // Speeds
107
    {200, 220, 240, 280},               // Speeds
108
    {5, 0, -2, -4},                     // Tic Adjusts
108
    {5, 0, -2, -4},                     // Tic Adjusts
109
    3,                                  // MaxWeapons;
109
    3,                                  // MaxWeapons;
110
    {
110
    {
111
        DIGI_RIPPERAMBIENT, DIGI_RIPPERALERT, DIGI_RIPPERATTACK,
111
        DIGI_RIPPERAMBIENT, DIGI_RIPPERALERT, DIGI_RIPPERATTACK,
112
        DIGI_RIPPERPAIN, DIGI_RIPPERSCREAM, DIGI_RIPPERHEARTOUT,
112
        DIGI_RIPPERPAIN, DIGI_RIPPERSCREAM, DIGI_RIPPERHEARTOUT,
113
        0,0,0,0
113
        0,0,0,0
114
    }
114
    }
115
};
115
};
116
116
117
//////////////////////
117
//////////////////////
118
//
118
//
119
// RIPPER RUN
119
// RIPPER RUN
120
//
120
//
121
//////////////////////
121
//////////////////////
122
122
123
#define RIPPER_RUN_RATE 16
123
#define RIPPER_RUN_RATE 16
124
124
125
ANIMATOR DoRipperMove, NullRipper, DoActorDebris;
125
ANIMATOR DoRipperMove, NullRipper, DoActorDebris;
126
126
127
STATE s_RipperRun[5][4] =
127
STATE s_RipperRun[5][4] =
128
{
128
{
129
    {
129
    {
130
        {RIPPER_RUN_R0 + 0, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[0][1]},
130
        {RIPPER_RUN_R0 + 0, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[0][1]},
131
        {RIPPER_RUN_R0 + 1, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[0][2]},
131
        {RIPPER_RUN_R0 + 1, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[0][2]},
132
        {RIPPER_RUN_R0 + 2, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[0][3]},
132
        {RIPPER_RUN_R0 + 2, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[0][3]},
133
        {RIPPER_RUN_R0 + 3, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[0][0]},
133
        {RIPPER_RUN_R0 + 3, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[0][0]},
134
    },
134
    },
135
    {
135
    {
136
        {RIPPER_RUN_R1 + 0, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[1][1]},
136
        {RIPPER_RUN_R1 + 0, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[1][1]},
137
        {RIPPER_RUN_R1 + 1, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[1][2]},
137
        {RIPPER_RUN_R1 + 1, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[1][2]},
138
        {RIPPER_RUN_R1 + 2, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[1][3]},
138
        {RIPPER_RUN_R1 + 2, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[1][3]},
139
        {RIPPER_RUN_R1 + 3, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[1][0]},
139
        {RIPPER_RUN_R1 + 3, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[1][0]},
140
    },
140
    },
141
    {
141
    {
142
        {RIPPER_RUN_R2 + 0, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[2][1]},
142
        {RIPPER_RUN_R2 + 0, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[2][1]},
143
        {RIPPER_RUN_R2 + 1, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[2][2]},
143
        {RIPPER_RUN_R2 + 1, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[2][2]},
144
        {RIPPER_RUN_R2 + 2, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[2][3]},
144
        {RIPPER_RUN_R2 + 2, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[2][3]},
145
        {RIPPER_RUN_R2 + 3, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[2][0]},
145
        {RIPPER_RUN_R2 + 3, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[2][0]},
146
    },
146
    },
147
    {
147
    {
148
        {RIPPER_RUN_R3 + 0, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[3][1]},
148
        {RIPPER_RUN_R3 + 0, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[3][1]},
149
        {RIPPER_RUN_R3 + 1, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[3][2]},
149
        {RIPPER_RUN_R3 + 1, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[3][2]},
150
        {RIPPER_RUN_R3 + 2, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[3][3]},
150
        {RIPPER_RUN_R3 + 2, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[3][3]},
151
        {RIPPER_RUN_R3 + 3, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[3][0]},
151
        {RIPPER_RUN_R3 + 3, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[3][0]},
152
    },
152
    },
153
    {
153
    {
154
        {RIPPER_RUN_R4 + 0, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[4][1]},
154
        {RIPPER_RUN_R4 + 0, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[4][1]},
155
        {RIPPER_RUN_R4 + 1, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[4][2]},
155
        {RIPPER_RUN_R4 + 1, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[4][2]},
156
        {RIPPER_RUN_R4 + 2, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[4][3]},
156
        {RIPPER_RUN_R4 + 2, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[4][3]},
157
        {RIPPER_RUN_R4 + 3, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[4][0]},
157
        {RIPPER_RUN_R4 + 3, RIPPER_RUN_RATE | SF_TIC_ADJUST, DoRipperMove, &s_RipperRun[4][0]},
158
    }
158
    }
159
};
159
};
160
160
161
161
162
STATEp sg_RipperRun[] =
162
STATEp sg_RipperRun[] =
163
{
163
{
164
    &s_RipperRun[0][0],
164
    &s_RipperRun[0][0],
165
    &s_RipperRun[1][0],
165
    &s_RipperRun[1][0],
166
    &s_RipperRun[2][0],
166
    &s_RipperRun[2][0],
167
    &s_RipperRun[3][0],
167
    &s_RipperRun[3][0],
168
    &s_RipperRun[4][0]
168
    &s_RipperRun[4][0]
169
};
169
};
170
170
171
//////////////////////
171
//////////////////////
172
//
172
//
173
// RIPPER STAND
173
// RIPPER STAND
174
//
174
//
175
//////////////////////
175
//////////////////////
176
176
177
#define RIPPER_STAND_RATE 12
177
#define RIPPER_STAND_RATE 12
178
178
179
STATE s_RipperStand[5][1] =
179
STATE s_RipperStand[5][1] =
180
{
180
{
181
    {
181
    {
182
        {RIPPER_STAND_R0 + 0, RIPPER_STAND_RATE, DoRipperMove, &s_RipperStand[0][0]},
182
        {RIPPER_STAND_R0 + 0, RIPPER_STAND_RATE, DoRipperMove, &s_RipperStand[0][0]},
183
    },
183
    },
184
    {
184
    {
185
        {RIPPER_STAND_R1 + 0, RIPPER_STAND_RATE, DoRipperMove, &s_RipperStand[1][0]},
185
        {RIPPER_STAND_R1 + 0, RIPPER_STAND_RATE, DoRipperMove, &s_RipperStand[1][0]},
186
    },
186
    },
187
    {
187
    {
188
        {RIPPER_STAND_R2 + 0, RIPPER_STAND_RATE, DoRipperMove, &s_RipperStand[2][0]},
188
        {RIPPER_STAND_R2 + 0, RIPPER_STAND_RATE, DoRipperMove, &s_RipperStand[2][0]},
189
    },
189
    },
190
    {
190
    {
191
        {RIPPER_STAND_R3 + 0, RIPPER_STAND_RATE, DoRipperMove, &s_RipperStand[3][0]},
191
        {RIPPER_STAND_R3 + 0, RIPPER_STAND_RATE, DoRipperMove, &s_RipperStand[3][0]},
192
    },
192
    },
193
    {
193
    {
194
        {RIPPER_STAND_R4 + 0, RIPPER_STAND_RATE, DoRipperMove, &s_RipperStand[4][0]},
194
        {RIPPER_STAND_R4 + 0, RIPPER_STAND_RATE, DoRipperMove, &s_RipperStand[4][0]},
195
    },
195
    },
196
};
196
};
197
197
198
198
199
STATEp sg_RipperStand[] =
199
STATEp sg_RipperStand[] =
200
{
200
{
201
    s_RipperStand[0],
201
    s_RipperStand[0],
202
    s_RipperStand[1],
202
    s_RipperStand[1],
203
    s_RipperStand[2],
203
    s_RipperStand[2],
204
    s_RipperStand[3],
204
    s_RipperStand[3],
205
    s_RipperStand[4]
205
    s_RipperStand[4]
206
};
206
};
207
207
208
//////////////////////
208
//////////////////////
209
//
209
//
210
// RIPPER SWIPE
210
// RIPPER SWIPE
211
//
211
//
212
//////////////////////
212
//////////////////////
213
213
214
#define RIPPER_SWIPE_RATE 8
214
#define RIPPER_SWIPE_RATE 8
215
ANIMATOR InitActorDecide;
215
ANIMATOR InitActorDecide;
216
ANIMATOR InitRipperSlash;
216
ANIMATOR InitRipperSlash;
217
217
218
STATE s_RipperSwipe[5][8] =
218
STATE s_RipperSwipe[5][8] =
219
{
219
{
220
    {
220
    {
221
        {RIPPER_SWIPE_R0 + 0, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[0][1]},
221
        {RIPPER_SWIPE_R0 + 0, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[0][1]},
222
        {RIPPER_SWIPE_R0 + 1, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[0][2]},
222
        {RIPPER_SWIPE_R0 + 1, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[0][2]},
223
        {RIPPER_SWIPE_R0 + 1, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[0][3]},
223
        {RIPPER_SWIPE_R0 + 1, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[0][3]},
224
        {RIPPER_SWIPE_R0 + 2, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[0][4]},
224
        {RIPPER_SWIPE_R0 + 2, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[0][4]},
225
        {RIPPER_SWIPE_R0 + 3, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[0][5]},
225
        {RIPPER_SWIPE_R0 + 3, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[0][5]},
226
        {RIPPER_SWIPE_R0 + 3, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[0][6]},
226
        {RIPPER_SWIPE_R0 + 3, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[0][6]},
227
        {RIPPER_SWIPE_R0 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSwipe[0][7]},
227
        {RIPPER_SWIPE_R0 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSwipe[0][7]},
228
        {RIPPER_SWIPE_R0 + 3, RIPPER_SWIPE_RATE, DoRipperMove, &s_RipperSwipe[0][7]},
228
        {RIPPER_SWIPE_R0 + 3, RIPPER_SWIPE_RATE, DoRipperMove, &s_RipperSwipe[0][7]},
229
    },
229
    },
230
    {
230
    {
231
        {RIPPER_SWIPE_R1 + 0, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[1][1]},
231
        {RIPPER_SWIPE_R1 + 0, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[1][1]},
232
        {RIPPER_SWIPE_R1 + 1, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[1][2]},
232
        {RIPPER_SWIPE_R1 + 1, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[1][2]},
233
        {RIPPER_SWIPE_R1 + 1, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[1][3]},
233
        {RIPPER_SWIPE_R1 + 1, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[1][3]},
234
        {RIPPER_SWIPE_R1 + 2, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[1][4]},
234
        {RIPPER_SWIPE_R1 + 2, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[1][4]},
235
        {RIPPER_SWIPE_R1 + 3, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[1][5]},
235
        {RIPPER_SWIPE_R1 + 3, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[1][5]},
236
        {RIPPER_SWIPE_R1 + 3, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[1][6]},
236
        {RIPPER_SWIPE_R1 + 3, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[1][6]},
237
        {RIPPER_SWIPE_R1 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSwipe[1][7]},
237
        {RIPPER_SWIPE_R1 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSwipe[1][7]},
238
        {RIPPER_SWIPE_R1 + 3, RIPPER_SWIPE_RATE, DoRipperMove, &s_RipperSwipe[1][7]},
238
        {RIPPER_SWIPE_R1 + 3, RIPPER_SWIPE_RATE, DoRipperMove, &s_RipperSwipe[1][7]},
239
    },
239
    },
240
    {
240
    {
241
        {RIPPER_SWIPE_R2 + 0, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[2][1]},
241
        {RIPPER_SWIPE_R2 + 0, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[2][1]},
242
        {RIPPER_SWIPE_R2 + 1, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[2][2]},
242
        {RIPPER_SWIPE_R2 + 1, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[2][2]},
243
        {RIPPER_SWIPE_R2 + 1, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[2][3]},
243
        {RIPPER_SWIPE_R2 + 1, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[2][3]},
244
        {RIPPER_SWIPE_R2 + 2, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[2][4]},
244
        {RIPPER_SWIPE_R2 + 2, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[2][4]},
245
        {RIPPER_SWIPE_R2 + 3, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[2][5]},
245
        {RIPPER_SWIPE_R2 + 3, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[2][5]},
246
        {RIPPER_SWIPE_R2 + 3, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[2][6]},
246
        {RIPPER_SWIPE_R2 + 3, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[2][6]},
247
        {RIPPER_SWIPE_R2 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSwipe[2][7]},
247
        {RIPPER_SWIPE_R2 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSwipe[2][7]},
248
        {RIPPER_SWIPE_R2 + 3, RIPPER_SWIPE_RATE, DoRipperMove, &s_RipperSwipe[2][7]},
248
        {RIPPER_SWIPE_R2 + 3, RIPPER_SWIPE_RATE, DoRipperMove, &s_RipperSwipe[2][7]},
249
    },
249
    },
250
    {
250
    {
251
        {RIPPER_SWIPE_R3 + 0, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[3][1]},
251
        {RIPPER_SWIPE_R3 + 0, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[3][1]},
252
        {RIPPER_SWIPE_R3 + 1, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[3][2]},
252
        {RIPPER_SWIPE_R3 + 1, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[3][2]},
253
        {RIPPER_SWIPE_R3 + 1, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[3][3]},
253
        {RIPPER_SWIPE_R3 + 1, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[3][3]},
254
        {RIPPER_SWIPE_R3 + 2, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[3][4]},
254
        {RIPPER_SWIPE_R3 + 2, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[3][4]},
255
        {RIPPER_SWIPE_R3 + 3, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[3][5]},
255
        {RIPPER_SWIPE_R3 + 3, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[3][5]},
256
        {RIPPER_SWIPE_R3 + 3, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[3][6]},
256
        {RIPPER_SWIPE_R3 + 3, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[3][6]},
257
        {RIPPER_SWIPE_R3 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSwipe[3][7]},
257
        {RIPPER_SWIPE_R3 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSwipe[3][7]},
258
        {RIPPER_SWIPE_R3 + 3, RIPPER_SWIPE_RATE, DoRipperMove, &s_RipperSwipe[3][7]},
258
        {RIPPER_SWIPE_R3 + 3, RIPPER_SWIPE_RATE, DoRipperMove, &s_RipperSwipe[3][7]},
259
    },
259
    },
260
    {
260
    {
261
        {RIPPER_SWIPE_R4 + 0, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[4][1]},
261
        {RIPPER_SWIPE_R4 + 0, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[4][1]},
262
        {RIPPER_SWIPE_R4 + 1, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[4][2]},
262
        {RIPPER_SWIPE_R4 + 1, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[4][2]},
263
        {RIPPER_SWIPE_R4 + 1, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[4][3]},
263
        {RIPPER_SWIPE_R4 + 1, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[4][3]},
264
        {RIPPER_SWIPE_R4 + 2, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[4][4]},
264
        {RIPPER_SWIPE_R4 + 2, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[4][4]},
265
        {RIPPER_SWIPE_R4 + 3, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[4][5]},
265
        {RIPPER_SWIPE_R4 + 3, RIPPER_SWIPE_RATE, NullRipper, &s_RipperSwipe[4][5]},
266
        {RIPPER_SWIPE_R4 + 3, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[4][6]},
266
        {RIPPER_SWIPE_R4 + 3, 0 | SF_QUICK_CALL, InitRipperSlash, &s_RipperSwipe[4][6]},
267
        {RIPPER_SWIPE_R4 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSwipe[4][7]},
267
        {RIPPER_SWIPE_R4 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSwipe[4][7]},
268
        {RIPPER_SWIPE_R4 + 3, RIPPER_SWIPE_RATE, DoRipperMove, &s_RipperSwipe[4][7]},
268
        {RIPPER_SWIPE_R4 + 3, RIPPER_SWIPE_RATE, DoRipperMove, &s_RipperSwipe[4][7]},
269
    }
269
    }
270
};
270
};
271
271
272
272
273
STATEp sg_RipperSwipe[] =
273
STATEp sg_RipperSwipe[] =
274
{
274
{
275
    &s_RipperSwipe[0][0],
275
    &s_RipperSwipe[0][0],
276
    &s_RipperSwipe[1][0],
276
    &s_RipperSwipe[1][0],
277
    &s_RipperSwipe[2][0],
277
    &s_RipperSwipe[2][0],
278
    &s_RipperSwipe[3][0],
278
    &s_RipperSwipe[3][0],
279
    &s_RipperSwipe[4][0]
279
    &s_RipperSwipe[4][0]
280
};
280
};
281
281
282
282
283
//////////////////////
283
//////////////////////
284
//
284
//
285
// RIPPER SPEW
285
// RIPPER SPEW
286
//
286
//
287
//////////////////////
287
//////////////////////
288
288
289
#define RIPPER_SPEW_RATE 8
289
#define RIPPER_SPEW_RATE 8
290
ANIMATOR InitActorDecide;
290
ANIMATOR InitActorDecide;
291
ANIMATOR InitCoolgFire;
291
ANIMATOR InitCoolgFire;
292
292
293
STATE s_RipperSpew[5][7] =
293
STATE s_RipperSpew[5][7] =
294
{
294
{
295
    {
295
    {
296
        {RIPPER_SWIPE_R0 + 0, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[0][1]},
296
        {RIPPER_SWIPE_R0 + 0, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[0][1]},
297
        {RIPPER_SWIPE_R0 + 1, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[0][2]},
297
        {RIPPER_SWIPE_R0 + 1, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[0][2]},
298
        {RIPPER_SWIPE_R0 + 1, 0 | SF_QUICK_CALL, InitCoolgFire, &s_RipperSpew[0][3]},
298
        {RIPPER_SWIPE_R0 + 1, 0 | SF_QUICK_CALL, InitCoolgFire, &s_RipperSpew[0][3]},
299
        {RIPPER_SWIPE_R0 + 2, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[0][4]},
299
        {RIPPER_SWIPE_R0 + 2, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[0][4]},
300
        {RIPPER_SWIPE_R0 + 3, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[0][5]},
300
        {RIPPER_SWIPE_R0 + 3, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[0][5]},
301
        {RIPPER_SWIPE_R0 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSpew[0][6]},
301
        {RIPPER_SWIPE_R0 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSpew[0][6]},
302
        {RIPPER_SWIPE_R0 + 3, RIPPER_SPEW_RATE, DoRipperMove, &s_RipperSpew[0][6]},
302
        {RIPPER_SWIPE_R0 + 3, RIPPER_SPEW_RATE, DoRipperMove, &s_RipperSpew[0][6]},
303
    },
303
    },
304
    {
304
    {
305
        {RIPPER_SWIPE_R1 + 0, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[1][1]},
305
        {RIPPER_SWIPE_R1 + 0, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[1][1]},
306
        {RIPPER_SWIPE_R1 + 1, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[1][2]},
306
        {RIPPER_SWIPE_R1 + 1, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[1][2]},
307
        {RIPPER_SWIPE_R1 + 1, 0 | SF_QUICK_CALL, InitCoolgFire, &s_RipperSpew[1][3]},
307
        {RIPPER_SWIPE_R1 + 1, 0 | SF_QUICK_CALL, InitCoolgFire, &s_RipperSpew[1][3]},
308
        {RIPPER_SWIPE_R1 + 2, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[1][4]},
308
        {RIPPER_SWIPE_R1 + 2, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[1][4]},
309
        {RIPPER_SWIPE_R1 + 3, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[1][5]},
309
        {RIPPER_SWIPE_R1 + 3, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[1][5]},
310
        {RIPPER_SWIPE_R1 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSpew[1][6]},
310
        {RIPPER_SWIPE_R1 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSpew[1][6]},
311
        {RIPPER_SWIPE_R1 + 3, RIPPER_SPEW_RATE, DoRipperMove, &s_RipperSpew[1][6]},
311
        {RIPPER_SWIPE_R1 + 3, RIPPER_SPEW_RATE, DoRipperMove, &s_RipperSpew[1][6]},
312
    },
312
    },
313
    {
313
    {
314
        {RIPPER_SWIPE_R2 + 0, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[2][1]},
314
        {RIPPER_SWIPE_R2 + 0, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[2][1]},
315
        {RIPPER_SWIPE_R2 + 1, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[2][2]},
315
        {RIPPER_SWIPE_R2 + 1, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[2][2]},
316
        {RIPPER_SWIPE_R2 + 1, 0 | SF_QUICK_CALL, InitCoolgFire, &s_RipperSpew[2][3]},
316
        {RIPPER_SWIPE_R2 + 1, 0 | SF_QUICK_CALL, InitCoolgFire, &s_RipperSpew[2][3]},
317
        {RIPPER_SWIPE_R2 + 2, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[2][4]},
317
        {RIPPER_SWIPE_R2 + 2, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[2][4]},
318
        {RIPPER_SWIPE_R2 + 3, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[2][5]},
318
        {RIPPER_SWIPE_R2 + 3, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[2][5]},
319
        {RIPPER_SWIPE_R2 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSpew[2][6]},
319
        {RIPPER_SWIPE_R2 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSpew[2][6]},
320
        {RIPPER_SWIPE_R2 + 3, RIPPER_SPEW_RATE, DoRipperMove, &s_RipperSpew[2][6]},
320
        {RIPPER_SWIPE_R2 + 3, RIPPER_SPEW_RATE, DoRipperMove, &s_RipperSpew[2][6]},
321
    },
321
    },
322
    {
322
    {
323
        {RIPPER_SWIPE_R3 + 0, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[3][1]},
323
        {RIPPER_SWIPE_R3 + 0, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[3][1]},
324
        {RIPPER_SWIPE_R3 + 1, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[3][2]},
324
        {RIPPER_SWIPE_R3 + 1, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[3][2]},
325
        {RIPPER_SWIPE_R3 + 1, 0 | SF_QUICK_CALL, InitCoolgFire, &s_RipperSpew[3][3]},
325
        {RIPPER_SWIPE_R3 + 1, 0 | SF_QUICK_CALL, InitCoolgFire, &s_RipperSpew[3][3]},
326
        {RIPPER_SWIPE_R3 + 2, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[3][4]},
326
        {RIPPER_SWIPE_R3 + 2, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[3][4]},
327
        {RIPPER_SWIPE_R3 + 3, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[3][5]},
327
        {RIPPER_SWIPE_R3 + 3, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[3][5]},
328
        {RIPPER_SWIPE_R3 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSpew[3][6]},
328
        {RIPPER_SWIPE_R3 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSpew[3][6]},
329
        {RIPPER_SWIPE_R3 + 3, RIPPER_SPEW_RATE, DoRipperMove, &s_RipperSpew[3][6]},
329
        {RIPPER_SWIPE_R3 + 3, RIPPER_SPEW_RATE, DoRipperMove, &s_RipperSpew[3][6]},
330
    },
330
    },
331
    {
331
    {
332
        {RIPPER_SWIPE_R4 + 0, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[4][1]},
332
        {RIPPER_SWIPE_R4 + 0, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[4][1]},
333
        {RIPPER_SWIPE_R4 + 1, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[4][2]},
333
        {RIPPER_SWIPE_R4 + 1, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[4][2]},
334
        {RIPPER_SWIPE_R4 + 1, 0 | SF_QUICK_CALL, InitCoolgFire, &s_RipperSpew[4][3]},
334
        {RIPPER_SWIPE_R4 + 1, 0 | SF_QUICK_CALL, InitCoolgFire, &s_RipperSpew[4][3]},
335
        {RIPPER_SWIPE_R4 + 2, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[4][4]},
335
        {RIPPER_SWIPE_R4 + 2, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[4][4]},
336
        {RIPPER_SWIPE_R4 + 3, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[4][5]},
336
        {RIPPER_SWIPE_R4 + 3, RIPPER_SPEW_RATE, NullRipper, &s_RipperSpew[4][5]},
337
        {RIPPER_SWIPE_R4 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSpew[4][6]},
337
        {RIPPER_SWIPE_R4 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_RipperSpew[4][6]},
338
        {RIPPER_SWIPE_R4 + 3, RIPPER_SPEW_RATE, DoRipperMove, &s_RipperSpew[4][6]},
338
        {RIPPER_SWIPE_R4 + 3, RIPPER_SPEW_RATE, DoRipperMove, &s_RipperSpew[4][6]},
339
    }
339
    }
340
};
340
};
341
341
342
342
343
STATEp sg_RipperSpew[] =
343
STATEp sg_RipperSpew[] =
344
{
344
{
345
    &s_RipperSpew[0][0],
345
    &s_RipperSpew[0][0],
346
    &s_RipperSpew[1][0],
346
    &s_RipperSpew[1][0],
347
    &s_RipperSpew[2][0],
347
    &s_RipperSpew[2][0],
348
    &s_RipperSpew[3][0],
348
    &s_RipperSpew[3][0],
349
    &s_RipperSpew[4][0]
349
    &s_RipperSpew[4][0]
350
};
350
};
351
351
352
352
353
//////////////////////
353
//////////////////////
354
//
354
//
355
// RIPPER HEART - show players heart
355
// RIPPER HEART - show players heart
356
//
356
//
357
//////////////////////
357
//////////////////////
358
358
359
#define RIPPER_HEART_RATE 14
359
#define RIPPER_HEART_RATE 14
360
ANIMATOR DoRipperStandHeart;
360
ANIMATOR DoRipperStandHeart;
361
361
362
STATE s_RipperHeart[5][4] =
362
STATE s_RipperHeart[5][4] =
363
{
363
{
364
    {
364
    {
365
        {RIPPER_HEART_R0 + 0, RIPPER_HEART_RATE, DoRipperStandHeart, &s_RipperHeart[0][0]},
365
        {RIPPER_HEART_R0 + 0, RIPPER_HEART_RATE, DoRipperStandHeart, &s_RipperHeart[0][0]},
366
    },
366
    },
367
    {
367
    {
368
        {RIPPER_HEART_R1 + 0, RIPPER_HEART_RATE, DoRipperStandHeart, &s_RipperHeart[1][0]},
368
        {RIPPER_HEART_R1 + 0, RIPPER_HEART_RATE, DoRipperStandHeart, &s_RipperHeart[1][0]},
369
    },
369
    },
370
    {
370
    {
371
        {RIPPER_HEART_R2 + 0, RIPPER_HEART_RATE, DoRipperStandHeart, &s_RipperHeart[2][0]},
371
        {RIPPER_HEART_R2 + 0, RIPPER_HEART_RATE, DoRipperStandHeart, &s_RipperHeart[2][0]},
372
    },
372
    },
373
    {
373
    {
374
        {RIPPER_HEART_R3 + 0, RIPPER_HEART_RATE, DoRipperStandHeart, &s_RipperHeart[3][0]},
374
        {RIPPER_HEART_R3 + 0, RIPPER_HEART_RATE, DoRipperStandHeart, &s_RipperHeart[3][0]},
375
    },
375
    },
376
    {
376
    {
377
        {RIPPER_HEART_R4 + 0, RIPPER_HEART_RATE, DoRipperStandHeart, &s_RipperHeart[4][0]},
377
        {RIPPER_HEART_R4 + 0, RIPPER_HEART_RATE, DoRipperStandHeart, &s_RipperHeart[4][0]},
378
    }
378
    }
379
};
379
};
380
380
381
STATEp sg_RipperHeart[] =
381
STATEp sg_RipperHeart[] =
382
{
382
{
383
    &s_RipperHeart[0][0],
383
    &s_RipperHeart[0][0],
384
    &s_RipperHeart[1][0],
384
    &s_RipperHeart[1][0],
385
    &s_RipperHeart[2][0],
385
    &s_RipperHeart[2][0],
386
    &s_RipperHeart[3][0],
386
    &s_RipperHeart[3][0],
387
    &s_RipperHeart[4][0]
387
    &s_RipperHeart[4][0]
388
};
388
};
389
389
390
//////////////////////
390
//////////////////////
391
//
391
//
392
// RIPPER HANG
392
// RIPPER HANG
393
//
393
//
394
//////////////////////
394
//////////////////////
395
395
396
#define RIPPER_HANG_RATE 14
396
#define RIPPER_HANG_RATE 14
397
ANIMATOR DoRipperHang;
397
ANIMATOR DoRipperHang;
398
398
399
STATE s_RipperHang[5][4] =
399
STATE s_RipperHang[5][4] =
400
{
400
{
401
    {
401
    {
402
        {RIPPER_HANG_R0 + 0, RIPPER_HANG_RATE, DoRipperHang, &s_RipperHang[0][0]},
402
        {RIPPER_HANG_R0 + 0, RIPPER_HANG_RATE, DoRipperHang, &s_RipperHang[0][0]},
403
    },
403
    },
404
    {
404
    {
405
        {RIPPER_HANG_R1 + 0, RIPPER_HANG_RATE, DoRipperHang, &s_RipperHang[1][0]},
405
        {RIPPER_HANG_R1 + 0, RIPPER_HANG_RATE, DoRipperHang, &s_RipperHang[1][0]},
406
    },
406
    },
407
    {
407
    {
408
        {RIPPER_HANG_R2 + 0, RIPPER_HANG_RATE, DoRipperHang, &s_RipperHang[2][0]},
408
        {RIPPER_HANG_R2 + 0, RIPPER_HANG_RATE, DoRipperHang, &s_RipperHang[2][0]},
409
    },
409
    },
410
    {
410
    {
411
        {RIPPER_HANG_R3 + 0, RIPPER_HANG_RATE, DoRipperHang, &s_RipperHang[3][0]},
411
        {RIPPER_HANG_R3 + 0, RIPPER_HANG_RATE, DoRipperHang, &s_RipperHang[3][0]},
412
    },
412
    },
413
    {
413
    {
414
        {RIPPER_HANG_R4 + 0, RIPPER_HANG_RATE, DoRipperHang, &s_RipperHang[4][0]},
414
        {RIPPER_HANG_R4 + 0, RIPPER_HANG_RATE, DoRipperHang, &s_RipperHang[4][0]},
415
    }
415
    }
416
};
416
};
417
417
418
418
419
STATEp sg_RipperHang[] =
419
STATEp sg_RipperHang[] =
420
{
420
{
421
    &s_RipperHang[0][0],
421
    &s_RipperHang[0][0],
422
    &s_RipperHang[1][0],
422
    &s_RipperHang[1][0],
423
    &s_RipperHang[2][0],
423
    &s_RipperHang[2][0],
424
    &s_RipperHang[3][0],
424
    &s_RipperHang[3][0],
425
    &s_RipperHang[4][0]
425
    &s_RipperHang[4][0]
426
};
426
};
427
427
428
428
429
//////////////////////
429
//////////////////////
430
//
430
//
431
// RIPPER PAIN
431
// RIPPER PAIN
432
//
432
//
433
//////////////////////
433
//////////////////////
434
434
435
#define RIPPER_PAIN_RATE 38
435
#define RIPPER_PAIN_RATE 38
436
ANIMATOR DoRipperPain;
436
ANIMATOR DoRipperPain;
437
437
438
STATE s_RipperPain[5][1] =
438
STATE s_RipperPain[5][1] =
439
{
439
{
440
    {
440
    {
441
        {RIPPER_JUMP_R0 + 0, RIPPER_PAIN_RATE, DoRipperPain, &s_RipperPain[0][0]},
441
        {RIPPER_JUMP_R0 + 0, RIPPER_PAIN_RATE, DoRipperPain, &s_RipperPain[0][0]},
442
    },
442
    },
443
    {
443
    {
444
        {RIPPER_JUMP_R0 + 0, RIPPER_PAIN_RATE, DoRipperPain, &s_RipperPain[1][0]},
444
        {RIPPER_JUMP_R0 + 0, RIPPER_PAIN_RATE, DoRipperPain, &s_RipperPain[1][0]},
445
    },
445
    },
446
    {
446
    {
447
        {RIPPER_JUMP_R0 + 0, RIPPER_PAIN_RATE, DoRipperPain, &s_RipperPain[2][0]},
447
        {RIPPER_JUMP_R0 + 0, RIPPER_PAIN_RATE, DoRipperPain, &s_RipperPain[2][0]},
448
    },
448
    },
449
    {
449
    {
450
        {RIPPER_JUMP_R0 + 0, RIPPER_PAIN_RATE, DoRipperPain, &s_RipperPain[3][0]},
450
        {RIPPER_JUMP_R0 + 0, RIPPER_PAIN_RATE, DoRipperPain, &s_RipperPain[3][0]},
451
    },
451
    },
452
    {
452
    {
453
        {RIPPER_JUMP_R0 + 0, RIPPER_PAIN_RATE, DoRipperPain, &s_RipperPain[4][0]},
453
        {RIPPER_JUMP_R0 + 0, RIPPER_PAIN_RATE, DoRipperPain, &s_RipperPain[4][0]},
454
    }
454
    }
455
};
455
};
456
456
457
STATEp sg_RipperPain[] =
457
STATEp sg_RipperPain[] =
458
{
458
{
459
    &s_RipperPain[0][0],
459
    &s_RipperPain[0][0],
460
    &s_RipperPain[1][0],
460
    &s_RipperPain[1][0],
461
    &s_RipperPain[2][0],
461
    &s_RipperPain[2][0],
462
    &s_RipperPain[3][0],
462
    &s_RipperPain[3][0],
463
    &s_RipperPain[4][0]
463
    &s_RipperPain[4][0]
464
};
464
};
465
465
466
//////////////////////
466
//////////////////////
467
//
467
//
468
// RIPPER JUMP
468
// RIPPER JUMP
469
//
469
//
470
//////////////////////
470
//////////////////////
471
471
472
#define RIPPER_JUMP_RATE 25
472
#define RIPPER_JUMP_RATE 25
473
473
474
STATE s_RipperJump[5][6] =
474
STATE s_RipperJump[5][6] =
475
{
475
{
476
    {
476
    {
477
        {RIPPER_JUMP_R0 + 0, RIPPER_JUMP_RATE, NullRipper, &s_RipperJump[0][1]},
477
        {RIPPER_JUMP_R0 + 0, RIPPER_JUMP_RATE, NullRipper, &s_RipperJump[0][1]},
478
        {RIPPER_JUMP_R0 + 1, RIPPER_JUMP_RATE, DoRipperMoveJump, &s_RipperJump[0][1]},
478
        {RIPPER_JUMP_R0 + 1, RIPPER_JUMP_RATE, DoRipperMoveJump, &s_RipperJump[0][1]},
479
    },
479
    },
480
    {
480
    {
481
        {RIPPER_JUMP_R1 + 0, RIPPER_JUMP_RATE, NullRipper, &s_RipperJump[1][1]},
481
        {RIPPER_JUMP_R1 + 0, RIPPER_JUMP_RATE, NullRipper, &s_RipperJump[1][1]},
482
        {RIPPER_JUMP_R1 + 1, RIPPER_JUMP_RATE, DoRipperMoveJump, &s_RipperJump[1][1]},
482
        {RIPPER_JUMP_R1 + 1, RIPPER_JUMP_RATE, DoRipperMoveJump, &s_RipperJump[1][1]},
483
    },
483
    },
484
    {
484
    {
485
        {RIPPER_JUMP_R2 + 0, RIPPER_JUMP_RATE, NullRipper, &s_RipperJump[2][1]},
485
        {RIPPER_JUMP_R2 + 0, RIPPER_JUMP_RATE, NullRipper, &s_RipperJump[2][1]},
486
        {RIPPER_JUMP_R2 + 1, RIPPER_JUMP_RATE, DoRipperMoveJump, &s_RipperJump[2][1]},
486
        {RIPPER_JUMP_R2 + 1, RIPPER_JUMP_RATE, DoRipperMoveJump, &s_RipperJump[2][1]},
487
    },
487
    },
488
    {
488
    {
489
        {RIPPER_JUMP_R3 + 0, RIPPER_JUMP_RATE, NullRipper, &s_RipperJump[3][1]},
489
        {RIPPER_JUMP_R3 + 0, RIPPER_JUMP_RATE, NullRipper, &s_RipperJump[3][1]},
490
        {RIPPER_JUMP_R3 + 1, RIPPER_JUMP_RATE, DoRipperMoveJump, &s_RipperJump[3][1]},
490
        {RIPPER_JUMP_R3 + 1, RIPPER_JUMP_RATE, DoRipperMoveJump, &s_RipperJump[3][1]},
491
    },
491
    },
492
    {
492
    {
493
        {RIPPER_JUMP_R4 + 0, RIPPER_JUMP_RATE, NullRipper, &s_RipperJump[4][1]},
493
        {RIPPER_JUMP_R4 + 0, RIPPER_JUMP_RATE, NullRipper, &s_RipperJump[4][1]},
494
        {RIPPER_JUMP_R4 + 1, RIPPER_JUMP_RATE, DoRipperMoveJump, &s_RipperJump[4][1]},
494
        {RIPPER_JUMP_R4 + 1, RIPPER_JUMP_RATE, DoRipperMoveJump, &s_RipperJump[4][1]},
495
    }
495
    }
496
};
496
};
497
497
498
498
499
STATEp sg_RipperJump[] =
499
STATEp sg_RipperJump[] =
500
{
500
{
501
    &s_RipperJump[0][0],
501
    &s_RipperJump[0][0],
502
    &s_RipperJump[1][0],
502
    &s_RipperJump[1][0],
503
    &s_RipperJump[2][0],
503
    &s_RipperJump[2][0],
504
    &s_RipperJump[3][0],
504
    &s_RipperJump[3][0],
505
    &s_RipperJump[4][0]
505
    &s_RipperJump[4][0]
506
};
506
};
507
507
508
508
509
//////////////////////
509
//////////////////////
510
//
510
//
511
// RIPPER FALL
511
// RIPPER FALL
512
//
512
//
513
//////////////////////
513
//////////////////////
514
514
515
#define RIPPER_FALL_RATE 25
515
#define RIPPER_FALL_RATE 25
516
516
517
STATE s_RipperFall[5][6] =
517
STATE s_RipperFall[5][6] =
518
{
518
{
519
    {
519
    {
520
        {RIPPER_FALL_R0 + 0, RIPPER_FALL_RATE, DoRipperMoveJump, &s_RipperFall[0][0]},
520
        {RIPPER_FALL_R0 + 0, RIPPER_FALL_RATE, DoRipperMoveJump, &s_RipperFall[0][0]},
521
    },
521
    },
522
    {
522
    {
523
        {RIPPER_FALL_R1 + 0, RIPPER_FALL_RATE, DoRipperMoveJump, &s_RipperFall[1][0]},
523
        {RIPPER_FALL_R1 + 0, RIPPER_FALL_RATE, DoRipperMoveJump, &s_RipperFall[1][0]},
524
    },
524
    },
525
    {
525
    {
526
        {RIPPER_FALL_R2 + 0, RIPPER_FALL_RATE, DoRipperMoveJump, &s_RipperFall[2][0]},
526
        {RIPPER_FALL_R2 + 0, RIPPER_FALL_RATE, DoRipperMoveJump, &s_RipperFall[2][0]},
527
    },
527
    },
528
    {
528
    {
529
        {RIPPER_FALL_R3 + 0, RIPPER_FALL_RATE, DoRipperMoveJump, &s_RipperFall[3][0]},
529
        {RIPPER_FALL_R3 + 0, RIPPER_FALL_RATE, DoRipperMoveJump, &s_RipperFall[3][0]},
530
    },
530
    },
531
    {
531
    {
532
        {RIPPER_FALL_R4 + 0, RIPPER_FALL_RATE, DoRipperMoveJump, &s_RipperFall[4][0]},
532
        {RIPPER_FALL_R4 + 0, RIPPER_FALL_RATE, DoRipperMoveJump, &s_RipperFall[4][0]},
533
    }
533
    }
534
};
534
};
535
535
536
536
537
STATEp sg_RipperFall[] =
537
STATEp sg_RipperFall[] =
538
{
538
{
539
    &s_RipperFall[0][0],
539
    &s_RipperFall[0][0],
540
    &s_RipperFall[1][0],
540
    &s_RipperFall[1][0],
541
    &s_RipperFall[2][0],
541
    &s_RipperFall[2][0],
542
    &s_RipperFall[3][0],
542
    &s_RipperFall[3][0],
543
    &s_RipperFall[4][0]
543
    &s_RipperFall[4][0]
544
};
544
};
545
545
546
546
547
//////////////////////
547
//////////////////////
548
//
548
//
549
// RIPPER JUMP ATTACK
549
// RIPPER JUMP ATTACK
550
//
550
//
551
//////////////////////
551
//////////////////////
552
552
553
#define RIPPER_JUMP_ATTACK_RATE 35
553
#define RIPPER_JUMP_ATTACK_RATE 35
554
int DoRipperBeginJumpAttack(short SpriteNum);
554
int DoRipperBeginJumpAttack(short SpriteNum);
555
555
556
STATE s_RipperJumpAttack[5][6] =
556
STATE s_RipperJumpAttack[5][6] =
557
{
557
{
558
    {
558
    {
559
        {RIPPER_JUMP_R0 + 0, RIPPER_JUMP_ATTACK_RATE, NullRipper, &s_RipperJumpAttack[0][1]},
559
        {RIPPER_JUMP_R0 + 0, RIPPER_JUMP_ATTACK_RATE, NullRipper, &s_RipperJumpAttack[0][1]},
560
        {RIPPER_JUMP_R0 + 0, 0 | SF_QUICK_CALL, DoRipperBeginJumpAttack, &s_RipperJumpAttack[0][2]},
560
        {RIPPER_JUMP_R0 + 0, 0 | SF_QUICK_CALL, DoRipperBeginJumpAttack, &s_RipperJumpAttack[0][2]},
561
        {RIPPER_JUMP_R0 + 1, RIPPER_JUMP_ATTACK_RATE, DoRipperMoveJump, &s_RipperJumpAttack[0][2]},
561
        {RIPPER_JUMP_R0 + 1, RIPPER_JUMP_ATTACK_RATE, DoRipperMoveJump, &s_RipperJumpAttack[0][2]},
562
    },
562
    },
563
    {
563
    {
564
        {RIPPER_JUMP_R1 + 0, RIPPER_JUMP_ATTACK_RATE, NullRipper, &s_RipperJumpAttack[1][1]},
564
        {RIPPER_JUMP_R1 + 0, RIPPER_JUMP_ATTACK_RATE, NullRipper, &s_RipperJumpAttack[1][1]},
565
        {RIPPER_JUMP_R1 + 0, 0 | SF_QUICK_CALL, DoRipperBeginJumpAttack, &s_RipperJumpAttack[1][2]},
565
        {RIPPER_JUMP_R1 + 0, 0 | SF_QUICK_CALL, DoRipperBeginJumpAttack, &s_RipperJumpAttack[1][2]},
566
        {RIPPER_JUMP_R1 + 1, RIPPER_JUMP_ATTACK_RATE, DoRipperMoveJump, &s_RipperJumpAttack[1][2]},
566
        {RIPPER_JUMP_R1 + 1, RIPPER_JUMP_ATTACK_RATE, DoRipperMoveJump, &s_RipperJumpAttack[1][2]},
567
    },
567
    },
568
    {
568
    {
569
        {RIPPER_JUMP_R2 + 0, RIPPER_JUMP_ATTACK_RATE, NullRipper, &s_RipperJumpAttack[2][1]},
569
        {RIPPER_JUMP_R2 + 0, RIPPER_JUMP_ATTACK_RATE, NullRipper, &s_RipperJumpAttack[2][1]},
570
        {RIPPER_JUMP_R2 + 0, 0 | SF_QUICK_CALL, DoRipperBeginJumpAttack, &s_RipperJumpAttack[2][2]},
570
        {RIPPER_JUMP_R2 + 0, 0 | SF_QUICK_CALL, DoRipperBeginJumpAttack, &s_RipperJumpAttack[2][2]},
571
        {RIPPER_JUMP_R2 + 1, RIPPER_JUMP_ATTACK_RATE, DoRipperMoveJump, &s_RipperJumpAttack[2][2]},
571
        {RIPPER_JUMP_R2 + 1, RIPPER_JUMP_ATTACK_RATE, DoRipperMoveJump, &s_RipperJumpAttack[2][2]},
572
    },
572
    },
573
    {
573
    {
574
        {RIPPER_JUMP_R3 + 0, RIPPER_JUMP_ATTACK_RATE, NullRipper, &s_RipperJumpAttack[3][1]},
574
        {RIPPER_JUMP_R3 + 0, RIPPER_JUMP_ATTACK_RATE, NullRipper, &s_RipperJumpAttack[3][1]},
575
        {RIPPER_JUMP_R3 + 0, 0 | SF_QUICK_CALL, DoRipperBeginJumpAttack, &s_RipperJumpAttack[3][2]},
575
        {RIPPER_JUMP_R3 + 0, 0 | SF_QUICK_CALL, DoRipperBeginJumpAttack, &s_RipperJumpAttack[3][2]},
576
        {RIPPER_JUMP_R3 + 1, RIPPER_JUMP_ATTACK_RATE, DoRipperMoveJump, &s_RipperJumpAttack[3][2]},
576
        {RIPPER_JUMP_R3 + 1, RIPPER_JUMP_ATTACK_RATE, DoRipperMoveJump, &s_RipperJumpAttack[3][2]},
577
    },
577
    },
578
    {
578
    {
579
        {RIPPER_JUMP_R4 + 0, RIPPER_JUMP_ATTACK_RATE, NullRipper, &s_RipperJumpAttack[4][1]},
579
        {RIPPER_JUMP_R4 + 0, RIPPER_JUMP_ATTACK_RATE, NullRipper, &s_RipperJumpAttack[4][1]},
580
        {RIPPER_JUMP_R4 + 0, 0 | SF_QUICK_CALL, DoRipperBeginJumpAttack, &s_RipperJumpAttack[4][2]},
580
        {RIPPER_JUMP_R4 + 0, 0 | SF_QUICK_CALL, DoRipperBeginJumpAttack, &s_RipperJumpAttack[4][2]},
581
        {RIPPER_JUMP_R4 + 1, RIPPER_JUMP_ATTACK_RATE, DoRipperMoveJump, &s_RipperJumpAttack[4][2]},
581
        {RIPPER_JUMP_R4 + 1, RIPPER_JUMP_ATTACK_RATE, DoRipperMoveJump, &s_RipperJumpAttack[4][2]},
582
    }
582
    }
583
};
583
};
584
584
585
585
586
STATEp sg_RipperJumpAttack[] =
586
STATEp sg_RipperJumpAttack[] =
587
{
587
{
588
    &s_RipperJumpAttack[0][0],
588
    &s_RipperJumpAttack[0][0],
589
    &s_RipperJumpAttack[1][0],
589
    &s_RipperJumpAttack[1][0],
590
    &s_RipperJumpAttack[2][0],
590
    &s_RipperJumpAttack[2][0],
591
    &s_RipperJumpAttack[3][0],
591
    &s_RipperJumpAttack[3][0],
592
    &s_RipperJumpAttack[4][0]
592
    &s_RipperJumpAttack[4][0]
593
};
593
};
594
594
595
595
596
//////////////////////
596
//////////////////////
597
//
597
//
598
// RIPPER HANG_JUMP
598
// RIPPER HANG_JUMP
599
//
599
//
600
//////////////////////
600
//////////////////////
601
601
602
#define RIPPER_HANG_JUMP_RATE 20
602
#define RIPPER_HANG_JUMP_RATE 20
603
603
604
STATE s_RipperHangJump[5][6] =
604
STATE s_RipperHangJump[5][6] =
605
{
605
{
606
    {
606
    {
607
        {RIPPER_JUMP_R0 + 0, RIPPER_HANG_JUMP_RATE, NullRipper, &s_RipperHangJump[0][1]},
607
        {RIPPER_JUMP_R0 + 0, RIPPER_HANG_JUMP_RATE, NullRipper, &s_RipperHangJump[0][1]},
608
        {RIPPER_JUMP_R0 + 1, RIPPER_HANG_JUMP_RATE, DoRipperHangJF, &s_RipperHangJump[0][1]},
608
        {RIPPER_JUMP_R0 + 1, RIPPER_HANG_JUMP_RATE, DoRipperHangJF, &s_RipperHangJump[0][1]},
609
    },
609
    },
610
    {
610
    {
611
        {RIPPER_JUMP_R1 + 0, RIPPER_HANG_JUMP_RATE, NullRipper, &s_RipperHangJump[1][1]},
611
        {RIPPER_JUMP_R1 + 0, RIPPER_HANG_JUMP_RATE, NullRipper, &s_RipperHangJump[1][1]},
612
        {RIPPER_JUMP_R1 + 1, RIPPER_HANG_JUMP_RATE, DoRipperHangJF, &s_RipperHangJump[1][1]},
612
        {RIPPER_JUMP_R1 + 1, RIPPER_HANG_JUMP_RATE, DoRipperHangJF, &s_RipperHangJump[1][1]},
613
    },
613
    },
614
    {
614
    {
615
        {RIPPER_JUMP_R2 + 0, RIPPER_HANG_JUMP_RATE, NullRipper, &s_RipperHangJump[2][1]},
615
        {RIPPER_JUMP_R2 + 0, RIPPER_HANG_JUMP_RATE, NullRipper, &s_RipperHangJump[2][1]},
616
        {RIPPER_JUMP_R2 + 1, RIPPER_HANG_JUMP_RATE, DoRipperHangJF, &s_RipperHangJump[2][1]},
616
        {RIPPER_JUMP_R2 + 1, RIPPER_HANG_JUMP_RATE, DoRipperHangJF, &s_RipperHangJump[2][1]},
617
    },
617
    },
618
    {
618
    {
619
        {RIPPER_JUMP_R3 + 0, RIPPER_HANG_JUMP_RATE, NullRipper, &s_RipperHangJump[3][1]},
619
        {RIPPER_JUMP_R3 + 0, RIPPER_HANG_JUMP_RATE, NullRipper, &s_RipperHangJump[3][1]},
620
        {RIPPER_JUMP_R3 + 1, RIPPER_HANG_JUMP_RATE, DoRipperHangJF, &s_RipperHangJump[3][1]},
620
        {RIPPER_JUMP_R3 + 1, RIPPER_HANG_JUMP_RATE, DoRipperHangJF, &s_RipperHangJump[3][1]},
621
    },
621
    },
622
    {
622
    {
623
        {RIPPER_JUMP_R4 + 0, RIPPER_HANG_JUMP_RATE, NullRipper, &s_RipperHangJump[4][1]},
623
        {RIPPER_JUMP_R4 + 0, RIPPER_HANG_JUMP_RATE, NullRipper, &s_RipperHangJump[4][1]},
624
        {RIPPER_JUMP_R4 + 1, RIPPER_HANG_JUMP_RATE, DoRipperHangJF, &s_RipperHangJump[4][1]},
624
        {RIPPER_JUMP_R4 + 1, RIPPER_HANG_JUMP_RATE, DoRipperHangJF, &s_RipperHangJump[4][1]},
625
    }
625
    }
626
};
626
};
627
627
628
628
629
STATEp sg_RipperHangJump[] =
629
STATEp sg_RipperHangJump[] =
630
{
630
{
631
    &s_RipperHangJump[0][0],
631
    &s_RipperHangJump[0][0],
632
    &s_RipperHangJump[1][0],
632
    &s_RipperHangJump[1][0],
633
    &s_RipperHangJump[2][0],
633
    &s_RipperHangJump[2][0],
634
    &s_RipperHangJump[3][0],
634
    &s_RipperHangJump[3][0],
635
    &s_RipperHangJump[4][0]
635
    &s_RipperHangJump[4][0]
636
};
636
};
637
637
638
//////////////////////
638
//////////////////////
639
//
639
//
640
// RIPPER HANG_FALL
640
// RIPPER HANG_FALL
641
//
641
//
642
//////////////////////
642
//////////////////////
643
643
644
#define RIPPER_FALL_RATE 25
644
#define RIPPER_FALL_RATE 25
645
645
646
STATE s_RipperHangFall[5][6] =
646
STATE s_RipperHangFall[5][6] =
647
{
647
{
648
    {
648
    {
649
        {RIPPER_FALL_R0 + 0, RIPPER_FALL_RATE, DoRipperHangJF, &s_RipperHangFall[0][0]},
649
        {RIPPER_FALL_R0 + 0, RIPPER_FALL_RATE, DoRipperHangJF, &s_RipperHangFall[0][0]},
650
    },
650
    },
651
    {
651
    {
652
        {RIPPER_FALL_R1 + 0, RIPPER_FALL_RATE, DoRipperHangJF, &s_RipperHangFall[1][0]},
652
        {RIPPER_FALL_R1 + 0, RIPPER_FALL_RATE, DoRipperHangJF, &s_RipperHangFall[1][0]},
653
    },
653
    },
654
    {
654
    {
655
        {RIPPER_FALL_R2 + 0, RIPPER_FALL_RATE, DoRipperHangJF, &s_RipperHangFall[2][0]},
655
        {RIPPER_FALL_R2 + 0, RIPPER_FALL_RATE, DoRipperHangJF, &s_RipperHangFall[2][0]},
656
    },
656
    },
657
    {
657
    {
658
        {RIPPER_FALL_R3 + 0, RIPPER_FALL_RATE, DoRipperHangJF, &s_RipperHangFall[3][0]},
658
        {RIPPER_FALL_R3 + 0, RIPPER_FALL_RATE, DoRipperHangJF, &s_RipperHangFall[3][0]},
659
    },
659
    },
660
    {
660
    {
661
        {RIPPER_FALL_R4 + 0, RIPPER_FALL_RATE, DoRipperHangJF, &s_RipperHangFall[4][0]},
661
        {RIPPER_FALL_R4 + 0, RIPPER_FALL_RATE, DoRipperHangJF, &s_RipperHangFall[4][0]},
662
    }
662
    }
663
};
663
};
664
664
665
665
666
STATEp sg_RipperHangFall[] =
666
STATEp sg_RipperHangFall[] =
667
{
667
{
668
    &s_RipperHangFall[0][0],
668
    &s_RipperHangFall[0][0],
669
    &s_RipperHangFall[1][0],
669
    &s_RipperHangFall[1][0],
670
    &s_RipperHangFall[2][0],
670
    &s_RipperHangFall[2][0],
671
    &s_RipperHangFall[3][0],
671
    &s_RipperHangFall[3][0],
672
    &s_RipperHangFall[4][0]
672
    &s_RipperHangFall[4][0]
673
};
673
};
674
674
675
675
676
676
677
//////////////////////
677
//////////////////////
678
//
678
//
679
// RIPPER DIE
679
// RIPPER DIE
680
//
680
//
681
//////////////////////
681
//////////////////////
682
682
683
#define RIPPER_DIE_RATE 16
683
#define RIPPER_DIE_RATE 16
684
684
685
STATE s_RipperDie[] =
685
STATE s_RipperDie[] =
686
{
686
{
687
    {RIPPER_DIE + 0, RIPPER_DIE_RATE, NullRipper, &s_RipperDie[1]},
687
    {RIPPER_DIE + 0, RIPPER_DIE_RATE, NullRipper, &s_RipperDie[1]},
688
    {RIPPER_DIE + 1, RIPPER_DIE_RATE, NullRipper, &s_RipperDie[2]},
688
    {RIPPER_DIE + 1, RIPPER_DIE_RATE, NullRipper, &s_RipperDie[2]},
689
    {RIPPER_DIE + 2, RIPPER_DIE_RATE, NullRipper, &s_RipperDie[3]},
689
    {RIPPER_DIE + 2, RIPPER_DIE_RATE, NullRipper, &s_RipperDie[3]},
690
    {RIPPER_DIE + 3, RIPPER_DIE_RATE, NullRipper, &s_RipperDie[4]},
690
    {RIPPER_DIE + 3, RIPPER_DIE_RATE, NullRipper, &s_RipperDie[4]},
691
    {RIPPER_DEAD, RIPPER_DIE_RATE, DoActorDebris, &s_RipperDie[4]},
691
    {RIPPER_DEAD, RIPPER_DIE_RATE, DoActorDebris, &s_RipperDie[4]},
692
};
692
};
693
693
694
#define RIPPER_DEAD_RATE 8
694
#define RIPPER_DEAD_RATE 8
695
695
696
STATE s_RipperDead[] =
696
STATE s_RipperDead[] =
697
{
697
{
698
    {RIPPER_DIE + 2, RIPPER_DEAD_RATE, NullAnimator, &s_RipperDead[1]},
698
    {RIPPER_DIE + 2, RIPPER_DEAD_RATE, NullAnimator, &s_RipperDead[1]},
699
    {RIPPER_DIE + 3, RIPPER_DEAD_RATE, NullAnimator, &s_RipperDead[2]},
699
    {RIPPER_DIE + 3, RIPPER_DEAD_RATE, NullAnimator, &s_RipperDead[2]},
700
    {RIPPER_DEAD, SF_QUICK_CALL, QueueFloorBlood, &s_RipperDead[3]},
700
    {RIPPER_DEAD, SF_QUICK_CALL, QueueFloorBlood, &s_RipperDead[3]},
701
    {RIPPER_DEAD, RIPPER_DEAD_RATE, DoActorDebris, &s_RipperDead[3]},
701
    {RIPPER_DEAD, RIPPER_DEAD_RATE, DoActorDebris, &s_RipperDead[3]},
702
};
702
};
703
703
704
STATEp sg_RipperDie[] =
704
STATEp sg_RipperDie[] =
705
{
705
{
706
    s_RipperDie
706
    s_RipperDie
707
};
707
};
708
708
709
STATEp sg_RipperDead[] =
709
STATEp sg_RipperDead[] =
710
{
710
{
711
    s_RipperDead
711
    s_RipperDead
712
};
712
};
713
713
714
STATE s_RipperDeathJump[] =
714
STATE s_RipperDeathJump[] =
715
{
715
{
716
    {RIPPER_DIE + 0, RIPPER_DIE_RATE, DoActorDeathMove, &s_RipperDeathJump[0]}
716
    {RIPPER_DIE + 0, RIPPER_DIE_RATE, DoActorDeathMove, &s_RipperDeathJump[0]}
717
};
717
};
718
718
719
STATE s_RipperDeathFall[] =
719
STATE s_RipperDeathFall[] =
720
{
720
{
721
    {RIPPER_DIE + 1, RIPPER_DIE_RATE, DoActorDeathMove, &s_RipperDeathFall[0]}
721
    {RIPPER_DIE + 1, RIPPER_DIE_RATE, DoActorDeathMove, &s_RipperDeathFall[0]}
722
};
722
};
723
723
724
724
725
STATEp sg_RipperDeathJump[] =
725
STATEp sg_RipperDeathJump[] =
726
{
726
{
727
    s_RipperDeathJump
727
    s_RipperDeathJump
728
};
728
};
729
729
730
STATEp sg_RipperDeathFall[] =
730
STATEp sg_RipperDeathFall[] =
731
{
731
{
732
    s_RipperDeathFall
732
    s_RipperDeathFall
733
};
733
};
734
734
735
735
736
/*
736
/*
737
STATEp *Stand[MAX_WEAPONS];
737
STATEp *Stand[MAX_WEAPONS];
738
STATEp *Run;
738
STATEp *Run;
739
STATEp *Jump;
739
STATEp *Jump;
740
STATEp *Fall;
740
STATEp *Fall;
741
STATEp *Crawl;
741
STATEp *Crawl;
742
STATEp *Swim;
742
STATEp *Swim;
743
STATEp *Fly;
743
STATEp *Fly;
744
STATEp *Rise;
744
STATEp *Rise;
745
STATEp *Sit;
745
STATEp *Sit;
746
STATEp *Look;
746
STATEp *Look;
747
STATEp *Climb;
747
STATEp *Climb;
748
STATEp *Pain;
748
STATEp *Pain;
749
STATEp *Death1;
749
STATEp *Death1;
750
STATEp *Death2;
750
STATEp *Death2;
751
STATEp *Dead;
751
STATEp *Dead;
752
STATEp *DeathJump;
752
STATEp *DeathJump;
753
STATEp *DeathFall;
753
STATEp *DeathFall;
754
STATEp *CloseAttack[2];
754
STATEp *CloseAttack[2];
755
STATEp *Attack[6];
755
STATEp *Attack[6];
756
STATEp *Special[2];
756
STATEp *Special[2];
757
*/
757
*/
758
758
759
759
760
ACTOR_ACTION_SET RipperActionSet =
760
ACTOR_ACTION_SET RipperActionSet =
761
{
761
{
762
    sg_RipperStand,
762
    sg_RipperStand,
763
    sg_RipperRun,
763
    sg_RipperRun,
764
    sg_RipperJump,
764
    sg_RipperJump,
765
    sg_RipperFall,
765
    sg_RipperFall,
766
    NULL,                               // sg_RipperCrawl,
766
    NULL,                               // sg_RipperCrawl,
767
    NULL,                               // sg_RipperSwim,
767
    NULL,                               // sg_RipperSwim,
768
    NULL,                               // sg_RipperFly,
768
    NULL,                               // sg_RipperFly,
769
    NULL,                               // sg_RipperRise,
769
    NULL,                               // sg_RipperRise,
770
    NULL,                               // sg_RipperSit,
770
    NULL,                               // sg_RipperSit,
771
    NULL,                               // sg_RipperLook,
771
    NULL,                               // sg_RipperLook,
772
    NULL,                               // climb
772
    NULL,                               // climb
773
    sg_RipperPain,
773
    sg_RipperPain,
774
    sg_RipperDie,
774
    sg_RipperDie,
775
    NULL,                               // sg_RipperHariKari,
775
    NULL,                               // sg_RipperHariKari,
776
    sg_RipperDead,
776
    sg_RipperDead,
777
    sg_RipperDeathJump,
777
    sg_RipperDeathJump,
778
    sg_RipperDeathFall,
778
    sg_RipperDeathFall,
779
    {sg_RipperSwipe,sg_RipperSpew},
779
    {sg_RipperSwipe,sg_RipperSpew},
780
    {800,1024},
780
    {800,1024},
781
    {sg_RipperJumpAttack, sg_RipperSpew},
781
    {sg_RipperJumpAttack, sg_RipperSpew},
782
    {400, 1024},
782
    {400, 1024},
783
    {sg_RipperHeart, sg_RipperHang},
783
    {sg_RipperHeart, sg_RipperHang},
784
    NULL,
784
    NULL,
785
    NULL
785
    NULL
786
};
786
};
787
787
788
ACTOR_ACTION_SET RipperBrownActionSet =
788
ACTOR_ACTION_SET RipperBrownActionSet =
789
{
789
{
790
    sg_RipperStand,
790
    sg_RipperStand,
791
    sg_RipperRun,
791
    sg_RipperRun,
792
    sg_RipperJump,
792
    sg_RipperJump,
793
    sg_RipperFall,
793
    sg_RipperFall,
794
    NULL,                               // sg_RipperCrawl,
794
    NULL,                               // sg_RipperCrawl,
795
    NULL,                               // sg_RipperSwim,
795
    NULL,                               // sg_RipperSwim,
796
    NULL,                               // sg_RipperFly,
796
    NULL,                               // sg_RipperFly,
797
    NULL,                               // sg_RipperRise,
797
    NULL,                               // sg_RipperRise,
798
    NULL,                               // sg_RipperSit,
798
    NULL,                               // sg_RipperSit,
799
    NULL,                               // sg_RipperLook,
799
    NULL,                               // sg_RipperLook,
800
    NULL,                               // climb
800
    NULL,                               // climb
801
    sg_RipperPain,                      // pain
801
    sg_RipperPain,                      // pain
802
    sg_RipperDie,
802
    sg_RipperDie,
803
    NULL,                               // sg_RipperHariKari,
803
    NULL,                               // sg_RipperHariKari,
804
    sg_RipperDead,
804
    sg_RipperDead,
805
    sg_RipperDeathJump,
805
    sg_RipperDeathJump,
806
    sg_RipperDeathFall,
806
    sg_RipperDeathFall,
807
    {sg_RipperSwipe},
807
    {sg_RipperSwipe},
808
    {1024},
808
    {1024},
809
    {sg_RipperJumpAttack, sg_RipperSwipe},
809
    {sg_RipperJumpAttack, sg_RipperSwipe},
810
    {800, 1024},
810
    {800, 1024},
811
    {sg_RipperHeart, sg_RipperHang},
811
    {sg_RipperHeart, sg_RipperHang},
812
    NULL,
812
    NULL,
813
    NULL
813
    NULL
814
};
814
};
815
815
816
int
816
int
817
SetupRipper(short SpriteNum)
817
SetupRipper(short SpriteNum)
818
{
818
{
819
    SPRITEp sp = &sprite[SpriteNum];
819
    SPRITEp sp = &sprite[SpriteNum];
820
    USERp u;
820
    USERp u;
821
    ANIMATOR DoActorDecide;
821
    ANIMATOR DoActorDecide;
822
822
823
    if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
823
    if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
824
    {
824
    {
825
        u = User[SpriteNum];
825
        u = User[SpriteNum];
826
        ASSERT(u);
826
        ASSERT(u);
827
    }
827
    }
828
    else
828
    else
829
    {
829
    {
830
        User[SpriteNum] = u = SpawnUser(SpriteNum, RIPPER_RUN_R0, s_RipperRun[0]);
830
        User[SpriteNum] = u = SpawnUser(SpriteNum, RIPPER_RUN_R0, s_RipperRun[0]);
831
        u->Health = HEALTH_RIPPER/2; // Baby rippers are weaker
831
        u->Health = HEALTH_RIPPER/2; // Baby rippers are weaker
832
    }
832
    }
833
833
834
    ChangeState(SpriteNum, s_RipperRun[0]);
834
    ChangeState(SpriteNum, s_RipperRun[0]);
835
    u->Attrib = &RipperAttrib;
835
    u->Attrib = &RipperAttrib;
836
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
836
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
837
    u->StateEnd = s_RipperDie;
837
    u->StateEnd = s_RipperDie;
838
    u->Rot = sg_RipperRun;
838
    u->Rot = sg_RipperRun;
839
    sp->xrepeat = 64;
839
    sp->xrepeat = 64;
840
    sp->yrepeat = 64;
840
    sp->yrepeat = 64;
841
841
842
    if (sp->pal == PALETTE_BROWN_RIPPER)
842
    if (sp->pal == PALETTE_BROWN_RIPPER)
843
    {
843
    {
844
        EnemyDefaults(SpriteNum, &RipperBrownActionSet, &RipperPersonality);
844
        EnemyDefaults(SpriteNum, &RipperBrownActionSet, &RipperPersonality);
845
        sp->xrepeat = 106;
845
        sp->xrepeat = 106;
846
        sp->yrepeat = 90;
846
        sp->yrepeat = 90;
847
847
848
        if (!TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
848
        if (!TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
849
            u->Health = HEALTH_MOMMA_RIPPER;
849
            u->Health = HEALTH_MOMMA_RIPPER;
850
850
851
        sp->clipdist += 128 >> 2;
851
        sp->clipdist += 128 >> 2;
852
    }
852
    }
853
    else
853
    else
854
    {
854
    {
855
        EnemyDefaults(SpriteNum, &RipperActionSet, &RipperPersonality);
855
        EnemyDefaults(SpriteNum, &RipperActionSet, &RipperPersonality);
856
    }
856
    }
857
857
858
    SET(u->Flags, SPR_XFLIP_TOGGLE);
858
    SET(u->Flags, SPR_XFLIP_TOGGLE);
859
859
860
    return 0;
860
    return 0;
861
}
861
}
862
862
863
int
863
int
864
GetJumpHeight(short jump_speed, short jump_grav)
864
GetJumpHeight(short jump_speed, short jump_grav)
865
{
865
{
866
    int jump_iterations;
866
    int jump_iterations;
867
    int height;
867
    int height;
868
868
869
    jump_speed = labs(jump_speed);
869
    jump_speed = labs(jump_speed);
870
870
871
    jump_iterations = jump_speed / (jump_grav * ACTORMOVETICS);
871
    jump_iterations = jump_speed / (jump_grav * ACTORMOVETICS);
872
872
873
    height = jump_speed * jump_iterations * ACTORMOVETICS;
873
    height = jump_speed * jump_iterations * ACTORMOVETICS;
874
874
875
    height = DIV256(height);
875
    height = DIV256(height);
876
876
877
    return DIV2(height);
877
    return DIV2(height);
878
}
878
}
879
879
880
int
880
int
881
PickJumpSpeed(short SpriteNum, int pix_height)
881
PickJumpSpeed(short SpriteNum, int pix_height)
882
{
882
{
883
    USERp u = User[SpriteNum];
883
    USERp u = User[SpriteNum];
884
884
885
    //ASSERT(pix_height < 128);
885
    //ASSERT(pix_height < 128);
886
886
887
    u->jump_speed = -600;
887
    u->jump_speed = -600;
888
    u->jump_grav = 8;
888
    u->jump_grav = 8;
889
889
890
    while (TRUE)
890
    while (TRUE)
891
    {
891
    {
892
        if (GetJumpHeight(u->jump_speed, u->jump_grav) > pix_height + 20)
892
        if (GetJumpHeight(u->jump_speed, u->jump_grav) > pix_height + 20)
893
            break;
893
            break;
894
894
895
        u->jump_speed -= 100;
895
        u->jump_speed -= 100;
896
896
897
        ASSERT(u->jump_speed > -3000);
897
        ASSERT(u->jump_speed > -3000);
898
    }
898
    }
899
899
900
    return u->jump_speed;
900
    return u->jump_speed;
901
}
901
}
902
902
903
903
904
int
904
int
905
PickJumpMaxSpeed(short SpriteNum, short max_speed)
905
PickJumpMaxSpeed(short SpriteNum, short max_speed)
906
{
906
{
907
    SPRITEp sp = &sprite[SpriteNum];
907
    SPRITEp sp = &sprite[SpriteNum];
908
    USERp u = User[SpriteNum];
908
    USERp u = User[SpriteNum];
909
    int zh;
909
    int zh;
910
910
911
    ASSERT(max_speed < 0);
911
    ASSERT(max_speed < 0);
912
912
913
    u->jump_speed = max_speed;
913
    u->jump_speed = max_speed;
914
    u->jump_grav = 8;
914
    u->jump_grav = 8;
915
915
916
    zh = SPRITEp_TOS(sp);
916
    zh = SPRITEp_TOS(sp);
917
917
918
    while (TRUE)
918
    while (TRUE)
919
    {
919
    {
920
        if (zh - Z(GetJumpHeight(u->jump_speed, u->jump_grav)) - Z(16) > u->hiz)
920
        if (zh - Z(GetJumpHeight(u->jump_speed, u->jump_grav)) - Z(16) > u->hiz)
921
            break;
921
            break;
922
922
923
        u->jump_speed += 100;
923
        u->jump_speed += 100;
924
924
925
        if (u->jump_speed > -200)
925
        if (u->jump_speed > -200)
926
            break;
926
            break;
927
    }
927
    }
928
928
929
    return u->jump_speed;
929
    return u->jump_speed;
930
}
930
}
931
931
932
932
933
//
933
//
934
// HANGING - Jumping/Falling/Stationary
934
// HANGING - Jumping/Falling/Stationary
935
//
935
//
936
936
937
int
937
int
938
InitRipperHang(short SpriteNum)
938
InitRipperHang(short SpriteNum)
939
{
939
{
940
    SPRITEp sp = &sprite[SpriteNum];
940
    SPRITEp sp = &sprite[SpriteNum];
941
    USERp u = User[SpriteNum];
941
    USERp u = User[SpriteNum];
942
    int dist;
942
    int dist;
943
943
944
    hitdata_t hitinfo = { { 0, 0, 0 }, -2, 0, -2 };
944
    hitdata_t hitinfo = { { 0, 0, 0 }, -2, 0, -2 };
945
945
946
    SWBOOL Found = FALSE;
946
    SWBOOL Found = FALSE;
947
    short dang, tang;
947
    short dang, tang;
948
948
949
    for (dang = 0; dang < 2048; dang += 128)
949
    for (dang = 0; dang < 2048; dang += 128)
950
    {
950
    {
951
        tang = NORM_ANGLE(sp->ang + dang);
951
        tang = NORM_ANGLE(sp->ang + dang);
952
952
953
        FAFhitscan(sp->x, sp->y, sp->z - SPRITEp_SIZE_Z(sp), sp->sectnum,  // Start position
953
        FAFhitscan(sp->x, sp->y, sp->z - SPRITEp_SIZE_Z(sp), sp->sectnum,  // Start position
954
                   sintable[NORM_ANGLE(tang + 512)],   // X vector of 3D ang
954
                   sintable[NORM_ANGLE(tang + 512)],   // X vector of 3D ang
955
                   sintable[tang],             // Y vector of 3D ang
955
                   sintable[tang],             // Y vector of 3D ang
956
                   0,                          // Z vector of 3D ang
956
                   0,                          // Z vector of 3D ang
957
                   &hitinfo, CLIPMASK_MISSILE);
957
                   &hitinfo, CLIPMASK_MISSILE);
958
958
959
        //ASSERT(hitinfo.sect >= 0);
959
        //ASSERT(hitinfo.sect >= 0);
960
        if (hitinfo.sect < 0)
960
        if (hitinfo.sect < 0)
961
            continue;
961
            continue;
962
962
963
        dist = Distance(sp->x, sp->y, hitinfo.pos.x, hitinfo.pos.y);
963
        dist = Distance(sp->x, sp->y, hitinfo.pos.x, hitinfo.pos.y);
964
964
965
        if (hitinfo.wall < 0 || dist < 2000 || dist > 7000)
965
        if (hitinfo.wall < 0 || dist < 2000 || dist > 7000)
966
        {
966
        {
967
            continue;
967
            continue;
968
        }
968
        }
969
969
970
        Found = TRUE;
970
        Found = TRUE;
971
        sp->ang = tang;
971
        sp->ang = tang;
972
        break;
972
        break;
973
    }
973
    }
974
974
975
    if (!Found)
975
    if (!Found)
976
    {
976
    {
977
        InitActorDecide(SpriteNum);
977
        InitActorDecide(SpriteNum);
978
        return 0;
978
        return 0;
979
    }
979
    }
980
980
981
    NewStateGroup(SpriteNum, sg_RipperHangJump);
981
    NewStateGroup(SpriteNum, sg_RipperHangJump);
982
    u->StateFallOverride = sg_RipperHangFall;
982
    u->StateFallOverride = sg_RipperHangFall;
983
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
983
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
984
984
985
    //u->jump_speed = -800;
985
    //u->jump_speed = -800;
986
    PickJumpMaxSpeed(SpriteNum, -800);
986
    PickJumpMaxSpeed(SpriteNum, -800);
987
987
988
    SET(u->Flags, SPR_JUMPING);
988
    SET(u->Flags, SPR_JUMPING);
989
    RESET(u->Flags, SPR_FALLING);
989
    RESET(u->Flags, SPR_FALLING);
990
990
991
    // set up individual actor jump gravity
991
    // set up individual actor jump gravity
992
    u->jump_grav = 8;
992
    u->jump_grav = 8;
993
993
994
    DoJump(SpriteNum);
994
    DoJump(SpriteNum);
995
995
996
    return 0;
996
    return 0;
997
}
997
}
998
998
999
int
999
int
1000
DoRipperHang(short SpriteNum)
1000
DoRipperHang(short SpriteNum)
1001
{
1001
{
1002
    USERp u = User[SpriteNum];
1002
    USERp u = User[SpriteNum];
1003
1003
1004
    if ((u->WaitTics -= ACTORMOVETICS) > 0)
1004
    if ((u->WaitTics -= ACTORMOVETICS) > 0)
1005
        return 0;
1005
        return 0;
1006
1006
1007
    NewStateGroup(SpriteNum, sg_RipperJumpAttack);
1007
    NewStateGroup(SpriteNum, sg_RipperJumpAttack);
1008
    // move to the 2nd frame - past the pause frame
1008
    // move to the 2nd frame - past the pause frame
1009
    u->Tics += u->State->Tics;
1009
    u->Tics += u->State->Tics;
1010
    return 0;
1010
    return 0;
1011
}
1011
}
1012
1012
1013
int
1013
int
1014
DoRipperMoveHang(short SpriteNum)
1014
DoRipperMoveHang(short SpriteNum)
1015
{
1015
{
1016
    SPRITEp sp = &sprite[SpriteNum];
1016
    SPRITEp sp = &sprite[SpriteNum];
1017
    USERp u = User[SpriteNum];
1017
    USERp u = User[SpriteNum];
1018
    int nx, ny;
1018
    int nx, ny;
1019
1019
1020
    // Move while jumping
1020
    // Move while jumping
1021
    nx = sp->xvel * (int) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
1021
    nx = sp->xvel * (int) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
1022
    ny = sp->xvel * (int) sintable[sp->ang] >> 14;
1022
    ny = sp->xvel * (int) sintable[sp->ang] >> 14;
1023
1023
1024
    // if cannot move the sprite
1024
    // if cannot move the sprite
1025
    if (!move_actor(SpriteNum, nx, ny, 0L))
1025
    if (!move_actor(SpriteNum, nx, ny, 0L))
1026
    {
1026
    {
1027
        switch (TEST(u->ret, HIT_MASK))
1027
        switch (TEST(u->ret, HIT_MASK))
1028
        {
1028
        {
1029
        case HIT_WALL:
1029
        case HIT_WALL:
1030
        {
1030
        {
1031
            short hit_wall;
1031
            short hit_wall;
1032
            short w, nw;
1032
            short w, nw;
1033
1033
1034
            hit_wall = NORM_WALL(u->ret);
1034
            hit_wall = NORM_WALL(u->ret);
1035
1035
1036
            NewStateGroup(SpriteNum, u->ActorActionSet->Special[1]);
1036
            NewStateGroup(SpriteNum, u->ActorActionSet->Special[1]);
1037
            u->WaitTics = 2 + ((RANDOM_P2(4 << 8) >> 8) * 120);
1037
            u->WaitTics = 2 + ((RANDOM_P2(4 << 8) >> 8) * 120);
1038
1038
1039
            // hang flush with the wall
1039
            // hang flush with the wall
1040
            w = hit_wall;
1040
            w = hit_wall;
1041
            nw = wall[w].point2;
1041
            nw = wall[w].point2;
1042
            sp->ang = NORM_ANGLE(getangle(wall[nw].x - wall[w].x, wall[nw].y - wall[w].y) - 512);
1042
            sp->ang = NORM_ANGLE(getangle(wall[nw].x - wall[w].x, wall[nw].y - wall[w].y) - 512);
1043
1043
1044
            return 0;
1044
            return 0;
1045
        }
1045
        }
1046
        }
1046
        }
1047
    }
1047
    }
1048
1048
1049
    return 0;
1049
    return 0;
1050
}
1050
}
1051
1051
1052
1052
1053
int
1053
int
1054
DoRipperHangJF(short SpriteNum)
1054
DoRipperHangJF(short SpriteNum)
1055
{
1055
{
1056
    USERp u = User[SpriteNum];
1056
    USERp u = User[SpriteNum];
1057
1057
1058
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1058
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1059
    {
1059
    {
1060
        if (TEST(u->Flags, SPR_JUMPING))
1060
        if (TEST(u->Flags, SPR_JUMPING))
1061
            DoJump(SpriteNum);
1061
            DoJump(SpriteNum);
1062
        else
1062
        else
1063
            DoFall(SpriteNum);
1063
            DoFall(SpriteNum);
1064
    }
1064
    }
1065
1065
1066
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1066
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1067
    {
1067
    {
1068
        if (DoRipperQuickJump(SpriteNum))
1068
        if (DoRipperQuickJump(SpriteNum))
1069
            return 0;
1069
            return 0;
1070
1070
1071
        InitActorDecide(SpriteNum);
1071
        InitActorDecide(SpriteNum);
1072
    }
1072
    }
1073
1073
1074
    DoRipperMoveHang(SpriteNum);
1074
    DoRipperMoveHang(SpriteNum);
1075
1075
1076
    return 0;
1076
    return 0;
1077
1077
1078
}
1078
}
1079
1079
1080
//
1080
//
1081
// JUMP ATTACK
1081
// JUMP ATTACK
1082
//
1082
//
1083
1083
1084
int
1084
int
1085
DoRipperBeginJumpAttack(short SpriteNum)
1085
DoRipperBeginJumpAttack(short SpriteNum)
1086
{
1086
{
1087
    SPRITEp sp = &sprite[SpriteNum];
1087
    SPRITEp sp = &sprite[SpriteNum];
1088
    USERp u = User[SpriteNum];
1088
    USERp u = User[SpriteNum];
1089
    SPRITEp psp = User[SpriteNum]->tgt_sp;
1089
    SPRITEp psp = User[SpriteNum]->tgt_sp;
1090
    int CanSeePlayer(short SpriteNum);
1090
    int CanSeePlayer(short SpriteNum);
1091
    short tang;
1091
    short tang;
1092
1092
1093
#define RANDOM_NEG(x) (RANDOM_P2((x)<<1) - (x))
-
 
1094
-
 
1095
    tang = getangle(psp->x - sp->x, psp->y - sp->y);
1093
    tang = getangle(psp->x - sp->x, psp->y - sp->y);
1096
1094
1097
    if (move_sprite(SpriteNum, sintable[NORM_ANGLE(tang+512)] >> 7, sintable[tang] >> 7,
1095
    if (move_sprite(SpriteNum, sintable[NORM_ANGLE(tang+512)] >> 7, sintable[tang] >> 7,
1098
                    0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS))
1096
                    0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS))
1099
        sp->ang = NORM_ANGLE((sp->ang + 1024) + (RANDOM_NEG(256 << 6) >> 6));
1097
        sp->ang = NORM_ANGLE((sp->ang + 1024) + (RANDOM_NEG(256, 6) >> 6));
1100
    else
1098
    else
1101
        sp->ang = NORM_ANGLE(tang + (RANDOM_NEG(256 << 6) >> 6));
1099
        sp->ang = NORM_ANGLE(tang + (RANDOM_NEG(256, 6) >> 6));
1102
1100
1103
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
1101
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
1104
1102
1105
    //u->jump_speed = -800;
1103
    //u->jump_speed = -800;
1106
    PickJumpMaxSpeed(SpriteNum, -400); // was -800
1104
    PickJumpMaxSpeed(SpriteNum, -400); // was -800
1107
1105
1108
    SET(u->Flags, SPR_JUMPING);
1106
    SET(u->Flags, SPR_JUMPING);
1109
    RESET(u->Flags, SPR_FALLING);
1107
    RESET(u->Flags, SPR_FALLING);
1110
1108
1111
    // set up individual actor jump gravity
1109
    // set up individual actor jump gravity
1112
    u->jump_grav = 17; // was 8
1110
    u->jump_grav = 17; // was 8
1113
1111
1114
    // if I didn't do this here they get stuck in the air sometimes
1112
    // if I didn't do this here they get stuck in the air sometimes
1115
    DoActorZrange(SpriteNum);
1113
    DoActorZrange(SpriteNum);
1116
1114
1117
    DoJump(SpriteNum);
1115
    DoJump(SpriteNum);
1118
1116
1119
    return 0;
1117
    return 0;
1120
}
1118
}
1121
1119
1122
int
1120
int
1123
DoRipperMoveJump(short SpriteNum)
1121
DoRipperMoveJump(short SpriteNum)
1124
{
1122
{
1125
    USERp u = User[SpriteNum];
1123
    USERp u = User[SpriteNum];
1126
1124
1127
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1125
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1128
    {
1126
    {
1129
        if (TEST(u->Flags, SPR_JUMPING))
1127
        if (TEST(u->Flags, SPR_JUMPING))
1130
            DoJump(SpriteNum);
1128
            DoJump(SpriteNum);
1131
        else
1129
        else
1132
            DoFall(SpriteNum);
1130
            DoFall(SpriteNum);
1133
    }
1131
    }
1134
1132
1135
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1133
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1136
    {
1134
    {
1137
        if (DoRipperQuickJump(SpriteNum))
1135
        if (DoRipperQuickJump(SpriteNum))
1138
            return 0;
1136
            return 0;
1139
1137
1140
        InitActorDecide(SpriteNum);
1138
        InitActorDecide(SpriteNum);
1141
    }
1139
    }
1142
1140
1143
    DoRipperMoveHang(SpriteNum);
1141
    DoRipperMoveHang(SpriteNum);
1144
    return 0;
1142
    return 0;
1145
}
1143
}
1146
1144
1147
//
1145
//
1148
// STD MOVEMENT
1146
// STD MOVEMENT
1149
//
1147
//
1150
1148
1151
int
1149
int
1152
DoRipperQuickJump(short SpriteNum)
1150
DoRipperQuickJump(short SpriteNum)
1153
{
1151
{
1154
    USERp u = User[SpriteNum];
1152
    USERp u = User[SpriteNum];
1155
1153
1156
    // Tests to see if ripper is on top of a player/enemy and then immediatly
1154
    // Tests to see if ripper is on top of a player/enemy and then immediatly
1157
    // does another jump
1155
    // does another jump
1158
1156
1159
    if (u->lo_sp)
1157
    if (u->lo_sp)
1160
    {
1158
    {
1161
        SPRITEp tsp = u->lo_sp;
1159
        SPRITEp tsp = u->lo_sp;
1162
1160
1163
        if (TEST(tsp->extra, SPRX_PLAYER_OR_ENEMY))
1161
        if (TEST(tsp->extra, SPRX_PLAYER_OR_ENEMY))
1164
        {
1162
        {
1165
            NewStateGroup(SpriteNum, sg_RipperJumpAttack);
1163
            NewStateGroup(SpriteNum, sg_RipperJumpAttack);
1166
            // move past the first state
1164
            // move past the first state
1167
            u->Tics = 30;
1165
            u->Tics = 30;
1168
            return TRUE;
1166
            return TRUE;
1169
        }
1167
        }
1170
    }
1168
    }
1171
1169
1172
    return FALSE;
1170
    return FALSE;
1173
}
1171
}
1174
1172
1175
1173
1176
int
1174
int
1177
NullRipper(short SpriteNum)
1175
NullRipper(short SpriteNum)
1178
{
1176
{
1179
    USERp u = User[SpriteNum];
1177
    USERp u = User[SpriteNum];
1180
1178
1181
    if (TEST(u->Flags,SPR_SLIDING))
1179
    if (TEST(u->Flags,SPR_SLIDING))
1182
        DoActorSlide(SpriteNum);
1180
        DoActorSlide(SpriteNum);
1183
1181
1184
    DoActorSectorDamage(SpriteNum);
1182
    DoActorSectorDamage(SpriteNum);
1185
1183
1186
    return 0;
1184
    return 0;
1187
}
1185
}
1188
1186
1189
1187
1190
int DoRipperPain(short SpriteNum)
1188
int DoRipperPain(short SpriteNum)
1191
{
1189
{
1192
    USERp u = User[SpriteNum];
1190
    USERp u = User[SpriteNum];
1193
1191
1194
    NullRipper(SpriteNum);
1192
    NullRipper(SpriteNum);
1195
1193
1196
    if ((u->WaitTics -= ACTORMOVETICS) <= 0)
1194
    if ((u->WaitTics -= ACTORMOVETICS) <= 0)
1197
        InitActorDecide(SpriteNum);
1195
        InitActorDecide(SpriteNum);
1198
    return 0;
1196
    return 0;
1199
}
1197
}
1200
1198
1201
1199
1202
// CTW MODIFICATION
1200
// CTW MODIFICATION
1203
//int DoRipperRipHeart(SpriteNum)
1201
//int DoRipperRipHeart(SpriteNum)
1204
int DoRipperRipHeart(short SpriteNum)
1202
int DoRipperRipHeart(short SpriteNum)
1205
// CTW MODIFICATION END
1203
// CTW MODIFICATION END
1206
{
1204
{
1207
    SPRITEp sp = &sprite[SpriteNum];
1205
    SPRITEp sp = &sprite[SpriteNum];
1208
    USERp u = User[SpriteNum];
1206
    USERp u = User[SpriteNum];
1209
1207
1210
    SPRITEp tsp = u->tgt_sp;
1208
    SPRITEp tsp = u->tgt_sp;
1211
1209
1212
    NewStateGroup(SpriteNum, sg_RipperHeart);
1210
    NewStateGroup(SpriteNum, sg_RipperHeart);
1213
    u->WaitTics = 6 * 120;
1211
    u->WaitTics = 6 * 120;
1214
1212
1215
    // player face ripper
1213
    // player face ripper
1216
    tsp->ang = getangle(sp->x - tsp->x, sp->y - tsp->y);
1214
    tsp->ang = getangle(sp->x - tsp->x, sp->y - tsp->y);
1217
    return 0;
1215
    return 0;
1218
}
1216
}
1219
1217
1220
// CTW MODIFICATION
1218
// CTW MODIFICATION
1221
//int DoRipperStandHeart(SpriteNum)
1219
//int DoRipperStandHeart(SpriteNum)
1222
int DoRipperStandHeart(short SpriteNum)
1220
int DoRipperStandHeart(short SpriteNum)
1223
// CTW MODIFICATION END
1221
// CTW MODIFICATION END
1224
{
1222
{
1225
    USERp u = User[SpriteNum];
1223
    USERp u = User[SpriteNum];
1226
1224
1227
    NullRipper(SpriteNum);
1225
    NullRipper(SpriteNum);
1228
1226
1229
    if ((u->WaitTics -= ACTORMOVETICS) <= 0)
1227
    if ((u->WaitTics -= ACTORMOVETICS) <= 0)
1230
        NewStateGroup(SpriteNum, sg_RipperRun);
1228
        NewStateGroup(SpriteNum, sg_RipperRun);
1231
    return 0;
1229
    return 0;
1232
}
1230
}
1233
1231
1234
void RipperHatch(short Weapon)
1232
void RipperHatch(short Weapon)
1235
{
1233
{
1236
    SPRITEp wp = &sprite[Weapon];
1234
    SPRITEp wp = &sprite[Weapon];
1237
1235
1238
    short New,i;
1236
    short New,i;
1239
    SPRITEp np;
1237
    SPRITEp np;
1240
    USERp nu;
1238
    USERp nu;
1241
#define MAX_RIPPERS 1
1239
#define MAX_RIPPERS 1
1242
    short rip_ang[MAX_RIPPERS];
1240
    short rip_ang[MAX_RIPPERS];
1243
1241
1244
    rip_ang[0] = RANDOM_P2(2048);
1242
    rip_ang[0] = RANDOM_P2(2048);
1245
    // rip_ang[1] = NORM_ANGLE(rip_ang[0] + 1024 + (RANDOM_P2(512) - 256));
1243
    // rip_ang[1] = NORM_ANGLE(rip_ang[0] + 1024 + (RANDOM_P2(512) - 256));
1246
1244
1247
    for (i = 0; i < MAX_RIPPERS; i++)
1245
    for (i = 0; i < MAX_RIPPERS; i++)
1248
    {
1246
    {
1249
        New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
1247
        New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
1250
        np = &sprite[New];
1248
        np = &sprite[New];
1251
        memset(np,0,sizeof(SPRITE));
1249
        memset(np,0,sizeof(SPRITE));
1252
        np->sectnum = wp->sectnum;
1250
        np->sectnum = wp->sectnum;
1253
        np->statnum = STAT_DEFAULT;
1251
        np->statnum = STAT_DEFAULT;
1254
        np->x = wp->x;
1252
        np->x = wp->x;
1255
        np->y = wp->y;
1253
        np->y = wp->y;
1256
        np->z = wp->z;
1254
        np->z = wp->z;
1257
        np->owner = -1;
1255
        np->owner = -1;
1258
        //np->xrepeat = np->yrepeat = 36;
1256
        //np->xrepeat = np->yrepeat = 36;
1259
        np->xrepeat = np->yrepeat = 64;
1257
        np->xrepeat = np->yrepeat = 64;
1260
        np->ang = rip_ang[i];
1258
        np->ang = rip_ang[i];
1261
        np->pal = 0;
1259
        np->pal = 0;
1262
        SetupRipper(New);
1260
        SetupRipper(New);
1263
        nu = User[New];
1261
        nu = User[New];
1264
1262
1265
        // make immediately active
1263
        // make immediately active
1266
        SET(nu->Flags, SPR_ACTIVE);
1264
        SET(nu->Flags, SPR_ACTIVE);
1267
1265
1268
        NewStateGroup(New, nu->ActorActionSet->Jump);
1266
        NewStateGroup(New, nu->ActorActionSet->Jump);
1269
        nu->ActorActionFunc = DoActorMoveJump;
1267
        nu->ActorActionFunc = DoActorMoveJump;
1270
        DoActorSetSpeed(New, FAST_SPEED);
1268
        DoActorSetSpeed(New, FAST_SPEED);
1271
        PickJumpMaxSpeed(New, -600);
1269
        PickJumpMaxSpeed(New, -600);
1272
1270
1273
        SET(nu->Flags, SPR_JUMPING);
1271
        SET(nu->Flags, SPR_JUMPING);
1274
        RESET(nu->Flags, SPR_FALLING);
1272
        RESET(nu->Flags, SPR_FALLING);
1275
1273
1276
        nu->jump_grav = 8;
1274
        nu->jump_grav = 8;
1277
1275
1278
        // if I didn't do this here they get stuck in the air sometimes
1276
        // if I didn't do this here they get stuck in the air sometimes
1279
        DoActorZrange(New);
1277
        DoActorZrange(New);
1280
1278
1281
        DoJump(New);
1279
        DoJump(New);
1282
    }
1280
    }
1283
}
1281
}
1284
1282
1285
int
1283
int
1286
DoRipperMove(short SpriteNum)
1284
DoRipperMove(short SpriteNum)
1287
{
1285
{
1288
    USERp u = User[SpriteNum];
1286
    USERp u = User[SpriteNum];
1289
1287
1290
    if (u->scale_speed)
1288
    if (u->scale_speed)
1291
    {
1289
    {
1292
        DoScaleSprite(SpriteNum);
1290
        DoScaleSprite(SpriteNum);
1293
    }
1291
    }
1294
1292
1295
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1293
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1296
    {
1294
    {
1297
        if (TEST(u->Flags, SPR_JUMPING))
1295
        if (TEST(u->Flags, SPR_JUMPING))
1298
            DoJump(SpriteNum);
1296
            DoJump(SpriteNum);
1299
        else
1297
        else
1300
            DoFall(SpriteNum);
1298
            DoFall(SpriteNum);
1301
    }
1299
    }
1302
1300
1303
    // if on a player/enemy sprite jump quickly
1301
    // if on a player/enemy sprite jump quickly
1304
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1302
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1305
    {
1303
    {
1306
        if (DoRipperQuickJump(SpriteNum))
1304
        if (DoRipperQuickJump(SpriteNum))
1307
            return 0;
1305
            return 0;
1308
1306
1309
        KeepActorOnFloor(SpriteNum);
1307
        KeepActorOnFloor(SpriteNum);
1310
    }
1308
    }
1311
1309
1312
    if (TEST(u->Flags, SPR_SLIDING))
1310
    if (TEST(u->Flags, SPR_SLIDING))
1313
        DoActorSlide(SpriteNum);
1311
        DoActorSlide(SpriteNum);
1314
1312
1315
    if (u->track >= 0)
1313
    if (u->track >= 0)
1316
        ActorFollowTrack(SpriteNum, ACTORMOVETICS);
1314
        ActorFollowTrack(SpriteNum, ACTORMOVETICS);
1317
    else
1315
    else
1318
        (*u->ActorActionFunc)(SpriteNum);
1316
        (*u->ActorActionFunc)(SpriteNum);
1319
1317
1320
    DoActorSectorDamage(SpriteNum);
1318
    DoActorSectorDamage(SpriteNum);
1321
    return 0;
1319
    return 0;
1322
}
1320
}
1323
1321
1324
1322
1325
#include "saveable.h"
1323
#include "saveable.h"
1326
1324
1327
static saveable_code saveable_ripper_code[] =
1325
static saveable_code saveable_ripper_code[] =
1328
{
1326
{
1329
    SAVE_CODE(SetupRipper),
1327
    SAVE_CODE(SetupRipper),
1330
    SAVE_CODE(GetJumpHeight),
1328
    SAVE_CODE(GetJumpHeight),
1331
    SAVE_CODE(PickJumpSpeed),
1329
    SAVE_CODE(PickJumpSpeed),
1332
    SAVE_CODE(PickJumpMaxSpeed),
1330
    SAVE_CODE(PickJumpMaxSpeed),
1333
1331
1334
    SAVE_CODE(InitRipperHang),
1332
    SAVE_CODE(InitRipperHang),
1335
    SAVE_CODE(DoRipperHang),
1333
    SAVE_CODE(DoRipperHang),
1336
    SAVE_CODE(DoRipperMoveHang),
1334
    SAVE_CODE(DoRipperMoveHang),
1337
    SAVE_CODE(DoRipperHangJF),
1335
    SAVE_CODE(DoRipperHangJF),
1338
1336
1339
    SAVE_CODE(DoRipperBeginJumpAttack),
1337
    SAVE_CODE(DoRipperBeginJumpAttack),
1340
    SAVE_CODE(DoRipperMoveJump),
1338
    SAVE_CODE(DoRipperMoveJump),
1341
1339
1342
    SAVE_CODE(DoRipperQuickJump),
1340
    SAVE_CODE(DoRipperQuickJump),
1343
    SAVE_CODE(NullRipper),
1341
    SAVE_CODE(NullRipper),
1344
    SAVE_CODE(DoRipperPain),
1342
    SAVE_CODE(DoRipperPain),
1345
    SAVE_CODE(DoRipperRipHeart),
1343
    SAVE_CODE(DoRipperRipHeart),
1346
    SAVE_CODE(DoRipperStandHeart),
1344
    SAVE_CODE(DoRipperStandHeart),
1347
    SAVE_CODE(RipperHatch),
1345
    SAVE_CODE(RipperHatch),
1348
    SAVE_CODE(DoRipperMove),
1346
    SAVE_CODE(DoRipperMove),
1349
};
1347
};
1350
1348
1351
static saveable_data saveable_ripper_data[] =
1349
static saveable_data saveable_ripper_data[] =
1352
{
1350
{
1353
    SAVE_DATA(RipperBattle),
1351
    SAVE_DATA(RipperBattle),
1354
    SAVE_DATA(RipperOffense),
1352
    SAVE_DATA(RipperOffense),
1355
    SAVE_DATA(RipperBroadcast),
1353
    SAVE_DATA(RipperBroadcast),
1356
    SAVE_DATA(RipperSurprised),
1354
    SAVE_DATA(RipperSurprised),
1357
    SAVE_DATA(RipperEvasive),
1355
    SAVE_DATA(RipperEvasive),
1358
    SAVE_DATA(RipperLostTarget),
1356
    SAVE_DATA(RipperLostTarget),
1359
    SAVE_DATA(RipperCloseRange),
1357
    SAVE_DATA(RipperCloseRange),
1360
1358
1361
    SAVE_DATA(RipperPersonality),
1359
    SAVE_DATA(RipperPersonality),
1362
1360
1363
    SAVE_DATA(RipperAttrib),
1361
    SAVE_DATA(RipperAttrib),
1364
1362
1365
    SAVE_DATA(s_RipperRun),
1363
    SAVE_DATA(s_RipperRun),
1366
    SAVE_DATA(sg_RipperRun),
1364
    SAVE_DATA(sg_RipperRun),
1367
    SAVE_DATA(s_RipperStand),
1365
    SAVE_DATA(s_RipperStand),
1368
    SAVE_DATA(sg_RipperStand),
1366
    SAVE_DATA(sg_RipperStand),
1369
    SAVE_DATA(s_RipperSwipe),
1367
    SAVE_DATA(s_RipperSwipe),
1370
    SAVE_DATA(sg_RipperSwipe),
1368
    SAVE_DATA(sg_RipperSwipe),
1371
    SAVE_DATA(s_RipperSpew),
1369
    SAVE_DATA(s_RipperSpew),
1372
    SAVE_DATA(sg_RipperSpew),
1370
    SAVE_DATA(sg_RipperSpew),
1373
    SAVE_DATA(s_RipperHeart),
1371
    SAVE_DATA(s_RipperHeart),
1374
    SAVE_DATA(sg_RipperHeart),
1372
    SAVE_DATA(sg_RipperHeart),
1375
    SAVE_DATA(s_RipperHang),
1373
    SAVE_DATA(s_RipperHang),
1376
    SAVE_DATA(sg_RipperHang),
1374
    SAVE_DATA(sg_RipperHang),
1377
    SAVE_DATA(s_RipperPain),
1375
    SAVE_DATA(s_RipperPain),
1378
    SAVE_DATA(sg_RipperPain),
1376
    SAVE_DATA(sg_RipperPain),
1379
    SAVE_DATA(s_RipperJump),
1377
    SAVE_DATA(s_RipperJump),
1380
    SAVE_DATA(sg_RipperJump),
1378
    SAVE_DATA(sg_RipperJump),
1381
    SAVE_DATA(s_RipperFall),
1379
    SAVE_DATA(s_RipperFall),
1382
    SAVE_DATA(sg_RipperFall),
1380
    SAVE_DATA(sg_RipperFall),
1383
    SAVE_DATA(s_RipperJumpAttack),
1381
    SAVE_DATA(s_RipperJumpAttack),
1384
    SAVE_DATA(sg_RipperJumpAttack),
1382
    SAVE_DATA(sg_RipperJumpAttack),
1385
    SAVE_DATA(s_RipperHangJump),
1383
    SAVE_DATA(s_RipperHangJump),
1386
    SAVE_DATA(sg_RipperHangJump),
1384
    SAVE_DATA(sg_RipperHangJump),
1387
    SAVE_DATA(s_RipperHangFall),
1385
    SAVE_DATA(s_RipperHangFall),
1388
    SAVE_DATA(sg_RipperHangFall),
1386
    SAVE_DATA(sg_RipperHangFall),
1389
    SAVE_DATA(s_RipperDie),
1387
    SAVE_DATA(s_RipperDie),
1390
    SAVE_DATA(s_RipperDead),
1388
    SAVE_DATA(s_RipperDead),
1391
    SAVE_DATA(sg_RipperDie),
1389
    SAVE_DATA(sg_RipperDie),
1392
    SAVE_DATA(sg_RipperDead),
1390
    SAVE_DATA(sg_RipperDead),
1393
    SAVE_DATA(s_RipperDeathJump),
1391
    SAVE_DATA(s_RipperDeathJump),
1394
    SAVE_DATA(s_RipperDeathFall),
1392
    SAVE_DATA(s_RipperDeathFall),
1395
    SAVE_DATA(sg_RipperDeathJump),
1393
    SAVE_DATA(sg_RipperDeathJump),
1396
    SAVE_DATA(sg_RipperDeathFall),
1394
    SAVE_DATA(sg_RipperDeathFall),
1397
1395
1398
    SAVE_DATA(RipperActionSet),
1396
    SAVE_DATA(RipperActionSet),
1399
    SAVE_DATA(RipperBrownActionSet),
1397
    SAVE_DATA(RipperBrownActionSet),
1400
};
1398
};
1401
1399
1402
saveable_module saveable_ripper =
1400
saveable_module saveable_ripper =
1403
{
1401
{
1404
    // code
1402
    // code
1405
    saveable_ripper_code,
1403
    saveable_ripper_code,
1406
    SIZ(saveable_ripper_code),
1404
    SIZ(saveable_ripper_code),
1407
1405
1408
    // data
1406
    // data
1409
    saveable_ripper_data,
1407
    saveable_ripper_data,
1410
    SIZ(saveable_ripper_data)
1408
    SIZ(saveable_ripper_data)
1411
};
1409
};
1412
 
1410