4 // Copyright 2007, 2008 Lancer-X/ASCEAI
6 // This file is part of Meritous Recharged.
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
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
;
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
;
54 extern int shield_recover
;
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
);
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
;
91 extern int enter_pressed
;
93 extern int game_paused
;
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
);