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

Last change on this file since 489 was 481, checked in by Sam Hocevar, 10 years ago

Fuck the history, I'm renaming all .hpp files to .h for my own sanity.

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