MCPcopy Create free account
hub / github.com/doldecomp/mkdd / getWidthEntry

Method getWidthEntry

libs/JSystem/JUtility/JUTResFont.cpp:350–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350void JUTResFont::getWidthEntry(int chr, JUTFont::TWidth *width) const
351{
352 int fontcode = getFontCode(chr);
353 width->w0 = 0;
354 width->w1 = mInfoBlock->mWidth;
355
356 for (int i = 0; i < mWidthBlockCount; i++)
357 {
358 if (mWidthBlocks[i]->mStartCode <= fontcode && fontcode <= mWidthBlocks[i]->mEndCode)
359 {
360 *width = mWidthBlocks[i]->mChunkNum[(fontcode - mWidthBlocks[i]->mStartCode)];
361 break;
362 }
363 }
364 return;
365}
366
367int JUTResFont::getCellWidth() const
368{

Callers 1

parseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected