summaryrefslogtreecommitdiff
path: root/hackvr_term
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2018-01-02 06:01:25 -0600
committerepoch <epoch@hacking.allowed.org>2018-01-02 06:01:25 -0600
commit44d8f3acca9a236373df1ced55dd9ddaf76e5d2b (patch)
treec646da49911c0e7aa0aea1ae58246a205bbc5807 /hackvr_term
parentc15571263ffa1afa5d07482f8c19f91024907925 (diff)
downloadhackvr-44d8f3acca9a236373df1ced55dd9ddaf76e5d2b.tar.gz
hackvr-44d8f3acca9a236373df1ced55dd9ddaf76e5d2b.zip
moved the background rectangles closer because they won't interferre with glyphs anymore because of the changed zsort method being used in hackvr
Diffstat (limited to 'hackvr_term')
-rw-r--r--hackvr_term/hackvr_term.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hackvr_term/hackvr_term.c b/hackvr_term/hackvr_term.c
index f315ad6..b7a5b40 100644
--- a/hackvr_term/hackvr_term.c
+++ b/hackvr_term/hackvr_term.c
@@ -6,17 +6,20 @@
#include "libtmt/tmt.h"
void hackvr_draw_character(int c,int r,const TMTCHAR *ch) {
- int s;
int i;
FILE *fp;
char str[16];
char line[256];//whatever
- snprintf(str,sizeof(str)-1,"%02x",ch->c);
+ if(ch->c < 128) {
+ snprintf(str,sizeof(str)-1,"%02lx",ch->c);
+ } else {
+ snprintf(str,sizeof(str)-1,"%08lx",ch->c);
+ }
if((fp=fopen("font","r")) == NULL ) {
printf("# fail to open font\n");
return;
}
- printf("term_%02d_%02d addshape %d 4 -1 -3 10 5 -3 10 5 7 10 -1 7 10\n",c,r,ch->a.bg+15);
+ printf("term_%02d_%02d addshape %d 4 -1 -3 0 5 -3 0 5 7 0 -1 7 0\n",c,r,ch->a.bg+15);
for(i=0;fgets(line,sizeof(line)-1,fp) != 0;i++) {
if(!strncmp(str,line,2)) {
printf("term_%02d_%02d addshape %d %s",c,r,ch->a.fg==-1?2:ch->a.fg+15,line+strlen("XX addshape X "));