From 39d20fdc8507e927900358d37392efcbb50f874d Mon Sep 17 00:00:00 2001 From: rodri Date: Thu, 31 Aug 2023 14:44:14 +0000 Subject: show the board labels. --- bts.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/bts.c b/bts.c index 1a6478e..9b2b84f 100644 --- a/bts.c +++ b/bts.c @@ -175,6 +175,19 @@ resetgame(void) layoutdone = 0; } +Point +vstring(Image *dst, Point p, Image *src, Point sp, Font *f, char *s) +{ + char buf[2]; + buf[1] = 0; + while(*s){ + buf[0] = *s++; + string(dst, p, src, sp, f, buf); + p.y += font->height; + } + return p; +} + Image * gettileimage(int type) { @@ -257,6 +270,14 @@ drawinfo(Image *dst) p = Pt(SCRW/2 - stringwidth(font, s)/2, 0); string(dst, p, display->white, ZP, font, s); + s = "TARGET"; + p = subpt(alienboard.bbox.min, Pt(font->width+2,0)); + vstring(dst, p, display->white, ZP, font, s); + + s = "LOCAL"; + p = Pt(localboard.bbox.max.x+2, localboard.bbox.min.y); + vstring(dst, p, display->white, ZP, font, s); + if(game.state == Outlaying){ if(c == nil) c = eallocimage(display, Rect(0,0,1,1), screen->chan, 1, DYellow); -- cgit v1.2.3