source: abuse/branches/lol/src/control.cpp @ 732

Last change on this file since 732 was 732, checked in by Sam Hocevar, 8 years ago

build: SDL2 compilation fixes.

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