1 | /* |
---|
2 | * Abuse - dark 2D side-scrolling platform game |
---|
3 | * Copyright (c) 1995 Crack dot Com |
---|
4 | * Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net> |
---|
5 | * |
---|
6 | * This software was released into the Public Domain. As with most public |
---|
7 | * domain software, no warranty is made or implied by Crack dot Com, by |
---|
8 | * Jonathan Clark, or by Sam Hocevar. |
---|
9 | */ |
---|
10 | |
---|
11 | #if defined HAVE_CONFIG_H |
---|
12 | # include "config.h" |
---|
13 | #endif |
---|
14 | |
---|
15 | #include "common.h" |
---|
16 | |
---|
17 | #include "ability.h" |
---|
18 | #include "chars.h" |
---|
19 | |
---|
20 | /*int abil[TOTAL_OBJECTS*TOTAL_ABILITIES]= { |
---|
21 | / hp starta stopa jumpxv jumpyv crouch_tops run_tops jmp_tops wlk_tops / |
---|
22 | / human / 50, 3, 4, 8, -24, 3, 6, 8, 4, |
---|
23 | / iguana / 4, 3, 4, 10, -34, 0, 8, 10, 6, |
---|
24 | / who / 2, 2, 4, 20, 0, 0, 18, 20, 18, |
---|
25 | |
---|
26 | / account1 / 3, 3, 4, 10, -20, 0, 6, 8, 5, |
---|
27 | / cop / 6, 3, 4, 10, -14, 0, 6, 20, 6, |
---|
28 | / laser / 2, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
29 | / elevator / 2, 2, 2, 0, 0, 0, 1, 1, 1, |
---|
30 | / sensor / 0, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
31 | / elcontrol / 0, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
32 | / no type / 0, 0, 0, 0, 0, 0, 0, 0, 0 |
---|
33 | } ; */ |
---|
34 | |
---|
35 | |
---|
36 | char const *ability_names[TOTAL_ABILITIES] = |
---|
37 | { |
---|
38 | "start_hp", "start_accel", "stop_accel", |
---|
39 | "jump_xvel", "jump_yvel", |
---|
40 | "run_top_speed", "jump_top_speed", |
---|
41 | "tint_color", |
---|
42 | "push_xrange", |
---|
43 | "walk_top_speed" |
---|
44 | }; |
---|
45 | |
---|
46 | |
---|
47 | long abil_def[TOTAL_ABILITIES]= |
---|
48 | { 6, 3, 4, 2, -16, 10, 6, 0, |
---|
49 | /* hp starta stopa jumpxv jumpyv run_tops jmp_tops blood_type */ |
---|
50 | |
---|
51 | /* push_xrange wlk_tops */ |
---|
52 | 0, 6 }; |
---|
53 | |
---|
54 | long get_ability_default(ability a) |
---|
55 | { |
---|
56 | return abil_def[a]; |
---|
57 | } |
---|
58 | |
---|
59 | long get_ability(int who, ability a) |
---|
60 | { |
---|
61 | return figures[who]->abil[a]; |
---|
62 | } |
---|
63 | |
---|
64 | |
---|
65 | |
---|
66 | |
---|
67 | |
---|
68 | |
---|
69 | |
---|
70 | |
---|
71 | |
---|
72 | |
---|