MCPcopy Create free account
hub / github.com/TASEmulators/fceux / LuaDisplayString

Function LuaDisplayString

src/lua-engine.cpp:4406–4452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4404}
4405
4406FCEU_MAYBE_UNUSED
4407static void LuaDisplayString (const char *string, int y, int x, uint32 color, uint32 outlineColor)
4408{
4409 if(!string)
4410 return;
4411
4412 gui_prepare();
4413
4414 PutTextInternal(string, strlen(string), x, y, color, outlineColor);
4415/*
4416 const char* ptr = string;
4417 while(*ptr && y < LUA_SCREEN_HEIGHT)
4418 {
4419 int len = strlinelen(ptr);
4420 int skip = 0;
4421 if(len < 1) len = 1;
4422
4423 // break up the line if it's too long to display otherwise
4424 if(len > 63)
4425 {
4426 len = 63;
4427 const char* ptr2 = ptr + len-1;
4428 for(int j = len-1; j; j--, ptr2--)
4429 {
4430 if(*ptr2 == ' ' || *ptr2 == '\t')
4431 {
4432 len = j;
4433 skip = 1;
4434 break;
4435 }
4436 }
4437 }
4438
4439 int xl = 0;
4440 int yl = 0;
4441 int xh = (LUA_SCREEN_WIDTH - 1 - 1) - 4*len;
4442 int yh = LUA_SCREEN_HEIGHT - 1;
4443 int x2 = std::min(std::max(x,xl),xh);
4444 int y2 = std::min(std::max(y,yl),yh);
4445
4446 PutTextInternal(ptr,len,x2,y2,color,outlineColor);
4447
4448 ptr += len + skip;
4449 y += 8;
4450 }
4451*/
4452}
4453
4454
4455static uint8 FCEUFont[792] =

Callers 1

gui_textFunction · 0.85

Calls 2

gui_prepareFunction · 0.85
PutTextInternalFunction · 0.85

Tested by

no test coverage detected