- refactored the coordinate printout to a stat and removed printext256 and the associated font.

This commit is contained in:
Christoph Oelckers 2019-12-23 20:55:12 +01:00
parent 3b98635170
commit 9ab8a8c737
28 changed files with 117 additions and 988 deletions

View file

@ -717,9 +717,7 @@ set (PCH_SOURCES
build/src/pragmas.cpp
build/src/scriptfile.cpp
build/src/sdlayer.cpp
build/src/smalltextfont.cpp
build/src/softsurface.cpp
build/src/textfont.cpp
build/src/tiles.cpp
build/src/timer.cpp
build/src/voxmodel.cpp

View file

@ -100,6 +100,7 @@ struct GameInterface : ::GameInterface
void DoPrintMessage(int prio, const char*) override;
void DrawCenteredTextScreen(const DVector2& origin, const char* text, int position, bool bg);
void QuitToTitle() override;
FString GetCoordString() override;
GameStats getStats() override;
};

View file

@ -3523,37 +3523,7 @@ RORHACK:
}
viewDisplayMessage();
CalcFrameRate();
#if 0
if (gShowFrameRate)
{
int fX, fY;
if (gViewMode == 3)
{
fX = gViewX1;
}
else
{
fX = xdim;
}
if (gViewMode == 3)
{
fY = gViewY0;
}
else
{
fY = 0;
}
if (gViewMode == 4)
{
fY += mulscale16(20, yscale);
}
sprintf(gTempStr, "%3i", gFrameRate);
printext256(fX-12, fY, 31, -1, gTempStr, 1);
fY += 8;
sprintf(gTempStr, "pos=%d,%d,%d", gView->pSprite->x, gView->pSprite->y, gView->pSprite->z);
printext256(fX-strlen(gTempStr)*4, fY, 31, -1, gTempStr, 1);
}
#endif
viewDrawMapTitle();
viewDrawAimedPlayerName();
if (gPaused)
@ -3806,6 +3776,12 @@ FString GameInterface::statFPS(void)
return output;
}
FString GameInterface::GetCoordString()
{
return "Player pos is unknown"; // todo: output at least something useful.
}
#undef FPS_COLOR
class ViewLoadSave : public LoadSave {

View file

@ -198,6 +198,7 @@ struct GameInterface
virtual void DrawPlayerSprite(const DVector2& origin, bool onteam) {}
virtual void QuitToTitle() {}
virtual void SetAmbience(bool on) {}
virtual FString GetCoordString() { return "'stat coord' not implemented"; }
};

View file

@ -836,8 +836,6 @@ void rotatesprite_(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnu
int32_t cx1, int32_t cy1, int32_t cx2, int32_t cy2);
void renderDrawLine(int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint8_t col);
void drawlinergb(int32_t x1, int32_t y1, int32_t x2, int32_t y2, palette_t p);
void printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol,
const char *name, char fontsize) ATTRIBUTE((nonnull(5)));
////////// specialized rotatesprite wrappers for (very) often used cases //////////
static FORCE_INLINE void rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum,

View file

@ -53,7 +53,6 @@ enum {
INVALIDATE_ART_NON_INDEXED
};
int32_t polymost_printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, const char *name, char fontsize);
extern float curpolygonoffset;

View file

@ -172,8 +172,6 @@ uint16_t ATTRIBUTE((used)) sqrtable[4096], ATTRIBUTE((used)) shlookup[4096+256],
char britable[16][256]; // JBF 20040207: full 8bit precision
extern char textfont[2048], smalltextfont[2048];
static char kensmessage[128];
const char *engineerrstr = "No error";
@ -4648,49 +4646,6 @@ static void classicDrawBunches(int32_t bunch)
searchstat = (nextsectnum < 0) ? 0 : 4;
}
}
#ifdef ENGINE_SCREENSHOT_DEBUG
if (engine_screenshot)
# ifdef YAX_ENABLE
if (!g_nodraw)
# endif
{
static char fn[32], tmpbuf[80];
char purple = paletteGetClosestColor(255, 0, 255);
char yellow = paletteGetClosestColor(255, 255, 0);
char *bakframe = (char *)Xaligned_alloc(16, xdim*ydim);
videoBeginDrawing(); //{{{
Bmemcpy(bakframe, (char *)frameplace, xdim*ydim);
for (x=0; x<xdim; x++)
{
if (umost[x] > dmost[x])
{
*((char *)frameplace + (ydim/2)*bytesperline + x) = yellow;
*((char *)frameplace + (ydim/2+1)*bytesperline + x) = purple;
continue;
}
if (umost[x] >= 0 && umost[x] < ydim)
*((char *)frameplace + umost[x]*bytesperline + x) = purple;
if (dmost[x]-1 >= 0 && dmost[x]-1 < ydim)
*((char *)frameplace + (dmost[x]-1)*bytesperline + x) = yellow;
}
Bsprintf(tmpbuf, "nmp%d l%d b%d s%d w%d", yax_nomaskpass, yax_globallev-YAX_MAXDRAWS,
yax_globalbunch, sectnum, wallnum);
printext256(8,8, whitecol,0, tmpbuf, 0);
videoCaptureScreen();
engine_screenshot++;
Bmemcpy((char *)frameplace, bakframe, xdim*ydim);
videoEndDrawing(); //}}}
Xaligned_free(bakframe);
}
#endif
}
}
@ -7467,13 +7422,6 @@ static int32_t engineLoadTables(void)
for (i=0; i<5120; i++)
qradarang[10239-i] = -qradarang[i];
// TABLES.DAT format:
//fr.Read(sintable,2048*2);
//fr.Read(radarang,640*2);
//fr.Read(textfont,1024);
//fr.Read(smalltextfont,1024);
//fr.Read(britable,1024);
calcbritable();
tablesloaded = 1;
@ -12098,61 +12046,6 @@ static int32_t printext_checkypos(int32_t ypos, int32_t *yminptr, int32_t *ymaxp
}
//
// printext256
//
void printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, const char *name, char fontsize)
{
int32_t stx, i, x, y, charxsiz;
char *fontptr, *letptr, *ptr;
stx = xpos;
if (fontsize) { fontptr = smalltextfont; charxsiz = 4; }
else { fontptr = textfont; charxsiz = 8; }
#ifdef USE_OPENGL
if (!polymost_printext256(xpos,ypos,col,backcol,name,fontsize)) return;
#endif
videoBeginDrawing(); //{{{
for (i=0; name[i]; i++)
{
if (name[i] == '^' && isdigit(name[i+1]))
{
char smallbuf[8];
int32_t bi=0;
while (isdigit(name[i+1]) && bi<3)
{
smallbuf[bi++]=name[i+1];
i++;
}
smallbuf[bi++]=0;
if (col)col = Batol(smallbuf);
continue;
}
if (stx-fontsize+charxsiz > xdim)
break;
letptr = &fontptr[name[i]<<3];
ptr = (char *)(ylookup[ypos+7]+(stx-fontsize)+frameplace);
for (y=7; y>=0; y--)
{
for (x=charxsiz-1; x>=0; x--)
{
if (letptr[y]&pow2char[7-fontsize-x])
ptr[x] = (uint8_t)col;
else if (backcol >= 0)
ptr[x] = (uint8_t)backcol;
}
ptr -= ylookup[1];
}
stx += charxsiz;
}
videoEndDrawing(); //}}}
}
//

View file

@ -63,8 +63,6 @@ CUSTOM_CVARD(Int, hw_anisotropy, 4, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "changes t
// For testing - will be removed later.
CVAR(Int, skytile, 0, 0)
extern char textfont[2048], smalltextfont[2048];
bool playing_rr;
bool playing_blood;
@ -5192,178 +5190,6 @@ void polymost_fillpolygon(int32_t npoints)
tessectrap((float *)rx1,(float *)ry1,xb1,npoints);
}
static int32_t gen_font_glyph_tex(void)
{
// construct a 256x128 texture for the font glyph matrix
polymosttext = GLInterface.NewTexture();
if (!polymosttext) return -1;
char * const tbuf = (char *)Xmalloc(256*128*4);
Bmemset(tbuf, 0, 256*128*4);
char * cptr = (char *)textfont;
for (bssize_t h=0; h<256; h++)
{
char *tptr = tbuf + (h%32)*8*4 + (h/32)*256*8*4;
for (bssize_t i=0; i<8; i++)
{
for (bssize_t j=0; j<8; j++)
{
if (cptr[h*8+i] & pow2char[7-j])
{
Bmemset(tptr+4*j, 255, 4);
}
}
tptr += 256*4;
}
}
cptr = (char *)smalltextfont;
for (bssize_t h=0; h<256; h++)
{
char *tptr = tbuf + 256*64*4 + (h%32)*8*4 + (h/32)*256*8*4;
for (bssize_t i=1; i<7; i++)
{
for (bssize_t j=2; j<6; j++)
{
if (cptr[h*8+i] & pow2char[7-j])
{
Bmemset(tptr+4*(j-2), 255, 4);
}
}
tptr += 256*4;
}
}
polymosttext->CreateTexture(256, 128, FHardwareTexture::TrueColor, false);
polymosttext->LoadTexture((uint8_t*)tbuf);
polymosttext->SetSampler(SamplerNoFilterClampXY);
Xfree(tbuf);
return 0;
}
int32_t polymost_printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, const char *name, char fontsize)
{
int const arbackcol = (unsigned)backcol < 256 ? backcol : 0;
polymost_outputGLDebugMessage(3, "polymost_printtext256(xpos:%d, ypos:%d, col:%hd, backcol:%hd, name:%p, fontsize:%hhu)",
xpos, ypos, col, backcol, name, fontsize);
// FIXME?
if (col < 0)
col = 0;
palette_t p, b;
bricolor(&p, col);
bricolor(&b, arbackcol);
if (videoGetRenderMode() < REND_POLYMOST || !in3dmode() || (!polymosttext && gen_font_glyph_tex() < 0))
return -1;
GLInterface.BindTexture(0, polymosttext);
polymostSet2dView(); // disables blending, texturing, and depth testing
GLInterface.EnableAlphaTest(false);
GLInterface.SetDepthMask(false);
// We want to have readable text in wireframe mode, too:
GLInterface.SetWireframe(false);
lastglpolygonmode = 0;
if (backcol >= 0)
{
int const c = Bstrlen(name);
GLInterface.SetColorub(b.r,b.g,b.b,255);
auto data = GLInterface.AllocVertices(4);
auto vt = data.second;
vt->SetTexCoord(); vt->SetVertex(xpos, ypos); vt++;
vt->SetTexCoord(); vt->SetVertex(xpos, ypos + (fontsize ? 6 : 8)); vt++;
vt->SetTexCoord(); vt->SetVertex(xpos + (c << (3 - fontsize)), ypos + (fontsize ? 6 : 8)); vt++;
vt->SetTexCoord(); vt->SetVertex(xpos+(c<<(3-fontsize)), ypos);
GLInterface.Draw(DT_TRIANGLE_FAN, data.first, 4);
}
GLInterface.EnableBlend(true);
GLInterface.SetColorub(p.r,p.g,p.b,255);
vec2f_t const tc = { fontsize ? (4.f / 256.f) : (8.f / 256.f),
fontsize ? (6.f / 128.f) : (8.f / 128.f) };
for (bssize_t c=0; name[c]; ++c)
{
if (name[c] == '^' && isdigit(name[c+1]))
{
char smallbuf[8];
int bi = 0;
while (isdigit(name[c+1]) && bi<3)
{
smallbuf[bi++]=name[c+1];
c++;
}
smallbuf[bi++] = 0;
if (col)
{
col = Batol(smallbuf);
if ((unsigned) col >= 256)
col = 0;
}
bricolor(&p, col);
GLInterface.SetColorub(p.r, p.g, p.b, 255);
continue;
}
vec2f_t const t = { (float)(name[c] % 32) * (1.0f / 32.f),
(float)((name[c] / 32) + (fontsize * 8)) * (1.0f / 16.f) };
auto data = GLInterface.AllocVertices(4);
auto vt = data.second;
vt->SetTexCoord(t.x, t.y);
vt->SetVertex(xpos, ypos);
vt++;
vt->SetTexCoord(t.x + tc.x, t.y);
vt->SetVertex(xpos + (8 >> fontsize), ypos);
vt++;
vt->SetTexCoord(t.x + tc.x, t.y + tc.y);
vt->SetVertex(xpos + (8 >> fontsize), ypos + (fontsize ? 6 : 8));
vt++;
vt->SetTexCoord(t.x, t.y + tc.y);
vt->SetVertex(xpos, ypos + (fontsize ? 6 : 8));
vt++;
GLInterface.Draw(DT_TRIANGLE_FAN, data.first, 4);
xpos += (8>>fontsize);
}
GLInterface.SetDepthMask(true);
return 0;
}
void polymost_initosdfuncs(void)

View file

@ -1,180 +0,0 @@
// SMALLTEXTFONT.C
// Font created by Ken Silverman
// Generated by BIN2C.EXE by Jonathon Fowler
char smalltextfont[2048] =
{
// 2048 bytes
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x24,
0x3C, 0x18, 0x00, 0x00, 0x00, 0x18, 0x24, 0x3C, 0x24, 0x18, 0x00, 0x00,
0x00, 0x28, 0x3C, 0x3C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x10, 0x38, 0x3C,
0x38, 0x10, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x3C, 0x00, 0x00,
0x00, 0x18, 0x18, 0x3C, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x28, 0x38, 0x38, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x14, 0x14, 0x30, 0x00, 0x00,
0x00, 0x24, 0x18, 0x3C, 0x18, 0x24, 0x00, 0x00, 0x00, 0x20, 0x30, 0x38,
0x30, 0x20, 0x00, 0x00, 0x00, 0x08, 0x18, 0x38, 0x18, 0x08, 0x00, 0x00,
0x00, 0x10, 0x38, 0x10, 0x38, 0x10, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28,
0x00, 0x28, 0x00, 0x00, 0x00, 0x1C, 0x34, 0x34, 0x14, 0x14, 0x00, 0x00,
0x00, 0x1C, 0x30, 0x28, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x38, 0x38, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10, 0x38, 0x38, 0x00, 0x00,
0x00, 0x10, 0x38, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10,
0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x3C, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x28, 0x28, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x3C, 0x28, 0x3C, 0x28, 0x00, 0x00,
0x00, 0x18, 0x30, 0x10, 0x18, 0x30, 0x00, 0x00, 0x00, 0x28, 0x08, 0x10,
0x20, 0x28, 0x00, 0x00, 0x00, 0x10, 0x28, 0x10, 0x30, 0x38, 0x00, 0x00,
0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x20,
0x20, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x08, 0x08, 0x10, 0x00, 0x00,
0x00, 0x00, 0x28, 0x10, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10, 0x00,
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10, 0x10, 0x20, 0x00, 0x00,
0x00, 0x38, 0x28, 0x28, 0x28, 0x38, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10,
0x10, 0x10, 0x00, 0x00, 0x00, 0x38, 0x08, 0x38, 0x20, 0x38, 0x00, 0x00,
0x00, 0x38, 0x08, 0x38, 0x08, 0x38, 0x00, 0x00, 0x00, 0x28, 0x28, 0x38,
0x08, 0x08, 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x08, 0x38, 0x00, 0x00,
0x00, 0x38, 0x20, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x38, 0x08, 0x08,
0x08, 0x08, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x28, 0x38, 0x00, 0x00,
0x00, 0x38, 0x28, 0x38, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x20, 0x00, 0x00,
0x00, 0x08, 0x10, 0x20, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00,
0x38, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x10, 0x20, 0x00, 0x00,
0x00, 0x30, 0x08, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38,
0x30, 0x38, 0x00, 0x00, 0x00, 0x10, 0x28, 0x38, 0x28, 0x28, 0x00, 0x00,
0x00, 0x30, 0x28, 0x30, 0x28, 0x30, 0x00, 0x00, 0x00, 0x18, 0x20, 0x20,
0x20, 0x18, 0x00, 0x00, 0x00, 0x30, 0x28, 0x28, 0x28, 0x30, 0x00, 0x00,
0x00, 0x38, 0x20, 0x30, 0x20, 0x38, 0x00, 0x00, 0x00, 0x38, 0x20, 0x30,
0x20, 0x20, 0x00, 0x00, 0x00, 0x38, 0x20, 0x28, 0x28, 0x38, 0x00, 0x00,
0x00, 0x28, 0x28, 0x38, 0x28, 0x28, 0x00, 0x00, 0x00, 0x38, 0x10, 0x10,
0x10, 0x38, 0x00, 0x00, 0x00, 0x38, 0x08, 0x08, 0x28, 0x18, 0x00, 0x00,
0x00, 0x28, 0x28, 0x30, 0x28, 0x28, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20,
0x20, 0x38, 0x00, 0x00, 0x00, 0x28, 0x38, 0x38, 0x28, 0x28, 0x00, 0x00,
0x00, 0x28, 0x38, 0x38, 0x38, 0x28, 0x00, 0x00, 0x00, 0x38, 0x28, 0x28,
0x28, 0x38, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x20, 0x20, 0x00, 0x00,
0x00, 0x38, 0x28, 0x28, 0x38, 0x18, 0x00, 0x00, 0x00, 0x38, 0x28, 0x30,
0x28, 0x28, 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x08, 0x38, 0x00, 0x00,
0x00, 0x38, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28,
0x28, 0x38, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x10, 0x10, 0x00, 0x00,
0x00, 0x28, 0x28, 0x38, 0x38, 0x28, 0x00, 0x00, 0x00, 0x28, 0x28, 0x10,
0x28, 0x28, 0x00, 0x00, 0x00, 0x28, 0x28, 0x38, 0x10, 0x10, 0x00, 0x00,
0x00, 0x38, 0x08, 0x10, 0x20, 0x38, 0x00, 0x00, 0x00, 0x30, 0x20, 0x20,
0x20, 0x30, 0x00, 0x00, 0x00, 0x20, 0x10, 0x10, 0x08, 0x08, 0x00, 0x00,
0x00, 0x18, 0x08, 0x08, 0x08, 0x18, 0x00, 0x00, 0x00, 0x10, 0x28, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
0x28, 0x18, 0x00, 0x00, 0x00, 0x20, 0x20, 0x38, 0x28, 0x38, 0x00, 0x00,
0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x00, 0x00, 0x00, 0x08, 0x08, 0x38,
0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x18, 0x00, 0x00,
0x00, 0x08, 0x10, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28,
0x18, 0x08, 0x30, 0x00, 0x00, 0x20, 0x20, 0x38, 0x28, 0x28, 0x00, 0x00,
0x00, 0x00, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
0x10, 0x10, 0x20, 0x00, 0x00, 0x20, 0x20, 0x28, 0x30, 0x28, 0x00, 0x00,
0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x38,
0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x28, 0x28, 0x00, 0x00,
0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
0x28, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x08, 0x00,
0x00, 0x00, 0x00, 0x38, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
0x10, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10, 0x10, 0x00, 0x00,
0x00, 0x00, 0x00, 0x28, 0x28, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28,
0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x00, 0x00,
0x00, 0x00, 0x00, 0x28, 0x10, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28,
0x28, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x18, 0x00, 0x00,
0x00, 0x18, 0x10, 0x20, 0x10, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00,
0x10, 0x10, 0x00, 0x00, 0x00, 0x30, 0x10, 0x08, 0x10, 0x30, 0x00, 0x00,
0x00, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28,
0x38, 0x00, 0x00, 0x00, 0x00, 0x18, 0x20, 0x20, 0x20, 0x18, 0x30, 0x00,
0x00, 0x28, 0x00, 0x28, 0x28, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18,
0x38, 0x18, 0x00, 0x00, 0x00, 0x38, 0x00, 0x18, 0x28, 0x18, 0x00, 0x00,
0x00, 0x28, 0x00, 0x18, 0x28, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x18,
0x28, 0x18, 0x00, 0x00, 0x00, 0x00, 0x10, 0x18, 0x28, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x10, 0x00, 0x00, 0x38, 0x00, 0x18,
0x38, 0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x18, 0x38, 0x18, 0x00, 0x00,
0x00, 0x30, 0x00, 0x18, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00,
0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x10, 0x10, 0x00, 0x00,
0x00, 0x00, 0x30, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x28, 0x10, 0x28,
0x38, 0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x38, 0x28, 0x00, 0x00,
0x00, 0x18, 0x00, 0x38, 0x30, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
0x28, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x28, 0x3C, 0x28, 0x2C, 0x00, 0x00,
0x00, 0x38, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x28, 0x00, 0x38,
0x28, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00,
0x00, 0x38, 0x00, 0x28, 0x28, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x28,
0x28, 0x18, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x28, 0x18, 0x30, 0x00,
0x00, 0x28, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28,
0x28, 0x38, 0x00, 0x00, 0x00, 0x10, 0x38, 0x20, 0x38, 0x10, 0x00, 0x00,
0x00, 0x18, 0x14, 0x30, 0x10, 0x3C, 0x00, 0x00, 0x00, 0x28, 0x10, 0x38,
0x38, 0x10, 0x00, 0x00, 0x00, 0x30, 0x28, 0x3C, 0x28, 0x2C, 0x00, 0x00,
0x00, 0x18, 0x10, 0x38, 0x10, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18,
0x28, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x10, 0x10, 0x00, 0x00,
0x00, 0x18, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x18, 0x00, 0x28,
0x28, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x28, 0x28, 0x00, 0x00,
0x00, 0x38, 0x00, 0x28, 0x38, 0x28, 0x00, 0x00, 0x00, 0x18, 0x28, 0x18,
0x00, 0x38, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x00, 0x38, 0x00, 0x00,
0x00, 0x10, 0x00, 0x10, 0x20, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x00, 0x00, 0x00,
0x00, 0x20, 0x28, 0x10, 0x38, 0x18, 0x00, 0x00, 0x00, 0x20, 0x28, 0x18,
0x38, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x00,
0x00, 0x00, 0x14, 0x28, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x14,
0x28, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x08, 0x20, 0x08, 0x20, 0x00,
0x00, 0x14, 0x28, 0x14, 0x28, 0x14, 0x28, 0x00, 0x00, 0x34, 0x1C, 0x34,
0x1C, 0x34, 0x1C, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00,
0x00, 0x10, 0x10, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x30,
0x30, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x38, 0x18, 0x18, 0x18, 0x00,
0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x30,
0x30, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x38, 0x38, 0x18, 0x18, 0x00,
0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x38,
0x38, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x38, 0x38, 0x00, 0x00, 0x00,
0x00, 0x18, 0x18, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x30,
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x00,
0x00, 0x10, 0x10, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x3C,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x10, 0x10, 0x10, 0x00,
0x00, 0x10, 0x10, 0x1C, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C,
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x3C, 0x10, 0x10, 0x10, 0x00,
0x00, 0x10, 0x10, 0x1C, 0x1C, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x1C,
0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x1C, 0x1C, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1C, 0x1C, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x3C,
0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3C, 0x18, 0x18, 0x00,
0x00, 0x18, 0x18, 0x1C, 0x1C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x3C,
0x3C, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00,
0x00, 0x10, 0x10, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x3C,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3C, 0x10, 0x10, 0x00,
0x00, 0x00, 0x00, 0x3C, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x1C,
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1C, 0x1C, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1C, 0x1C, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C,
0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x3C, 0x18, 0x18, 0x18, 0x00,
0x00, 0x10, 0x10, 0x3C, 0x3C, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x30,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x10, 0x10, 0x10, 0x00,
0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00,
0x00, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x00, 0x00, 0x3C, 0x3C, 0x3C,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x28, 0x34, 0x00, 0x00,
0x00, 0x30, 0x28, 0x30, 0x28, 0x30, 0x20, 0x00, 0x00, 0x38, 0x28, 0x20,
0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x18, 0x18, 0x00, 0x00,
0x00, 0x38, 0x20, 0x10, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x30, 0x20, 0x00, 0x00,
0x00, 0x00, 0x14, 0x28, 0x08, 0x08, 0x00, 0x00, 0x00, 0x38, 0x10, 0x28,
0x10, 0x38, 0x00, 0x00, 0x00, 0x10, 0x28, 0x38, 0x28, 0x10, 0x00, 0x00,
0x00, 0x18, 0x24, 0x24, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x18, 0x10, 0x18,
0x28, 0x38, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, 0x00,
0x00, 0x04, 0x18, 0x3C, 0x18, 0x20, 0x00, 0x00, 0x00, 0x18, 0x20, 0x30,
0x20, 0x18, 0x00, 0x00, 0x00, 0x10, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00,
0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10,
0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x08, 0x10, 0x00, 0x38, 0x00, 0x00,
0x00, 0x10, 0x20, 0x10, 0x00, 0x38, 0x00, 0x00, 0x00, 0x10, 0x28, 0x20,
0x20, 0x20, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x28, 0x10, 0x00, 0x00,
0x00, 0x10, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38,
0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x30, 0x10, 0x00, 0x00,
0x00, 0x30, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x38,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

View file

@ -1,261 +0,0 @@
// TEXTFONT.C
char textfont[2048] =
{
0xFF, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xFF, // .
0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x81, 0x7E, 0x00, // .
0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xFF, 0x7E, 0x00, // .
0x36, 0x7F, 0x7F, 0x7F, 0x3E, 0x1C, 0x08, 0x00, // .
0x08, 0x1C, 0x3E, 0x7F, 0x3E, 0x1C, 0x08, 0x00, // .
0x1C, 0x1C, 0x08, 0x6B, 0x7F, 0x6B, 0x08, 0x1C, // .
0x08, 0x1C, 0x3E, 0x7F, 0x3E, 0x08, 0x1C, 0x3E, // .
0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00, // .
0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF, // .
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // TAB
0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF, // .
0x0F, 0x07, 0x0D, 0x3C, 0x66, 0x66, 0x66, 0x3C, // .
0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, // .
0x30, 0x38, 0x3C, 0x36, 0x34, 0x70, 0xF0, 0xE0, // .
0x7F, 0x63, 0x7F, 0x63, 0x63, 0x67, 0xE6, 0xC0, // .
0x18, 0xDB, 0x7E, 0x66, 0x66, 0x7E, 0xDB, 0x18, // .
0x40, 0x70, 0x7C, 0x7F, 0x7C, 0x70, 0x40, 0x00, // .
0x01, 0x07, 0x1F, 0x7F, 0x1F, 0x07, 0x01, 0x00, // .
0x18, 0x3C, 0x7E, 0x18, 0x18, 0x7E, 0x3C, 0x18, // .
0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00, // .
0x3F, 0x7A, 0x7A, 0x3A, 0x0A, 0x0A, 0x0A, 0x00, // .
0x1E, 0x33, 0x1C, 0x36, 0x36, 0x1C, 0x66, 0x3C, // .
0x00, 0x00, 0x00, 0x00, 0x7E, 0x7E, 0x7E, 0x00, // .
0x18, 0x3C, 0x7E, 0x18, 0x7E, 0x3C, 0x18, 0x7E, // .
0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00, // .
0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00, // .
0x00, 0x0C, 0x0E, 0x7F, 0x0E, 0x0C, 0x00, 0x00, // .
0x00, 0x18, 0x38, 0x7F, 0x38, 0x18, 0x00, 0x00, // .
0x00, 0x00, 0x60, 0x60, 0x60, 0x7F, 0x00, 0x00, // .
0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00, // .
0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00, // .
0x00, 0xFF, 0xFF, 0x7E, 0x3C, 0x18, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ! [No, this is SPC.]
0x06, 0x0E, 0x0C, 0x18, 0x10, 0x00, 0x20, 0x00, // "
0x6C, 0x6C, 0x24, 0x48, 0x00, 0x00, 0x00, 0x00, // #
0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00, // $
0x10, 0x7C, 0xD0, 0x7C, 0x16, 0x7C, 0x10, 0x00, // %
0x00, 0xC6, 0xCC, 0x18, 0x30, 0x66, 0xC6, 0x00, // &
0x38, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0x76, 0x00, // '
0x18, 0x18, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, // (
0x0C, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0C, 0x00, // )
0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x18, 0x30, 0x00, // *
0x00, 0x6C, 0x38, 0xFE, 0x38, 0x6C, 0x00, 0x00, // +
0x00, 0x18, 0x18, 0x7E, 0x7E, 0x18, 0x18, 0x00, // ,
0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x08, 0x10, // -
0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, // /
0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, // 0
0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00, // 1
0x0C, 0x1C, 0x3C, 0x0C, 0x0C, 0x0C, 0x0C, 0x00, // 2
0x3C, 0x66, 0x06, 0x1C, 0x30, 0x60, 0x7E, 0x00, // 3
0x3C, 0x66, 0x06, 0x1C, 0x06, 0x66, 0x3C, 0x00, // 4
0x1C, 0x3C, 0x6C, 0xCC, 0xFF, 0x0C, 0x0C, 0x00, // 5
0x7E, 0x60, 0x60, 0x7C, 0x06, 0x66, 0x3C, 0x00, // 6
0x3C, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x3C, 0x00, // 7
0x7E, 0x06, 0x06, 0x0C, 0x18, 0x30, 0x30, 0x00, // 8
0x3C, 0x66, 0x66, 0x3C, 0x66, 0x66, 0x3C, 0x00, // 9
0x3C, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x3C, 0x00, // :
0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0x00, // ;
0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x08, 0x10, // <
0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x00, // =
0x00, 0x00, 0x7E, 0x00, 0x00, 0x7E, 0x00, 0x00, // >
0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x00, // ?
0x3C, 0x66, 0x06, 0x0C, 0x18, 0x00, 0x18, 0x00, // @
0x3C, 0x66, 0x6E, 0x6E, 0x6C, 0x60, 0x3C, 0x00, // A
0x1C, 0x36, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x00, // B
0x1C, 0x36, 0x66, 0x7C, 0x66, 0x66, 0x7C, 0x00, // C
0x1C, 0x36, 0x60, 0x60, 0x60, 0x66, 0x3C, 0x00, // D
0x78, 0x6C, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x00, // E
0x1E, 0x30, 0x60, 0x7C, 0x60, 0x60, 0x7E, 0x00, // F
0x1E, 0x30, 0x60, 0x7C, 0x60, 0x60, 0x60, 0x00, // G
0x1C, 0x36, 0x60, 0x6E, 0x66, 0x66, 0x3C, 0x00, // H
0x66, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00, // I
0x3C, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, // J
0x06, 0x06, 0x06, 0x06, 0x66, 0x6C, 0x38, 0x00, // K
0x66, 0x6C, 0x78, 0x70, 0x78, 0x6C, 0x66, 0x00, // L
0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x3E, 0x00, // M
0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0x00, // N
0x26, 0x76, 0x7E, 0x6E, 0x66, 0x66, 0x66, 0x00, // O
0x1C, 0x36, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00, // P
0x1C, 0x36, 0x66, 0x7C, 0x60, 0x60, 0x60, 0x00, // Q
0x1C, 0x36, 0x66, 0x66, 0x66, 0x6E, 0x3C, 0x06, // R
0x1C, 0x36, 0x66, 0x7C, 0x66, 0x66, 0x66, 0x00, // S
0x3C, 0x66, 0x60, 0x3C, 0x06, 0x66, 0x3C, 0x00, // T
0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // U
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00, // V
0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00, // W
0xC6, 0xC6, 0xC6, 0xD6, 0xFE, 0xEE, 0xC6, 0x00, // X
0x66, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x66, 0x00, // Y
0x66, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x00, // Z
0x7E, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x7E, 0x00, // [
0x3C, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3C, 0x00, //
0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, // ]
0x3C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x3C, 0x00, // ^
0x18, 0x3C, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, // _
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, // `
0x18, 0x18, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, // a
0x00, 0x00, 0x3C, 0x6C, 0x6C, 0x6C, 0x36, 0x00, // b
0x30, 0x30, 0x3C, 0x36, 0x36, 0x36, 0x5C, 0x00, // c
0x00, 0x00, 0x38, 0x64, 0x60, 0x64, 0x38, 0x00, // d
0x0C, 0x0C, 0x3C, 0x6C, 0x6C, 0x6C, 0x36, 0x00, // e
0x00, 0x00, 0x38, 0x64, 0x7C, 0x60, 0x38, 0x00, // f
0x18, 0x34, 0x30, 0x7C, 0x30, 0x30, 0x30, 0x00, // g
0x00, 0x00, 0x3C, 0x68, 0x38, 0x7C, 0x4C, 0x38, // h
0x60, 0x60, 0x78, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, // i
0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x00, // j
0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x58, 0x30, // k
0x60, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0x00, // l
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x00, // m
0x00, 0x00, 0xEC, 0xD6, 0xD6, 0xD6, 0xC6, 0x00, // n
0x00, 0x00, 0xB8, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, // o
0x00, 0x00, 0x38, 0x6C, 0x6C, 0x6C, 0x38, 0x00, // p
0x00, 0x00, 0x5C, 0x36, 0x36, 0x3C, 0x30, 0x30, // q
0x00, 0x00, 0x3A, 0x6C, 0x6C, 0x3C, 0x0C, 0x0E, // r
0x00, 0x00, 0x5C, 0x3A, 0x30, 0x30, 0x30, 0x00, // s
0x00, 0x00, 0x38, 0x60, 0x38, 0x0C, 0x78, 0x00, // t
0x30, 0x30, 0x7C, 0x30, 0x30, 0x34, 0x18, 0x00, // u
0x00, 0x00, 0x6C, 0x6C, 0x6C, 0x6C, 0x36, 0x00, // v
0x00, 0x00, 0x6C, 0x6C, 0x6C, 0x38, 0x10, 0x00, // w
0x00, 0x00, 0xC6, 0xC6, 0xD6, 0xD6, 0x6C, 0x00, // x
0x00, 0x00, 0x62, 0x34, 0x18, 0x1C, 0x66, 0x00, // y
0x00, 0x00, 0x6C, 0x6C, 0x6C, 0x3E, 0x2C, 0x38, // z
0x00, 0x00, 0x7C, 0x0C, 0x18, 0x30, 0x7C, 0x00, // {
0x1C, 0x30, 0x30, 0x60, 0x30, 0x30, 0x1C, 0x00, // |
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, // }
0x38, 0x0C, 0x0C, 0x06, 0x0C, 0x0C, 0x38, 0x00, // ~
0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x18, 0x3C, 0x66, 0x66, 0x7E, 0x00, // .
0x3F, 0x61, 0x63, 0xF8, 0x60, 0xF9, 0x61, 0x3F, // .
0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00, // .
0x0E, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, // .
0x3C, 0x66, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, // .
0x66, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, // .
0x70, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, // .
0x1C, 0x1C, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, // .
0x00, 0x00, 0x3E, 0x60, 0x60, 0x3E, 0x18, 0x30, // .
0x3C, 0x66, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, // .
0x66, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, // .
0x70, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, // .
0x66, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // .
0x3C, 0x66, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // .
0x70, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // .
0xC6, 0x38, 0x6C, 0xC6, 0xFE, 0xC6, 0xC6, 0x00, // .
0x1C, 0x1C, 0x00, 0x3C, 0x66, 0x7E, 0x66, 0x00, // .
0x0C, 0x18, 0x7C, 0x60, 0x78, 0x60, 0x7C, 0x00, // .
0x00, 0x00, 0x7E, 0x1A, 0x7E, 0xD8, 0x7E, 0x00, // .
0x3E, 0x78, 0xD8, 0xDE, 0xF8, 0xD8, 0xDE, 0x00, // .
0x3C, 0x66, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00, // .
0x66, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00, // .
0x70, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00, // .
0x3C, 0x66, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, // .
0x70, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00, // .
0x66, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x06, 0x3C, // .
0x66, 0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, // .
0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, // .
0x0C, 0x0C, 0x3E, 0x60, 0x60, 0x3E, 0x0C, 0x0C, // .
0x38, 0x6C, 0x60, 0xF0, 0x60, 0x66, 0xFC, 0x00, // .
0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x7E, 0x18, // .
0x7C, 0x66, 0x66, 0x7C, 0x66, 0x6F, 0x66, 0x63, // .
0x0E, 0x1B, 0x18, 0x3C, 0x18, 0x18, 0x78, 0x30, // .
0x0E, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, // .
0x0E, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // .
0x0E, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00, // .
0x0E, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00, // .
0x3B, 0x6E, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x00, // .
0x3B, 0x6E, 0x00, 0x66, 0x76, 0x7E, 0x6E, 0x66, // .
0x3E, 0x66, 0x66, 0x3E, 0x00, 0x7E, 0x00, 0x00, // .
0x3C, 0x66, 0x66, 0x3C, 0x00, 0x7E, 0x00, 0x00, // .
0x18, 0x00, 0x18, 0x30, 0x60, 0x66, 0x3C, 0x00, // .
0x00, 0x00, 0x00, 0x7E, 0x60, 0x60, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x7E, 0x06, 0x06, 0x00, 0x00, // .
0xC6, 0xCC, 0xD8, 0x3E, 0x63, 0xC6, 0x0C, 0x1F, // .
0xC6, 0xCC, 0xD8, 0x36, 0x6E, 0xD6, 0x1F, 0x06, // .
0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // .
0x00, 0x36, 0x6C, 0xD8, 0x6C, 0x36, 0x00, 0x00, // .
0x00, 0xD8, 0x6C, 0x36, 0x6C, 0xD8, 0x00, 0x00, // .
0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, // .
0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, // .
0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, // .
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, // .
0x08, 0x08, 0x08, 0x08, 0xF8, 0x08, 0x08, 0x08, // .
0x08, 0x08, 0x08, 0xF8, 0xF8, 0x08, 0x08, 0x08, // .
0x1C, 0x1C, 0x1C, 0x1C, 0xFC, 0x1C, 0x1C, 0x1C, // .
0x00, 0x00, 0x00, 0x00, 0xFC, 0x1C, 0x1C, 0x1C, // .
0x00, 0x00, 0x00, 0xF8, 0xF8, 0x08, 0x08, 0x08, // .
0x1C, 0x1C, 0x1C, 0xFC, 0xFC, 0x1C, 0x1C, 0x1C, // .
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, // .
0x00, 0x00, 0x00, 0xFC, 0xFC, 0x1C, 0x1C, 0x1C, // .
0x1C, 0x1C, 0x1C, 0xFC, 0xFC, 0x00, 0x00, 0x00, // .
0x1C, 0x1C, 0x1C, 0x1C, 0xFC, 0x00, 0x00, 0x00, // .
0x08, 0x08, 0x08, 0xF8, 0xF8, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x00, 0xF8, 0x08, 0x08, 0x08, // .
0x08, 0x08, 0x08, 0x08, 0x0F, 0x00, 0x00, 0x00, // .
0x08, 0x08, 0x08, 0x08, 0xFF, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x00, 0xFF, 0x08, 0x08, 0x08, // .
0x08, 0x08, 0x08, 0x08, 0x0F, 0x08, 0x08, 0x08, // .
0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, // .
0x08, 0x08, 0x08, 0x08, 0xFF, 0x08, 0x08, 0x08, // .
0x08, 0x08, 0x08, 0x0F, 0x0F, 0x08, 0x08, 0x08, // .
0x1C, 0x1C, 0x1C, 0x1C, 0x1F, 0x1C, 0x1C, 0x1C, // .
0x1C, 0x1C, 0x1C, 0x1F, 0x1F, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x1F, 0x1F, 0x1C, 0x1C, 0x1C, // .
0x1C, 0x1C, 0x1C, 0xFF, 0xFF, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0xFF, 0xFF, 0x1C, 0x1C, 0x1C, // .
0x1C, 0x1C, 0x1C, 0x1F, 0x1F, 0x1C, 0x1C, 0x1C, // .
0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, // .
0x1C, 0x1C, 0x1C, 0xFF, 0xFF, 0x1C, 0x1C, 0x1C, // .
0x08, 0x08, 0x08, 0xFF, 0xFF, 0x00, 0x00, 0x00, // .
0x1C, 0x1C, 0x1C, 0x1C, 0xFF, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0xFF, 0xFF, 0x08, 0x08, 0x08, // .
0x00, 0x00, 0x00, 0x00, 0xFF, 0x1C, 0x1C, 0x1C, // .
0x1C, 0x1C, 0x1C, 0x1C, 0x1F, 0x00, 0x00, 0x00, // .
0x08, 0x08, 0x08, 0x0F, 0x0F, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x0F, 0x0F, 0x08, 0x08, 0x08, // .
0x00, 0x00, 0x00, 0x00, 0x1F, 0x1C, 0x1C, 0x1C, // .
0x1C, 0x1C, 0x1C, 0x1C, 0xFF, 0x1C, 0x1C, 0x1C, // .
0x08, 0x08, 0x08, 0xFF, 0xFF, 0x08, 0x08, 0x08, // .
0x08, 0x08, 0x08, 0x08, 0xF8, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x00, 0x0F, 0x08, 0x08, 0x08, // .
0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, // .
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, // .
0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, // .
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, // .
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x76, 0xCC, 0xCC, 0xCC, 0x76, 0x00, // .
0x3C, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x7C, 0x60, // .
0x7E, 0x66, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, // .
0x00, 0x00, 0xFE, 0x6C, 0x6C, 0x6C, 0x66, 0x00, // .
0x7E, 0x66, 0x30, 0x18, 0x30, 0x66, 0x7E, 0x00, // .
0x00, 0x00, 0x3E, 0x6C, 0x6C, 0x6C, 0x38, 0x00, // .
0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7F, 0xC0, // .
0x00, 0x00, 0x7E, 0xD8, 0x18, 0x18, 0x0C, 0x00, // .
0x7C, 0x38, 0x7C, 0xD6, 0xD6, 0x7C, 0x38, 0x7C, // .
0x7C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0x7C, 0x00, // .
0x7C, 0xC6, 0xC6, 0xC6, 0x6C, 0x6C, 0xEE, 0x00, // .
0x1E, 0x30, 0x18, 0x3C, 0x66, 0x66, 0x3C, 0x00, // .
0x00, 0x00, 0x7E, 0xDB, 0xDB, 0x7E, 0x00, 0x00, // .
0x03, 0x06, 0x3E, 0x6B, 0x73, 0x3E, 0x60, 0xC0, // .
0x1E, 0x30, 0x60, 0x7E, 0x60, 0x30, 0x1E, 0x00, // .
0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, // .
0x00, 0x7E, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, // .
0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x7E, 0x00, // .
0x30, 0x18, 0x0C, 0x18, 0x30, 0x00, 0x7E, 0x00, // .
0x0C, 0x18, 0x30, 0x18, 0x0C, 0x00, 0x7E, 0x00, // .
0x0E, 0x1B, 0x1B, 0x18, 0x18, 0x18, 0x18, 0x18, // .
0x18, 0x18, 0x18, 0x18, 0x18, 0xD8, 0xD8, 0x70, // .
0x18, 0x18, 0x00, 0x7E, 0x00, 0x18, 0x18, 0x00, // .
0x00, 0x76, 0xDC, 0x00, 0x76, 0xDC, 0x00, 0x00, // .
0x3C, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // .
0x1E, 0x18, 0x18, 0x18, 0x18, 0xD8, 0x78, 0x38, // .
0x78, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, // .
0x38, 0x0C, 0x18, 0x30, 0x3C, 0x00, 0x00, 0x00, // .
0x00, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, // .
0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00
};

View file

@ -225,6 +225,10 @@ void UserConfig::ProcessOptions()
Args->CollectFiles("-game_dir", dirs, nullptr);
AddFiles.reset(Args->GatherFiles("-game_dir"));
}
if (Args->CheckParm("-showcoords") || Args->CheckParm("-w"))
{
C_DoCommand("stat coord");
}
}

View file

@ -75,7 +75,6 @@ CVARD(Int, cl_cheatmask, ~0, CVAR_ARCHIVE, "configure what cheats show in the ch
CVARD(Bool, cl_obituaries, true, CVAR_ARCHIVE, "enable/disable multiplayer death messages") // Not implemented for Blood
CVARD(Bool, cl_democams, true, CVAR_ARCHIVE, "enable/disable demo playback cameras") // Not implemented for Blood
CVARD(Bool, cl_idplayers, true, CVAR_ARCHIVE, "enable/disable name display when aiming at opponents")
CVARD(Bool, cl_showcoords, false, 0, "show your position in the game world") // This is a debug oprion in its current form, not implemented in Blood
CVARD(Bool, cl_weaponsway, true, CVAR_ARCHIVE, "enable/disable player weapon swaying") // Not implemented for Blood
// Todo: Consolidate these to be consistent across games?
@ -342,6 +341,11 @@ ADD_STAT(fps)
return gi->statFPS();
}
ADD_STAT(coord)
{
return gi->GetCoordString();
}
CUSTOM_CVARD(Int, r_showfps, 0, 0, "show the frame rate counter")
{
if (self < 0 || self > 3) self = 1;

View file

@ -14,7 +14,6 @@ EXTERN_CVAR(Int, cl_cheatmask)
EXTERN_CVAR(Bool, cl_obituaries)
EXTERN_CVAR(Bool, cl_democams)
EXTERN_CVAR(Bool, cl_idplayers)
EXTERN_CVAR(Bool, cl_showcoords)
EXTERN_CVAR(Bool, cl_viewbob)
EXTERN_CVAR(Bool, cl_weaponsway)
EXTERN_CVAR(Bool, cl_viewhbob)

View file

@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "duke3d.h"
#include "osdcmds.h"
#include "mapinfo.h"
#include "c_dispatch.h"
BEGIN_DUKE_NS
@ -587,7 +588,7 @@ void G_DoCheats(void)
return;
case CHEAT_COORDS:
cl_showcoords = cl_showcoords + 1;
C_DoCommand("stat coord");
end_cheat(pPlayer);
return;

View file

@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "cmdline.h"
#include "m_argv.h"
#include "printf.h"
#include "c_dispatch.h"
BEGIN_DUKE_NS
@ -94,10 +95,6 @@ void G_CheckCommandLine()
}
Printf("Respawn on.\n");
}
if (Args->CheckParm("-showcoords") || Args->CheckParm("-w"))
{
cl_showcoords = 1;
}
}
END_DUKE_NS

View file

@ -167,6 +167,7 @@ struct GameInterface : ::GameInterface
void DoPrintMessage(int prio, const char*) override;
void DrawPlayerSprite(const DVector2& origin, bool onteam) override;
void QuitToTitle() override;
FString GetCoordString() override;
};

View file

@ -275,28 +275,6 @@ void G_GameExit(const char *msg)
}
#ifdef YAX_DEBUG
// ugh...
char m32_debugstr[64][128];
int32_t m32_numdebuglines=0;
static void M32_drawdebug(void)
{
int i, col=paletteGetClosestColor(255,255,255);
int x=4, y=8;
if (m32_numdebuglines>0)
{
videoBeginDrawing();
for (i=0; i<m32_numdebuglines && y<ydim-8; i++, y+=8)
printext256(x,y,col,0,m32_debugstr[i],xdim>640?0:1);
videoEndDrawing();
}
m32_numdebuglines=0;
}
#endif
static int32_t G_DoThirdPerson(const DukePlayer_t *pp, vec3_t *vect, int16_t *vsectnum, int16_t ang, int16_t horiz)
{
auto const sp = &sprite[pp->i];

View file

@ -1414,7 +1414,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
case USERDEFS_FTA_ON: labelNum = hud_messages; break;
case USERDEFS_EXECUTIONS: labelNum = 1; break;
case USERDEFS_AUTO_RUN: labelNum = cl_autorun; break;
case USERDEFS_COORDS: labelNum = cl_showcoords; break;
case USERDEFS_COORDS: labelNum = 0; break;
case USERDEFS_TICKRATE: labelNum = r_showfps; break;
case USERDEFS_M_COOP: labelNum = m_coop; break;
case USERDEFS_COOP: labelNum = ud.coop; break;
@ -1602,7 +1602,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
case USERDEFS_FTA_ON: hud_messages = iSet; break;
case USERDEFS_EXECUTIONS: break; // what was this supposed to accomplish?
case USERDEFS_AUTO_RUN: cl_autorun.SetGenericRepDefault(iSet, CVAR_Int); break;
case USERDEFS_COORDS: cl_showcoords.SetGenericRepDefault(iSet, CVAR_Int); break;
case USERDEFS_COORDS: break;
case USERDEFS_TICKRATE: r_showfps = iSet; break;
case USERDEFS_M_COOP: m_coop = iSet; break;
case USERDEFS_COOP: ud.coop = iSet; break;

View file

@ -599,16 +599,11 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
}
}
#define printcoordsline(fmt, ...) do { \
Bsprintf(tempbuf, fmt, ## __VA_ARGS__); \
printext256(20, y+=9, COLOR_WHITE, -1, tempbuf, 0); \
} while (0)
#ifdef DEBUGGINGAIDS
sprstat_t g_spriteStat;
#endif
static void G_PrintCoords(int32_t snum)
FString G_PrintCoords(int32_t snum)
{
const int32_t x = g_Debug ? 288 : 0;
int32_t y = 0;
@ -623,54 +618,44 @@ static void G_PrintCoords(int32_t snum)
else if (g_netServer || ud.multimode > 1)
y = 24;
}
Bsprintf(tempbuf, "XYZ= (%d, %d, %d)", ps->pos.x, ps->pos.y, ps->pos.z);
printext256(x, y, COLOR_WHITE, -1, tempbuf, 0);
FString out;
out.AppendFormat("XYZ= (%d, %d, %d)\n", ps->pos.x, ps->pos.y, ps->pos.z);
char ang[16], horiz[16], horizoff[16];
fix16_to_str(ps->q16ang, ang, 2);
fix16_to_str(ps->q16horiz, horiz, 2);
fix16_to_str(ps->q16horizoff, horizoff, 2);
Bsprintf(tempbuf, "A/H/HO= %s, %s, %s", ang, horiz, horizoff);
printext256(x, y+9, COLOR_WHITE, -1, tempbuf, 0);
Bsprintf(tempbuf, "VEL= (%d, %d, %d) + (%d, %d, 0)",
ps->vel.x>>14, ps->vel.y>>14, ps->vel.z, ps->fric.x>>5, ps->fric.y>>5);
printext256(x, y+18, COLOR_WHITE, -1, tempbuf, 0);
Bsprintf(tempbuf, "OG= %d SBRIDGE=%d SBS=%d", ps->on_ground, ps->spritebridge, ps->sbs);
printext256(x, y+27, COLOR_WHITE, -1, tempbuf, 0);
out.AppendFormat("A/H/HO= %s, %s, %s\n", ang, horiz, horizoff);
out.AppendFormat("VEL= (%d, %d, %d) + (%d, %d, 0)\n", ps->vel.x>>14, ps->vel.y>>14, ps->vel.z, ps->fric.x>>5, ps->fric.y>>5);
out.AppendFormat("OG= %d SBRIDGE=%d SBS=%d\n", ps->on_ground, ps->spritebridge, ps->sbs);
if (sectnum >= 0)
Bsprintf(tempbuf, "SECT= %d (LO=%d EX=%d)", sectnum,
TrackerCast(sector[sectnum].lotag), TrackerCast(sector[sectnum].extra));
out.AppendFormat("SECT= %d (LO=%d EX=%d)\n", sectnum, TrackerCast(sector[sectnum].lotag), TrackerCast(sector[sectnum].extra));
else
Bsprintf(tempbuf, "SECT= %d", sectnum);
printext256(x, y+36, COLOR_WHITE, -1, tempbuf, 0);
// Bsprintf(tempbuf,"SEED= %d",randomseed);
// printext256(x,y+45,COLOR_WHITE,-1,tempbuf,0);
y -= 9;
out.AppendFormat("SECT= %d\n", sectnum);
y += 7;
Bsprintf(tempbuf, "THOLD= %d", ps->transporter_hold);
printext256(x, y+54, COLOR_WHITE, -1, tempbuf, 0);
Bsprintf(tempbuf, "GAMETIC= %u, TOTALCLOCK=%d", g_moveThingsCount, (int32_t) totalclock);
printext256(x, y+63, COLOR_WHITE, -1, tempbuf, 0);
out.AppendFormat("\nTHOLD= %d ", ps->transporter_hold);
out.AppendFormat("GAMETIC= %u, TOTALCLOCK=%d\n", g_moveThingsCount, (int32_t) totalclock);
#ifdef DEBUGGINGAIDS
Bsprintf(tempbuf, "NUMSPRITES= %d", Numsprites);
printext256(x, y+72, COLOR_WHITE, -1, tempbuf, 0);
out.AppendFormat("NUMSPRITES= %d\n", Numsprites);
if (g_moveThingsCount > g_spriteStat.lastgtic + REALGAMETICSPERSEC)
{
g_spriteStat.lastgtic = g_moveThingsCount;
g_spriteStat.lastnumins = g_spriteStat.numins;
g_spriteStat.numins = 0;
}
Bsprintf(tempbuf, "INSERTIONS/s= %u", g_spriteStat.lastnumins);
printext256(x, y+81, COLOR_WHITE, -1, tempbuf, 0);
Bsprintf(tempbuf, "ONSCREEN= %d", g_spriteStat.numonscreen);
printext256(x, y+90, COLOR_WHITE, -1, tempbuf, 0);
y += 3*9;
out.AppendFormat("INSERTIONS/s= %u\n", g_spriteStat.lastnumins);
out.AppendFormat("ONSCREEN= %d\n", g_spriteStat.numonscreen);
#endif
y += 7;
Bsprintf(tempbuf, "VR=%.03f YX=%.03f", (double) dr_viewingrange/65536.0, (double) dr_yxaspect/65536.0);
printext256(x, y+72, COLOR_WHITE, -1, tempbuf, 0);
out.AppendFormat("\nVR=%.03f YX=%.03f", (double) dr_viewingrange/65536.0, (double) dr_yxaspect/65536.0);
return out;
}
FString GameInterface::GetCoordString()
{
return G_PrintCoords(screenpeek);
}
#define LOW_FPS ((videoGetRenderMode() == REND_CLASSIC) ? 35 : 50)
#define SLOW_FRAME_TIME 20
@ -1037,9 +1022,6 @@ void G_DisplayRest(int32_t smoothratio)
if (ud.pause_on==1 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
menutext_center(100, GStrings("Game Paused"));
if (cl_showcoords)
G_PrintCoords(screenpeek);
#ifdef YAX_DEBUG
M32_drawdebug();
#endif

View file

@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "osdcmds.h"
#include "cheats.h"
#include "mapinfo.h"
#include "c_dispatch.h"
BEGIN_RR_NS
@ -588,7 +589,7 @@ void G_DoCheats(void)
return;
case CHEAT_COORDS:
cl_showcoords = cl_showcoords + 1;
C_DoCommand("stat coord");
end_cheat(pPlayer);
return;

View file

@ -93,9 +93,5 @@ void G_CheckCommandLine()
}
OSD_Printf("Respawn on.\n");
}
if (Args->CheckParm("-showcoords") || Args->CheckParm("-w"))
{
cl_showcoords = 1;
}
}
END_RR_NS

View file

@ -167,6 +167,7 @@ struct GameInterface : ::GameInterface
void DoPrintMessage(int prio, const char* text) override;
void DrawPlayerSprite(const DVector2& origin, bool onteam) override;
void QuitToTitle() override;
FString GetCoordString() override;
};
END_RR_NS

View file

@ -383,27 +383,6 @@ void G_GameExit(const char *msg)
}
#ifdef YAX_DEBUG
// ugh...
char m32_debugstr[64][128];
int32_t m32_numdebuglines=0;
static void M32_drawdebug(void)
{
int i, col=paletteGetClosestColor(255,255,255);
int x=4, y=8;
if (m32_numdebuglines>0)
{
videoBeginDrawing();
for (i=0; i<m32_numdebuglines && y<ydim-8; i++, y+=8)
printext256(x,y,col,0,m32_debugstr[i],xdim>640?0:1);
videoEndDrawing();
}
m32_numdebuglines=0;
}
#endif
static int32_t G_DoThirdPerson(const DukePlayer_t *pp, vec3_t *vect, int16_t *vsectnum, int16_t ang, int16_t horiz)
{

View file

@ -1618,8 +1618,7 @@ void Net_DisplaySyncMsg(void)
{
if (g_numSyncBytes > 1)
{
Bsprintf(tempbuf, "Out Of Sync - %s", SyncNames[i]);
printext256(4L, 100L + (i * 8), 31, 1, tempbuf, 0);
Printf(PRINT_NOTIFY, "Out Of Sync - %s\n", SyncNames[i]);
}
if (!g_foundSyncError && g_szfirstSyncMsg[i][0] == '\0')
@ -1634,8 +1633,7 @@ void Net_DisplaySyncMsg(void)
{
if (syncstat[j] != 0 && g_szfirstSyncMsg[j][0] == '\0')
{
Bsprintf(tempbuf, "Out Of Sync (%s) - Please restart game", SyncNames[j]);
Bstrcpy(g_szfirstSyncMsg[j], tempbuf);
Printf(PRINT_NOTIFY, "Out Of Sync (%s) - Please restart game\n", SyncNames[j]);
}
}
}
@ -1649,20 +1647,14 @@ void Net_DisplaySyncMsg(void)
{
if (g_numSyncBytes > 1)
{
Bsprintf(tempbuf, "FIRST %s", g_szfirstSyncMsg[i]);
printext256(4L, 44L + (i * 8), 31, 1, tempbuf, 0);
Bsprintf(tempbuf, "moveCount %d",moveCount);
printext256(4L, 52L + (i * 8), 31, 1, tempbuf, 0);
Printf(PRINT_NOTIFY, "FIRST %s - moveCount %d\n", g_szfirstSyncMsg[i],moveCount);
}
else
{
printext256(4L,100L,31,0,g_szfirstSyncMsg[i],0);
Printf(PRINT_NOTIFY, "%s\n", g_szfirstSyncMsg[i],0);
}
}
}
// if (syncstate != 0)
// printext256(68L, 92L, 1, 31, "Missed Network packet!", 0);
}

View file

@ -590,21 +590,16 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
}
}
#define printcoordsline(fmt, ...) do { \
Bsprintf(tempbuf, fmt, ## __VA_ARGS__); \
printext256(20, y+=9, COLOR_WHITE, -1, tempbuf, 0); \
} while (0)
#ifdef DEBUGGINGAIDS
sprstat_t g_spriteStat;
#endif
static void G_PrintCoords(int32_t snum)
FString G_PrintCoords(int32_t snum)
{
const int32_t x = 250;
int32_t y = 16;
const int32_t x = g_Debug ? 288 : 0;
int32_t y = 0;
const DukePlayer_t *ps = g_player[snum].ps;
auto const ps = g_player[snum].ps;
const int32_t sectnum = ps->cursectnum;
if ((g_gametypeFlags[ud.coop] & GAMETYPE_FRAGBAR))
@ -614,56 +609,41 @@ static void G_PrintCoords(int32_t snum)
else if (g_netServer || ud.multimode > 1)
y = 24;
}
Bsprintf(tempbuf, "XYZ= (%d, %d, %d)", ps->pos.x, ps->pos.y, ps->pos.z);
printext256(x, y, COLOR_WHITE, -1, tempbuf, 0);
FString out;
out.AppendFormat("XYZ= (%d, %d, %d)\n", ps->pos.x, ps->pos.y, ps->pos.z);
char ang[16], horiz[16], horizoff[16];
fix16_to_str(ps->q16ang, ang, 2);
fix16_to_str(ps->q16horiz, horiz, 2);
fix16_to_str(ps->q16horizoff, horizoff, 2);
Bsprintf(tempbuf, "A/H/HO= %s, %s, %s", ang, horiz, horizoff);
printext256(x, y+9, COLOR_WHITE, -1, tempbuf, 0);
Bsprintf(tempbuf, "VEL= (%d, %d, %d) + (%d, %d, 0)",
ps->vel.x>>14, ps->vel.y>>14, ps->vel.z, ps->fric.x>>5, ps->fric.y>>5);
printext256(x, y+18, COLOR_WHITE, -1, tempbuf, 0);
Bsprintf(tempbuf, "OG= %d SBRIDGE=%d SBS=%d", ps->on_ground, ps->spritebridge, ps->sbs);
printext256(x, y+27, COLOR_WHITE, -1, tempbuf, 0);
out.AppendFormat("A/H/HO= %s, %s, %s\n", ang, horiz, horizoff);
out.AppendFormat("VEL= (%d, %d, %d) + (%d, %d, 0)\n", ps->vel.x >> 14, ps->vel.y >> 14, ps->vel.z, ps->fric.x >> 5, ps->fric.y >> 5);
out.AppendFormat("OG= %d SBRIDGE=%d SBS=%d\n", ps->on_ground, ps->spritebridge, ps->sbs);
if (sectnum >= 0)
Bsprintf(tempbuf, "SECT= %d (LO=%d EX=%d)", sectnum,
TrackerCast(sector[sectnum].lotag), TrackerCast(sector[sectnum].extra));
out.AppendFormat("SECT= %d (LO=%d EX=%d)\n", sectnum, TrackerCast(sector[sectnum].lotag), TrackerCast(sector[sectnum].extra));
else
Bsprintf(tempbuf, "SECT= %d", sectnum);
printext256(x, y+36, COLOR_WHITE, -1, tempbuf, 0);
// Bsprintf(tempbuf,"SEED= %d",randomseed);
// printext256(x,y+45,COLOR_WHITE,-1,tempbuf,0);
y -= 9;
out.AppendFormat("SECT= %d\n", sectnum);
y += 7;
Bsprintf(tempbuf, "THOLD= %d", ps->transporter_hold);
printext256(x, y+54, COLOR_WHITE, -1, tempbuf, 0);
Bsprintf(tempbuf, "GAMETIC= %u, TOTALCLOCK=%d", g_moveThingsCount, (int32_t)totalclock);
printext256(x, y+63, COLOR_WHITE, -1, tempbuf, 0);
out.AppendFormat("\nTHOLD= %d ", ps->transporter_hold);
out.AppendFormat("GAMETIC= %u, TOTALCLOCK=%d\n", g_moveThingsCount, (int32_t)totalclock);
#ifdef DEBUGGINGAIDS
Bsprintf(tempbuf, "NUMSPRITES= %d", Numsprites);
printext256(x, y+72, COLOR_WHITE, -1, tempbuf, 0);
out.AppendFormat("NUMSPRITES= %d\n", Numsprites);
if (g_moveThingsCount > g_spriteStat.lastgtic + REALGAMETICSPERSEC)
{
g_spriteStat.lastgtic = g_moveThingsCount;
g_spriteStat.lastnumins = g_spriteStat.numins;
g_spriteStat.numins = 0;
}
Bsprintf(tempbuf, "INSERTIONS/s= %u", g_spriteStat.lastnumins);
printext256(x, y+81, COLOR_WHITE, -1, tempbuf, 0);
Bsprintf(tempbuf, "ONSCREEN= %d", g_spriteStat.numonscreen);
printext256(x, y+90, COLOR_WHITE, -1, tempbuf, 0);
y += 3*9;
out.AppendFormat("INSERTIONS/s= %u\n", g_spriteStat.lastnumins);
out.AppendFormat("ONSCREEN= %d\n", g_spriteStat.numonscreen);
#endif
y += 7;
Bsprintf(tempbuf, "VR=%.03f YX=%.03f", (double) dr_viewingrange/65536.0, (double) dr_yxaspect/65536.0);
printext256(x, y+72, COLOR_WHITE, -1, tempbuf, 0);
Bsprintf(tempbuf, "MOVEACTORS [ms]= %.3e", g_moveActorsTime);
printext256(x, y+81, COLOR_WHITE, -1, tempbuf, 0);
Bsprintf(tempbuf, "MOVEWORLD [ms]= %.3e", g_moveWorldTime);
printext256(x, y+90, COLOR_WHITE, -1, tempbuf, 0);
out.AppendFormat("\nVR=%.03f YX=%.03f", (double)dr_viewingrange / 65536.0, (double)dr_yxaspect / 65536.0);
return out;
}
FString GameInterface::GetCoordString()
{
return G_PrintCoords(screenpeek);
}
@ -1043,9 +1023,6 @@ void G_DisplayRest(int32_t smoothratio)
if (ud.pause_on==1 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
menutext_center(100, GStrings("Game Paused"));
if (cl_showcoords)
G_PrintCoords(screenpeek);
#ifdef YAX_DEBUG
M32_drawdebug();
#endif

View file

@ -1370,46 +1370,38 @@ CircleCamera(int *nx, int *ny, int *nz, short *vsect, short *nang, short horiz)
*nang = ang;
}
void PrintLocationInfo(PLAYERp pp)
FString GameInterface::statFPS()
{
#define Y_STEP 7
#define AVERAGEFRAMES 16
int x = windowxy1.x+2;
int y = windowxy1.y+2;
static int frameval[AVERAGEFRAMES], framecnt = 0;
int i;
if (LocationInfo)
FString out;
//if (LocationInfo)
{
i = (int32_t)totalclock;
if (i != frameval[framecnt])
{
sprintf(buffer, "FPS: %d", ((120 * AVERAGEFRAMES) / (i - frameval[framecnt])) + f_c);
printext256(x, y, 1, -1, buffer, 1);
out.AppendFormat("FPS: %d\n", ((120 * AVERAGEFRAMES) / (i - frameval[framecnt])) + f_c);
frameval[framecnt] = i;
}
framecnt = ((framecnt + 1) & (AVERAGEFRAMES - 1));
}
return out;
}
if (LocationInfo > 1)
FString GameInterface::GetCoordString()
{
y += Y_STEP;
PLAYERp pp = Player + myconnectindex;
FString out;
out.AppendFormat("POSX:%d ", pp->posx);
out.AppendFormat("POSY:%d ", pp->posy);
out.AppendFormat("POSZ:%d ", pp->posz);
out.AppendFormat("ANG:%d\n", (int32_t)pp->pang);
sprintf(buffer, "POSX:%d", pp->posx);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "POSY:%d", pp->posy);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "POSZ:%d", pp->posz);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "ANG:%d", (int32_t) pp->pang);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
}
}
return out;
}
SWBOOL DebugSecret = FALSE;
@ -1446,7 +1438,7 @@ void PrintSpriteInfo(PLAYERp pp)
SPRITEp sp;
USERp u;
if (SpriteInfo && !LocationInfo)
//if (SpriteInfo && !LocationInfo)
{
short hit_sprite = DoPickTarget(pp->SpriteP, 32, 2);
@ -1455,54 +1447,29 @@ void PrintSpriteInfo(PLAYERp pp)
sp->hitag = 9997; // Special tag to make the actor glow red for one frame
y += Y_STEP;
if (hit_sprite == -1)
{
sprintf(buffer, "SPRITENUM: NONE TARGETED");
printext256(x, y, 1, -1, buffer, 1);
Printf("SPRITENUM: NONE TARGETED\n");
return;
}
else
sprintf(buffer, "SPRITENUM:%d", hit_sprite);
Printf("SPRITENUM:%d\n", hit_sprite);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
if (u)
{
sprintf(buffer, "ID:%d", u->ID);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "PALETTE:%d", u->spal);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "HEALTH:%d", u->Health);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "WAITTICS:%d", u->WaitTics);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "COUNTER:%d", u->Counter);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "COUNTER2:%d", u->Counter);
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
Printf("ID:%d, ", u->ID);
Printf("PALETTE:%d, ", u->spal);
Printf("HEALTH:%d, ", u->Health);
Printf("WAITTICS:%d, ", u->WaitTics);
Printf("COUNTER:%d, ", u->Counter);
Printf("COUNTER2:%d\n", u->Counter);
}
if (SpriteInfo > 1)
{
sprintf(buffer, "POSX:%d", TrackerCast(sp->x));
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "POSY:%d", TrackerCast(sp->y));
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "POSZ:%d", TrackerCast(sp->z));
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
sprintf(buffer, "ANG:%d", TrackerCast(sp->ang));
printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP;
Printf("POSX:%d, ", TrackerCast(sp->x));
Printf("POSY:%d, ", TrackerCast(sp->y));
Printf("POSZ:%d,", TrackerCast(sp->z));
Printf("ANG:%d\n", TrackerCast(sp->ang));
}
}
}
@ -2338,8 +2305,8 @@ drawscreen(PLAYERp pp)
return;
}
PrintLocationInfo(pp);
PrintSpriteInfo(pp);
//PrintLocationInfo(pp);
//PrintSpriteInfo(pp);
#if SYNC_TEST
SyncStatMessage();

View file

@ -2440,7 +2440,9 @@ struct GameInterface : ::GameInterface
bool SaveGame(FSaveGameNode* sv) override;
void DoPrintMessage(int prio, const char* text) override;
void SetAmbience(bool on) override { if (on) StartAmbientSound(); else StopAmbientSound(); }
FString GetCoordString() override;
FString statFPS() override;
GameStats getStats() override;
};

View file

@ -364,8 +364,7 @@ SyncStatMessage(void)
{
if (NumSyncBytes > 1)
{
sprintf(ds, "GAME OUT OF SYNC - %s", SyncNames[i]);
printext256(68L, 68L + (i * 8), 1, 31, ds, 0);
Printf(PRINT_NOTIFY, "GAME OUT OF SYNC - %s", SyncNames[i]);
}
if (!sync_found && sync_first[i][0] == '\0')
@ -395,10 +394,8 @@ SyncStatMessage(void)
{
if (NumSyncBytes > 1)
{
sprintf(ds, "FIRST %s", sync_first[i]);
printext256(50L, 0L, 1, 31, ds, 0);
sprintf(ds, "MoveCount %u",MoveCount);
printext256(50L, 10L, 1, 31, ds, 0);
Printf(PRINT_NOTIFY, "FIRST %s\n", sync_first[i]);
Printf(PRINT_NOTIFY, "MoveCount %u\n",MoveCount);
}
else
{
@ -417,7 +414,7 @@ SyncStatMessage(void)
}
if (syncstate != 0)
printext256(68L, 92L, 1, 31, "Missed Network packet!", 0);
Printf(PRINT_NOTIFY, "Missed Network packet!", 0);
}