mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-21 14:32:20 +00:00
Update devcontainer
This commit is contained in:
parent
9e004a34c9
commit
77c17d2bcd
3 changed files with 18 additions and 13 deletions
|
@ -1,5 +1,11 @@
|
|||
{
|
||||
"name": "devkitPPC",
|
||||
"image": "devkitpro/devkitppc:latest",
|
||||
"extensions": ["ms-vscode.cpptools"]
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-vscode.cpptools"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*------------------------------------------------------------------------------
|
||||
Copyright (c) 2009-2019 The GRRLIB Team
|
||||
Copyright (c) 2009-2023 The GRRLIB Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -43,16 +43,15 @@ void GRRLIB_Printf (const f32 xpos, const f32 ypos,
|
|||
return;
|
||||
}
|
||||
|
||||
int i, size;
|
||||
char tmp[1024];
|
||||
f32 offset = tex->tilew * zoom;
|
||||
|
||||
va_list argp;
|
||||
va_start(argp, text);
|
||||
size = vsnprintf(tmp, sizeof(tmp), text, argp);
|
||||
const int size = vsnprintf(tmp, sizeof(tmp), text, argp);
|
||||
va_end(argp);
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
GRRLIB_DrawTile(xpos+i*offset, ypos, tex, 0, zoom, zoom, color,
|
||||
tmp[i] - tex->tilestart);
|
||||
}
|
||||
|
@ -70,22 +69,20 @@ void GRRLIB_Printf (const f32 xpos, const f32 ypos,
|
|||
void GRRLIB_PrintBMF (const f32 xpos, const f32 ypos,
|
||||
const GRRLIB_bytemapFont *bmf,
|
||||
const char *text, ...) {
|
||||
u32 i, size;
|
||||
u8 x, y;
|
||||
char tmp[1024];
|
||||
f32 xoff = xpos;
|
||||
const GRRLIB_bytemapChar *pchar;
|
||||
|
||||
va_list argp;
|
||||
va_start(argp, text);
|
||||
size = vsnprintf(tmp, sizeof(tmp), text, argp);
|
||||
const u32 size = vsnprintf(tmp, sizeof(tmp), text, argp);
|
||||
va_end(argp);
|
||||
|
||||
for (i=0; i<size; i++) {
|
||||
for (u32 i = 0; i < size; i++) {
|
||||
pchar = &bmf->charDef[(u8)tmp[i]];
|
||||
u8 *pdata = pchar->data;
|
||||
for (y=0; y<pchar->height; y++) {
|
||||
for (x=0; x<pchar->width; x++) {
|
||||
for (u8 y = 0; y<pchar->height; y++) {
|
||||
for (u8 x = 0; x<pchar->width; x++) {
|
||||
if (*pdata) {
|
||||
GRRLIB_Plot(xoff + x + pchar->relx,
|
||||
ypos + y + pchar->rely,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*------------------------------------------------------------------------------
|
||||
Copyright (c) 2009-2020 The GRRLIB Team
|
||||
Copyright (c) 2009-2023 The GRRLIB Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -133,7 +133,9 @@ void GRRLIB_PrintfTTFW(int x, int y, GRRLIB_ttfFont *myFont, const wchar_t *utf3
|
|||
FT_GlyphSlot slot = Face->glyph;
|
||||
FT_UInt glyphIndex;
|
||||
FT_UInt previousGlyph = 0;
|
||||
u8 cR = R(color), cG = G(color), cB = B(color);
|
||||
const u8 cR = R(color);
|
||||
const u8 cG = G(color);
|
||||
const u8 cB = B(color);
|
||||
|
||||
if (FT_Set_Pixel_Sizes(Face, 0, fontSize) != 0) {
|
||||
FT_Set_Pixel_Sizes(Face, 0, 12);
|
||||
|
|
Loading…
Reference in a new issue