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

Last change on this file since 112 was 56, checked in by Sam Hocevar, 12 years ago
  • Add licensing terms to most C / C++ files (Ref #5).
File size: 1.3 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *
5 *  This software was released into the Public Domain. As with most public
6 *  domain software, no warranty is made or implied by Crack dot Com or
7 *  Jonathan Clark.
8 */
9
10#include "config.h"
11
12#include "game.hpp"
13#include "control.hpp"
14#include "specs.hpp"
15#include "loader.hpp"
16#include "hpoint.hpp"
17#include "ability.hpp"
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.