2 Cantaveria - action adventure platform game
3 Copyright (C) 2009 Evan Rinehart
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to
18 The Free Software Foundation, Inc.
19 51 Franklin Street, Fifth Floor
20 Boston, MA 02110-1301, USA
65 void (*keydown
)(int key
);
66 void (*keyup
)(int key
);
67 void (*joymovex
)(int joy
, int x
);
68 void (*joymovey
)(int joy
, int y
);
69 void (*joypress
)(int joy
, int button
);
70 void (*joyrelease
)(int joy
, int button
);
71 //void (*keyentry)(utf32 u);
74 #define VERSION_MAJOR 0
75 #define VERSION_MINOR 0
78 #define JOY_MIN -32768
83 #define DELAY_AMOUNT 1
91 #define COLOR_KEY 0x000000
93 #define SAMPLE_RATE 44100
94 #define BUFFER_SIZE 1024
96 #define RANDOM_SEED 57
99 void backend_init(int argc
, char* argv
[]);
102 void input(); /* pump event system */
103 void draw(); /* draw all active graphics */
105 int since(); /* ms since last time since() was called */
106 void delay(int ms
); /* wait ms ms */
114 int keynum(int name
); /* get key number for key name */
115 int butnum(int joy
, int name
); /* get button number for button name */
116 void control(int type
, int par1
, int par2
); /* automatic control */
117 void enable_alphanum(int yn
);
118 void set_handler(struct handler h
);
121 int load_gfx(char* filename
);
122 void draw_gfx(int gfxid
, int x
, int y
, int X
, int Y
, int W
, int H
);
123 void draw_gfx_raw(int gfxid
, int x
, int y
, int X
, int Y
, int W
, int H
);
124 int gfx_width(int gfxid
);
125 int gfx_height(int gfxid
);
128 int load_sound(char* filename
);
129 void play_sound(int id
);
130 int load_music(char* filename
);
131 int play_music(int id
);