This repository has been archived by the owner on Oct 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
screen.h
69 lines (56 loc) · 2.39 KB
/
screen.h
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* Xep128: Minimalistic Enterprise-128 emulator with focus on "exotic" hardware
Copyright (C)2015,2016 LGB (Gábor Lénárt) <[email protected]>
http://xep128.lgb.hu/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef __XEP128_SCREEN_H_INCLUDED
#define __XEP128_SCREEN_H_INCLUDED
#include <SDL_video.h>
#ifdef XEP128_NEED_SDL_WMINFO
# include <SDL_syswm.h>
#endif
#define SCREEN_WIDTH 736
#define SCREEN_HEIGHT 288
#ifdef __EMSCRIPTEN__
//#define SCREEN_FORMAT SDL_PIXELFORMAT_ABGR8888
#define SCREEN_FORMAT SDL_PIXELFORMAT_ARGB8888
#else
#define SCREEN_FORMAT SDL_PIXELFORMAT_ARGB8888
#endif
#define OSD_FADE_START 300
#define OSD_FADE_STOP 0x80
#define OSD_FADE_DEC 3
extern int is_fullscreen, warn_for_mouse_grab;
extern SDL_Window *sdl_win;
extern SDL_PixelFormat *sdl_pixel_format;
#ifdef XEP128_NEED_SDL_WMINFO
extern SDL_SysWMinfo sdl_wminfo;
#endif
extern Uint32 sdl_winid;
extern int _sdl_emu_secured_message_box_ ( Uint32 sdlflag, const char *msg );
extern int _sdl_emu_secured_modal_box_ ( const char *items_in, const char *msg );
extern void screen_grab ( SDL_bool state );
extern void screen_window_resized ( int new_xsize, int new_ysize );
extern void screen_set_fullscreen ( int state );
extern void screen_present_frame (Uint32 *ep_pixels);
extern int screen_shot ( Uint32 *ep_pixels, const char *directory, const char *filename );
extern int screen_init ( void );
extern void sdl_burn_events ( void );
extern void osd_disable ( void );
extern void osd_clear ( void );
extern void osd_update ( void );
extern void osd_write_char ( int x, int y, char ch );
extern void osd_write_string ( int x, int y, const char *s );
extern void osd_write_string_centered ( int y, const char *s );
extern void osd_notification ( const char *s );
extern void osd_replay ( int fade );
#endif