source: abuse/trunk/src/control.cpp

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

ps3: make everything compile on the PS3. Of course, nothing links yet
because so much support is missing.

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