-
Notifications
You must be signed in to change notification settings - Fork 1
/
ability.cpp
72 lines (50 loc) · 1.98 KB
/
ability.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
/*
* Abuse - dark 2D side-scrolling platform game
* Copyright (c) 1995 Crack dot Com
* Copyright (c) 2005-2011 Sam Hocevar <[email protected]>
*
* This software was released into the Public Domain. As with most public
* domain software, no warranty is made or implied by Crack dot Com, by
* Jonathan Clark, or by Sam Hocevar.
*/
#if defined HAVE_CONFIG_H
# include "config.h"
#endif
#include "common.h"
#include "ability.h"
#include "chars.h"
/*int abil[TOTAL_OBJECTS*TOTAL_ABILITIES]= {
/ hp starta stopa jumpxv jumpyv crouch_tops run_tops jmp_tops wlk_tops /
/ human / 50, 3, 4, 8, -24, 3, 6, 8, 4,
/ iguana / 4, 3, 4, 10, -34, 0, 8, 10, 6,
/ who / 2, 2, 4, 20, 0, 0, 18, 20, 18,
/ account1 / 3, 3, 4, 10, -20, 0, 6, 8, 5,
/ cop / 6, 3, 4, 10, -14, 0, 6, 20, 6,
/ laser / 2, 0, 0, 0, 0, 0, 0, 0, 0,
/ elevator / 2, 2, 2, 0, 0, 0, 1, 1, 1,
/ sensor / 0, 0, 0, 0, 0, 0, 0, 0, 0,
/ elcontrol / 0, 0, 0, 0, 0, 0, 0, 0, 0,
/ no type / 0, 0, 0, 0, 0, 0, 0, 0, 0
} ; */
char const *ability_names[TOTAL_ABILITIES] =
{
"start_hp", "start_accel", "stop_accel",
"jump_xvel", "jump_yvel",
"run_top_speed", "jump_top_speed",
"tint_color",
"push_xrange",
"walk_top_speed"
};
long abil_def[TOTAL_ABILITIES]=
{ 6, 3, 4, 2, -16, 10, 6, 0,
/* hp starta stopa jumpxv jumpyv run_tops jmp_tops blood_type */
/* push_xrange wlk_tops */
0, 6 };
long get_ability_default(ability a)
{
return abil_def[a];
}
long get_ability(int who, ability a)
{
return figures[who]->abil[a];
}