Also allow to open help file with F1
[meritous_recharged.git] / src / levelblit.h
blobfa4415c75776525615e97e1dcc0417dd260f7dd7
1 //
2 // levelblit.h
3 //
4 // Copyright 2007, 2008 Lancer-X/ASCEAI
5 //
6 // This file is part of Meritous Recharged.
7 //
8 // Meritous Recharged is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or
11 // (at your option) any later version.
13 // Meritous Recharged is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with Meritous Recharged. If not, see <http://www.gnu.org/licenses/>.
22 // Exposes levelblit.c functionality and types
24 #ifndef LEVELBLIT_H
25 #define LEVELBLIT_H
27 #define PLAYERW 16
28 #define PLAYERH 24
30 extern SDL_Surface *screen;
32 extern int play_music;
33 extern int play_sounds;
35 extern int player_x, player_y;
36 extern int scroll_x, scroll_y;
37 extern int on_title;
38 extern int player_room;
39 extern int prv_player_room;
41 extern int magic_circuit;
42 extern int circuit_size;
43 extern int circuit_range;
44 void DrawCircle(int x, int y, int r, unsigned char c);
45 void DrawCircleEx(int x, int y, int r, int r2, unsigned char c);
46 void DrawRect(int x, int y, int w, int h, unsigned char c);
47 int IsSolid(unsigned char tile);
48 void draw_char(int cur_x, int cur_y, int c, Uint8 tcol);
49 void draw_text(int x, int y, char *str, Uint8 tcol);
50 void draw_text_ex(int x, int y, char *str, Uint8 tcol, SDL_Surface *srf);
52 extern int player_shield;
53 extern int shield_hp;
54 extern int shield_recover;
55 extern int player_hp;
56 extern int player_lives;
57 extern int player_lives_part;
58 extern int enter_room_x, enter_room_y;
60 extern int player_dying;
62 extern int checkpoint_x;
63 extern int checkpoint_y;
65 extern int player_gems;
67 extern int tele_select;
69 void WritePlayerData();
70 void ReadPlayerData();
72 extern int artifacts[];
73 extern int agate_knife_loc;
75 void LoadingScreen(int part, float progress);
76 void SavingScreen(int part, float progress);
78 void SetStatusMessage(int id, int timer);
80 void ThinLine(SDL_Surface *scr, int x1, int y1, int x2, int y2, Uint8 col);
81 float RandomDir();
83 void Arc(SDL_Surface *s, int x, int y, int r, float dir);
85 extern SDL_Surface *artifact_spr;
86 extern SDL_Surface *agate_knife_spr;
88 void VideoUpdate();
89 void EndCycle(int n);
91 extern int enter_pressed;
93 extern int game_paused;
95 int HoldsUp();
96 int HoldsDown();
97 int HoldsLeft();
98 int HoldsRight();
99 int HoldsPsi();
101 extern int training;
102 extern int show_ending;
104 void DrawLevel(int off_x, int off_y, int hide_not_visited, int fog_of_war);
105 void DrawPlayer(int x, int y, int pl_dir, int pl_frm);
106 int GetNearestCheckpoint(int x, int y);
107 int dist(int x1, int y1, int x2, int y2);
108 #define K_UP 0
109 #define K_DN 1
110 #define K_LT 2
111 #define K_RT 3
112 #define K_SP 4
114 #endif