for(j=0; j<xsz; j++) {
int val = src[j];
if(val > threshold) {
- *dest++ = col[0];
- *dest++ = col[1];
*dest++ = col[2];
+ *dest++ = col[1];
+ *dest++ = col[0];
*dest++ = col[3];
} else {
dest += 4;
app_fullscreen(1);
}
- dtx_target_user(txdraw, 0);
+ /*dtx_target_user(txdraw, 0);*/
+ dtx_target_raster((unsigned char*)framebuf, win_width, win_height);
+ dtx_set(DTX_RASTER_THRESHOLD, 127);
uifont = malloc_nf(sizeof *uifont);
- if(load_font(uifont, "data/uifont12.gmp") == -1) {
+ if(load_font(uifont, "data/uifont14.gmp") == -1) {
free(uifont);
return -1;
}
#ifdef GFX_SW
gaw_sw_framebuffer(x, y, framebuf);
#endif
+ dtx_target_raster((unsigned char*)framebuf, x, y);
win_width = x;
win_height = y;
#include "sizeint.h"
#include "logger.h"
#include "scene.h"
+#include "font.h"
enum {
KEY_BACKSP = 8,
/*
-Deep Runner - 6dof shooter game for the SGI O2.
+RetroRay - integrated standalone vintage modeller/renderer
Copyright (C) 2023 John Tsiombikas <nuclear@mutantstargoat.com>
This program is free software: you can redistribute it and/or modify
/*
-Deep Runner - 6dof shooter game for the SGI O2.
+RetroRay - integrated standalone vintage modeller/renderer
Copyright (C) 2023 John Tsiombikas <nuclear@mutantstargoat.com>
This program is free software: you can redistribute it and/or modify
static void mouse(int bn, int st, int x, int y);
static void motion(int x, int y);
static int translate_skey(int key);
-static void draw_cursor(int x, int y);
#if defined(__unix__) || defined(unix)
#include <GL/glx.h>
static void display(void)
{
app_display();
-
- draw_cursor(mouse_x, mouse_y);
-
app_swap_buffers();
}
return -1;
}
-
-static void draw_cursor(int x, int y)
-{
- int i;
- uint32_t *fbptr = framebuf + y * win_width + x;
-
- for(i=0; i<3; i++) {
- int offs = i + 1;
- if(y > offs) fbptr[-win_width * offs] ^= 0xffffff;
- if(y < win_height - offs - 1) fbptr[win_width * offs] ^= 0xffffff;
- if(x > offs) fbptr[-offs] ^= 0xffffff;
- if(x < win_width - offs - 1) fbptr[offs] ^= 0xffffff;
- }
-}
return res;
}
- sethover(w);
-
if(w->type == RTK_WIN) {
c = w->win.clist;
while(c) {
}
}
- return 1;
+ if(hover != w) {
+ sethover(w);
+ return 1;
+ }
+ return 0;
}
static void mdl_display(void)
{
int i, num;
+ static int frameno;
gaw_clear(GAW_COLORBUF | GAW_DEPTHBUF);
}
}
+ use_font(uifont);
+ dtx_position(560, 475);
+ dtx_color(1, 1, 0, 1);
+ dtx_printf("frame: %ld", frameno++);
+
if(rband_valid) {
draw_rband();
}
vpdrag &= ~(1 << bn);
if(rband_valid) {
- printf("rubber band: %d,%d %dx%d\n", rband.x, rband.y, rband.width, rband.height);
rband_valid = 0;
} else if(bn == 0 && x == rband.x && y == rband.y) {
default:
break;
}
+ app_redisplay();
}
- app_redisplay();
}
}
}
genglyphmap data/src/sans.ttf data/uifont12.gmp 12 32-128
+genglyphmap data/src/sans.ttf data/uifont14.gmp 14 32-128
exit 0