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

Last change on this file since 124 was 124, checked in by Sam Hocevar, 15 years ago
  • Get rid of ugly tabs and trailing spaces everywhere.
File size: 1.3 KB
RevLine 
[56]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
[2]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)
[124]26{
27  if (cur_char==who)
28    the_game->set_hit_points(hp);
[2]29}
30
31
32void controlled_character::change_character(int char_type)
33{
34/*  switch (char_type)
35  {
[124]36    case CHAR_HUMAN : my_figure=human_figure; curbreak;
[2]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);
[124]42
[2]43  the_game->change_logos(abilities,cur_char);*/
44
[124]45}
[2]46
47
[124]48
49
[2]50controlled_character::controlled_character(game_object *who)
51{
52  cur_char=who;
[124]53  abilities=0;
[2]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);
[124]62  cur_char->move(c_x,c_y,button);
[2]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.