Skip to content

Commit

Permalink
QUEST64: 滤镜使用点阵字库绘制文字
Browse files Browse the repository at this point in the history
  • Loading branch information
prefetchnta committed Nov 12, 2024
1 parent 29a09e7 commit 3be92d0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Binary file modified bin/x64bin/fQUEST64.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions nexts.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
+
+
+
2024-11-11 @ 16:26
~~~~~~~~~~~~~~~~~~
还是点阵字体好看啊!
+
+
+
2024-09-25 @ 17:33
~~~~~~~~~~~~~~~~~~
Expand Down
11 changes: 7 additions & 4 deletions src/QUEST64/filter.inl
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ quest64_draw_codes (
__CR_IN__ uint_t count
)
{
cpix_t color, bkcolor;

bkcolor.val = 0x800000FF;
for (uint_t idx = 0; idx < count; idx++)
{
bool okay;
cpix_t color;
ansi_t* dtype = texts[idx * 2];
ansi_t* dinfo = texts[idx * 2 + 1];

Expand Down Expand Up @@ -158,10 +160,11 @@ quest64_draw_codes (
imglab_xpoly_get(&pnt[3], imglab_xpoly_idx(ply, 3));
pnt[0].x += pnt[1].x + pnt[2].x + pnt[3].x;
pnt[0].y += pnt[1].y + pnt[2].y + pnt[3].y;
imglab_text_size(&pnt[1], shw, FONT_OCV_HERSHEY_DUPLEX, 12, 1);
imglab_calc_gb2312(&pnt[1], shw, 16);
pnt[0].x = pnt[0].x / 4 - pnt[1].x / 2;
pnt[0].y = pnt[0].y / 4 + pnt[1].y / 2;
imglab_draw_text(cvmat, shw, pnt->x, pnt->y, FONT_OCV_HERSHEY_DUPLEX, 12, color, 1);
pnt[0].y = pnt[0].y / 4 - pnt[1].y / 2;
imglab_draw_gb2312(cvmat, shw, pnt->x, pnt->y, 16,
CR_BLT_ALP, color, bkcolor);
mem_free(shw);
}
}
Expand Down

0 comments on commit 3be92d0

Please sign in to comment.