-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbgi_compat.h
More file actions
51 lines (44 loc) · 1.75 KB
/
Copy pathbgi_compat.h
File metadata and controls
51 lines (44 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
// BGI compatibility layer — drawing primitives, fonts, text, value display, screen save/restore
#include "boiler_globals.h"
// --- BGI drawing state setters/getters ---
void set_render_color(int bgi_c);
void setcolor(int c);
void setfillstyle(int pattern, int c);
void setbkcolor(int c);
int getcolor();
int getmaxx();
int getmaxy();
void moveto(int x, int y);
void settextstyle(int font, int dir, int size);
void setusercharsize(int mx, int dx, int my, int dy);
// --- Drawing primitives ---
void putpixel(int x, int y, int c);
void line(int x1, int y1, int x2, int y2);
void bar(int x1, int y1, int x2, int y2);
void rectangle(int x1, int y1, int x2, int y2);
void circle(int cx, int cy, int r);
void fillellipse(int cx, int cy, int rx, int ry);
void arc(int cx, int cy, int start_angle, int end_angle, int r);
void pieslice(int cx, int cy, int start_angle, int end_angle, int r);
void floodfill(int sx, int sy, int border_bgi_color);
// --- Text rendering ---
void outtextxy(int x, int y, const char *text);
void out_en16(int x, int y, const char *text, float size, float space,
float fat, int direction, int color);
bool load_hzk16(const char *path);
void outhzxy3(int x, int y, const char *p, float size, float space,
float fat, int direction, int color);
// --- Sound functions ---
void Sound(int freq);
void Nosound();
void Delay(int clicks);
void Sound_All(int freq, int clicks);
// --- Value display functions ---
void putout_level(int x, int y, int t);
void putout_temp(int x, int y, int t);
void putout_press(int x, int y, int p);
void print_out(int x, int y, int t);
// --- Screen region save/restore ---
SDL_Surface *save_screen_region(int x, int y, int w, int h);
void restore_screen_region(int x, int y, SDL_Surface *s);