summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hackvr_term/hackvr_term.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/hackvr_term/hackvr_term.c b/hackvr_term/hackvr_term.c
index b7a5b40..175680f 100644
--- a/hackvr_term/hackvr_term.c
+++ b/hackvr_term/hackvr_term.c
@@ -5,6 +5,15 @@
#include <errno.h>
#include "libtmt/tmt.h"
+//these numbers include the space between characters
+//apple401 font is this wide:
+//#define FONTW 14
+//#define FONTH 16
+
+//epoch font is this wide:
+#define FONTW 6
+#define FONTH 10
+
void hackvr_draw_character(int c,int r,const TMTCHAR *ch) {
int i;
FILE *fp;
@@ -19,13 +28,13 @@ void hackvr_draw_character(int c,int r,const TMTCHAR *ch) {
printf("# fail to open font\n");
return;
}
- 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);
+ //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 "));
}
}
- if(i) printf("term_%02d_%02d move %d %d 0\n",c,r,c*6,-r*10);
+ if(i) printf("term_%02d_%02d move %d %d 0\n",c,r,c*FONTW,-r*FONTH);
fclose(fp);
}