source: abuse/trunk/src/control.cpp @ 494

Last change on this file since 494 was 494, checked in by Sam Hocevar, 9 years ago

style: remove trailing spaces, fix copyright statements.

File size: 1.3 KB
Line 
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 or
8 *  Jonathan Clark.
9 */
10
11#include "config.h"
12
13#include "game.h"
14#include "control.h"
15#include "specs.h"
16#include "hpoint.h"
17#include "ability.h"
18
19#define FADING_FRAMES 20
20#define FADING_MAX 30
21
22sequence *morph_table[MORPH_TABLE_WIDTH*MORPH_TABLE_WIDTH];
23
24
25void controlled_character::note_hp_change(int new_hp, game_object *who)
26{
27  if (cur_char==who)
28    the_game->set_hit_points(hp);
29}
30
31
32void controlled_character::change_character(int char_type)
33{
34/*  switch (char_type)
35  {
36    case CHAR_HUMAN : my_figure=human_figure; curbreak;
37    case CHAR_IGUANA : my_figure=iguana_figure; break;
38    default : CONDITION(0,"change_character, bad character type\n");
39  }
40  cur_char=char_type;
41  set_state(stopped);
42
43  the_game->change_logos(abilities,cur_char); */
44
45}
46
47
48
49
50controlled_character::controlled_character(game_object *who)
51{
52  cur_char=who;
53  abilities=0;
54  morphing_to=-1;
55}
56
57
58int controlled_character::decide()
59{
60  int button,c_x,c_y;
61  the_game->get_movement(button,c_x,c_y);
62  cur_char->move(c_x,c_y,button);
63  return 1;
64}
65
66
67
68
69
70
71
72
73
74
75
76
Note: See TracBrowser for help on using the repository browser.