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

Last change on this file since 682 was 555, checked in by Sam Hocevar, 9 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
RevLine 
[56]1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
[494]4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
[56]5 *
6 *  This software was released into the Public Domain. As with most public
[555]7 *  domain software, no warranty is made or implied by Crack dot Com, by
8 *  Jonathan Clark, or by Sam Hocevar.
[56]9 */
10
[555]11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
[56]14
[481]15#include "game.h"
16#include "control.h"
17#include "specs.h"
18#include "hpoint.h"
19#include "ability.h"
[2]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)
[124]28{
29  if (cur_char==who)
30    the_game->set_hit_points(hp);
[2]31}
32
33
34void controlled_character::change_character(int char_type)
35{
36/*  switch (char_type)
37  {
[124]38    case CHAR_HUMAN : my_figure=human_figure; curbreak;
[2]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);
[124]44
[494]45  the_game->change_logos(abilities,cur_char); */
[2]46
[124]47}
[2]48
49
[124]50
51
[2]52controlled_character::controlled_character(game_object *who)
53{
54  cur_char=who;
[124]55  abilities=0;
[2]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);
[124]64  cur_char->move(c_x,c_y,button);
[2]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.