source: abuse/tags/pd/macabuse/src/control.c @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 11 years ago
  • Imported original public domain release, for future reference.
  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1#include "game.hpp"
2#include "control.hpp"
3#include "specs.hpp"
4#include "loader.hpp"
5#include "hpoint.hpp"
6#include "ability.hpp"
7
8#define FADING_FRAMES 20
9#define FADING_MAX 30
10
11sequence *morph_table[MORPH_TABLE_WIDTH*MORPH_TABLE_WIDTH];
12
13
14void controlled_character::note_hp_change(int new_hp, game_object *who)
15{
16  if (cur_char==who) 
17    the_game->set_hit_points(hp); 
18}
19
20
21void controlled_character::change_character(int char_type)
22{
23/*  switch (char_type)
24  {
25    case CHAR_HUMAN : my_figure=human_figure; curbreak;   
26    case CHAR_IGUANA : my_figure=iguana_figure; break;
27    default : CONDITION(0,"change_character, bad character type\n");
28  }
29  cur_char=char_type;
30  set_state(stopped);
31 
32  the_game->change_logos(abilities,cur_char);*/
33 
34
35
36
37   
38
39controlled_character::controlled_character(game_object *who)
40{
41  cur_char=who;
42  abilities=0; 
43  morphing_to=-1;
44}
45
46
47int controlled_character::decide()
48{
49  int button,c_x,c_y;
50  the_game->get_movement(button,c_x,c_y);
51  cur_char->move(c_x,c_y,button); 
52  return 1;
53}
54
55
56
57
58
59
60
61
62
63
64
65
Note: See TracBrowser for help on using the repository browser.