From 60ca0807c066028fb144aea33da8e1f9cc94338e Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Sun, 4 Jun 2023 10:21:17 +0300 Subject: [PATCH] foo --- GNUmakefile | 2 +- src/app.c | 2 +- src/modern/main.c | 2 +- src/options.c | 2 +- src/rtk.h | 23 +++++++++++++++++++++++ tools/procdata | 11 +++++++++++ 6 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 src/rtk.h create mode 100755 tools/procdata diff --git a/GNUmakefile b/GNUmakefile index 9dbd84f..fb746ac 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -12,7 +12,7 @@ gawsrc_sw = src/gaw/gaw_sw.c src/gaw/gawswtnl.c src/gaw/polyfill.c src/gaw/polyc src = $(wildcard src/*.c) $(wildcard src/modern/*.c) $(gawsrc_$(build_gfx)) obj = $(src:.c=.o) dep = $(src:.c=.d) -bin = retrorend +bin = retroray warn = -pedantic -Wall dbg = -g diff --git a/src/app.c b/src/app.c index 833ce5f..e3af5ab 100644 --- a/src/app.c +++ b/src/app.c @@ -67,7 +67,7 @@ int app_init(void) dtx_target_user(txdraw, 0); uifont = malloc_nf(sizeof *uifont); - if(load_font(uifont, "data/uifont.gmp") == -1) { + if(load_font(uifont, "data/uifont12.gmp") == -1) { free(uifont); return -1; } diff --git a/src/modern/main.c b/src/modern/main.c index d6682cc..e511b65 100644 --- a/src/modern/main.c +++ b/src/modern/main.c @@ -48,7 +48,7 @@ static PROC wgl_swap_interval_ext; int main(int argc, char **argv) { glutInit(&argc, argv); - glutInitWindowSize(1024, 768); + glutInitWindowSize(640, 480); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); glutCreateWindow("RetroRay"); diff --git a/src/options.c b/src/options.c index c61848b..97b2531 100644 --- a/src/options.c +++ b/src/options.c @@ -24,7 +24,7 @@ along with this program. If not, see . #define DEF_XRES 640 #define DEF_YRES 480 #define DEF_VSYNC 1 -#define DEF_FULLSCR 1 +#define DEF_FULLSCR 0 #define DEF_MOUSE_SPEED 50 #define DEF_SBALL_SPEED 50 diff --git a/src/rtk.h b/src/rtk.h new file mode 100644 index 0000000..47470f1 --- /dev/null +++ b/src/rtk.h @@ -0,0 +1,23 @@ +#ifndef RTK_H_ +#define RTK_H_ + +enum { RTK_ANY, RTK_WIN, RTK_BUTTON, RTK_LABEL, RTK_CHECKBOX, RTK_SLIDER }; + +typedef struct rtk_any { + int type; + int x, y, width, height; + char *text; +} rtk_any, rtk_label; + +typedef union rtk_widget { + int type; + rtk_any any; + rtk_window win; + rtk_button bn; + rtk_label lb; + rtk_checkbox chk; +} rtk_widget; + +rtk_widget *rtk_create_window(rtk_widget *par, int x, int y, int w, int h); + +#endif /* RTK_H_ */ diff --git a/tools/procdata b/tools/procdata new file mode 100755 index 0000000..f0fbd5b --- /dev/null +++ b/tools/procdata @@ -0,0 +1,11 @@ +#!/bin/sh + +genglyphmap() +{ + echo "generate glyphmap: $1 -> $2" + font2glyphmap -size $3 -padding 5 -range $4 -o $2 $1 +} + +genglyphmap data/src/sans.ttf data/uifont12.gmp 12 32-128 + +exit 0 -- 1.7.10.4