mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Font system refactor, use pre-rendered fonts
This commit is contained in:
@@ -314,8 +314,8 @@ void DoAboutFramework (void)
|
||||
PortabilityLayer::WindowDef wdef = PortabilityLayer::WindowDef::Create(windowRect, PortabilityLayer::WindowStyleFlags::kAlert, true, 0, 0, PSTR(""));
|
||||
|
||||
PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black();
|
||||
PortabilityLayer::RenderedFont *font = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *fontLight = GetApplicationFont(8, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *font = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
|
||||
PortabilityLayer::RenderedFont *fontLight = GetFont(PortabilityLayer::FontPresets::kApplication8);
|
||||
|
||||
int16_t verticalPoint = 16 + font->GetMetrics().m_ascent;
|
||||
int16_t horizontalOffset = 16;
|
||||
@@ -578,7 +578,7 @@ static int16_t AboutFrameworkFilter(void *context, Dialog *dialog, const TimeTag
|
||||
|
||||
void DrawLicenseReader(Window *window)
|
||||
{
|
||||
PortabilityLayer::RenderedFont *rfont = GetMonospaceFont(10, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *rfont = GetFont(PortabilityLayer::FontPresets::kMono10);
|
||||
if (!rfont)
|
||||
return;
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ void DrawBannerMessage (Point topLeft)
|
||||
|
||||
PasStringCopy((*thisHouse)->banner, bannerStr);
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
|
||||
|
||||
PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black();
|
||||
|
||||
@@ -221,7 +221,7 @@ void DisplayStarsRemaining(void)
|
||||
|
||||
DrawSurface *surface = starsWindow->GetDrawSurface();
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
|
||||
|
||||
NumToString((long)numStarsRemaining, theStr);
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ void UpdateCoordWindow (void)
|
||||
PortabilityLayer::ResolveCachingColor whiteColor = StdColors::White();
|
||||
PortabilityLayer::ResolveCachingColor blueColor = StdColors::Blue();
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(9, 0, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication9);
|
||||
|
||||
DrawSurface *surface = coordWindow->GetDrawSurface();
|
||||
|
||||
|
||||
@@ -568,7 +568,7 @@ void DrawDialogUserText (Dialog *dial, short item, StringPtr text, Boolean inver
|
||||
|
||||
DrawSurface *surface = dial->GetWindow()->GetDrawSurface();
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(9, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication9);
|
||||
|
||||
PasStringCopy(text, stringCopy);
|
||||
|
||||
@@ -619,7 +619,7 @@ void DrawDialogUserText2 (Dialog *dial, short item, StringPtr text)
|
||||
Str255 stringCopy;
|
||||
|
||||
DrawSurface *surface = dial->GetWindow()->GetDrawSurface();
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(9, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication9);
|
||||
|
||||
PasStringCopy(text, stringCopy);
|
||||
const Rect iRect = dial->GetItems()[item - 1].GetWidget()->GetRect();
|
||||
|
||||
@@ -107,7 +107,7 @@ void SetUpFinalScreen (void)
|
||||
{
|
||||
GetLineOfText(tempStr, count, subStr);
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
|
||||
offset = ((thisMac.constrainedScreen.right - thisMac.constrainedScreen.left) -
|
||||
appFont->MeasurePStr(subStr)) / 2;
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ void DrawHighScores (DrawSurface *surface)
|
||||
DisposeGWorld(tempMap);
|
||||
DisposeGWorld(tempMask);
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont14 = GetApplicationFont(14, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont14 = GetFont(PortabilityLayer::FontPresets::kApplication14Bold);
|
||||
|
||||
PasStringCopy(PSTR("\xa5 "), tempStr);
|
||||
PasStringConcat(tempStr, thisHouseName);
|
||||
@@ -157,7 +157,7 @@ void DrawHighScores (DrawSurface *surface)
|
||||
const Point scoreTextPoint = Point::Create(scoreLeft + ((kScoreWide - appFont14->MeasurePStr(tempStr)) / 2), dropIt - 65);
|
||||
surface->DrawString(scoreTextPoint, tempStr, cyanColor, appFont14);
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont12 = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont12 = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
|
||||
|
||||
thisHousePtr = *thisHouse;
|
||||
// message for score #1
|
||||
@@ -264,7 +264,7 @@ void DrawHighScores (DrawSurface *surface)
|
||||
}
|
||||
}
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont9 = GetApplicationFont(9, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont9 = GetFont(PortabilityLayer::FontPresets::kApplication9Bold);
|
||||
|
||||
const Point textPos = Point::Create(scoreLeft + 80, dropIt - 1 + (10 * kScoreSpacing));
|
||||
GetLocalizedString(8, tempStr);
|
||||
|
||||
@@ -158,7 +158,7 @@ void DrawTouchScreenMenu (DrawSurface *surface, const THandle<BitmapImage> &back
|
||||
|
||||
const int numItems = sizeof(itemTexts) / sizeof(itemTexts[0]);
|
||||
|
||||
PortabilityLayer::RenderedFont *rfont = GetHandwritingFont(48, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *rfont = GetFont(PortabilityLayer::FontPresets::kHandwriting48);
|
||||
if (!rfont)
|
||||
return;
|
||||
|
||||
|
||||
580
GpApp/Main.cpp
580
GpApp/Main.cpp
@@ -43,14 +43,6 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
int loadScreenWindowPhase;
|
||||
int loadScreenRingStep;
|
||||
WindowPtr loadScreenWindow;
|
||||
Rect loadScreenProgressBarRect;
|
||||
int loadScreenProgress;
|
||||
DrawSurface *loadScreenRingSurface;
|
||||
|
||||
|
||||
#define kPrefsVersion 0x0039
|
||||
|
||||
|
||||
@@ -364,548 +356,6 @@ void WriteOutPrefs (void)
|
||||
modulePrefs.Dispose();
|
||||
}
|
||||
|
||||
void StepLoadScreenRing()
|
||||
{
|
||||
if (loadScreenWindow)
|
||||
{
|
||||
const int loadScreenStepGranularity = 2;
|
||||
loadScreenRingStep++;
|
||||
if (loadScreenRingStep == 24 * loadScreenStepGranularity)
|
||||
loadScreenRingStep = 0;
|
||||
|
||||
Rect ringDestRect = Rect::Create(8, 8, 24, 24);
|
||||
Rect ringSrcRect = Rect::Create(0, 0, 16, 16) + Point::Create((loadScreenRingStep / loadScreenStepGranularity) * 16, 0);
|
||||
|
||||
if (loadScreenWindowPhase == 0)
|
||||
{
|
||||
ringDestRect = Rect::Create(0, 0, 64, 64);
|
||||
|
||||
const int progression = (loadScreenRingStep / loadScreenStepGranularity);
|
||||
ringSrcRect = Rect::Create(0, 0, 64, 64) + Point::Create((progression % 6) * 64, (progression / 6) * 64);
|
||||
}
|
||||
|
||||
CopyBits(*loadScreenRingSurface->m_port.GetPixMap(), *loadScreenWindow->GetDrawSurface()->m_port.GetPixMap(), &ringSrcRect, &ringDestRect, srcCopy);
|
||||
loadScreenWindow->GetDrawSurface()->m_port.SetDirty(PortabilityLayer::QDPortDirtyFlag_Contents);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CreateLoadScreenWindow(int phase)
|
||||
{
|
||||
FlushResolutionChange();
|
||||
|
||||
if (loadScreenRingSurface)
|
||||
{
|
||||
DisposeGWorld(loadScreenRingSurface);
|
||||
loadScreenRingSurface = nullptr;
|
||||
}
|
||||
|
||||
if (loadScreenWindow)
|
||||
{
|
||||
PortabilityLayer::WindowManager::GetInstance()->DestroyWindow(loadScreenWindow);
|
||||
loadScreenWindow = nullptr;
|
||||
}
|
||||
|
||||
if (phase == 0)
|
||||
{
|
||||
static const int kLoadScreenHeight = 64;
|
||||
static const int kLoadScreenWidth = 64;
|
||||
static const int kLoadRingResource = 1303;
|
||||
|
||||
ForceSyncFrame();
|
||||
PLSysCalls::Sleep(1);
|
||||
|
||||
THandle<BitmapImage> loadRingImageH = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', kLoadRingResource).StaticCast<BitmapImage>();
|
||||
BitmapImage *loadRingImage = *loadRingImageH;
|
||||
|
||||
DrawSurface *loadRingSurface = nullptr;
|
||||
Rect loadRingRect = loadRingImage->GetRect();
|
||||
loadRingRect.right *= 2;
|
||||
loadRingRect.bottom *= 2;
|
||||
CreateOffScreenGWorld(&loadRingSurface, &loadRingRect);
|
||||
loadRingSurface->DrawPicture(loadRingImageH, loadRingRect, false);
|
||||
|
||||
int32_t lsX = (thisMac.fullScreen.Width() - kLoadScreenWidth) / 2;
|
||||
int32_t lsY = (thisMac.fullScreen.Height() - kLoadScreenHeight) / 2;
|
||||
|
||||
|
||||
const Rect loadScreenRect = Rect::Create(lsY, lsX, lsY + kLoadScreenHeight, lsX + kLoadScreenWidth);
|
||||
const Rect loadScreenLocalRect = Rect::Create(0, 0, loadScreenRect.Height(), loadScreenRect.Width());
|
||||
|
||||
PortabilityLayer::WindowDef def = PortabilityLayer::WindowDef::Create(loadScreenRect, PortabilityLayer::WindowStyleFlags::kBorderless, true, 0, 0, PSTR(""));
|
||||
|
||||
loadScreenWindow = PortabilityLayer::WindowManager::GetInstance()->CreateWindow(def);
|
||||
PortabilityLayer::WindowManager::GetInstance()->PutWindowBehind(loadScreenWindow, PL_GetPutInFrontWindowPtr());
|
||||
|
||||
DrawSurface *surface = loadScreenWindow->GetDrawSurface();
|
||||
PortabilityLayer::ResolveCachingColor blackColor(StdColors::Black());
|
||||
|
||||
surface->FillRect(loadScreenLocalRect, blackColor);
|
||||
|
||||
loadScreenProgressBarRect = Rect::Create(0, 0, 0, 0);
|
||||
loadScreenProgress = 0;
|
||||
|
||||
Rect ringDestRect = Rect::Create(0, 0, 64, 64);
|
||||
Rect ringSrcRect = Rect::Create(0, 0, 64, 64);
|
||||
CopyBits(*loadRingSurface->m_port.GetPixMap(), *surface->m_port.GetPixMap(), &ringSrcRect, &ringDestRect, srcCopy);
|
||||
|
||||
loadRingImageH.Dispose();
|
||||
|
||||
loadScreenRingSurface = loadRingSurface;
|
||||
}
|
||||
else if (phase == 1)
|
||||
{
|
||||
static const int kLoadScreenHeight = 32;
|
||||
static const int kLoadRingResource = 1302;
|
||||
|
||||
int kLoadScreenWidth = 296;
|
||||
PLPasStr loadingText = PSTR("Loading...");
|
||||
|
||||
if (!isPrefsLoaded)
|
||||
{
|
||||
loadingText = PSTR("Getting some things ready...");
|
||||
kLoadScreenWidth = 440;
|
||||
}
|
||||
|
||||
ForceSyncFrame();
|
||||
PLSysCalls::Sleep(1);
|
||||
|
||||
THandle<BitmapImage> loadRingImageH = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('PICT', kLoadRingResource).StaticCast<BitmapImage>();
|
||||
BitmapImage *loadRingImage = *loadRingImageH;
|
||||
|
||||
DrawSurface *loadRingSurface = nullptr;
|
||||
Rect loadRingRect = loadRingImage->GetRect();
|
||||
CreateOffScreenGWorld(&loadRingSurface, &loadRingRect);
|
||||
loadRingSurface->DrawPicture(loadRingImageH, loadRingRect, false);
|
||||
|
||||
int32_t lsX = (thisMac.fullScreen.Width() - kLoadScreenWidth) / 2;
|
||||
int32_t lsY = (thisMac.fullScreen.Height() - kLoadScreenHeight) / 2;
|
||||
|
||||
|
||||
const Rect loadScreenRect = Rect::Create(lsY, lsX, lsY + kLoadScreenHeight, lsX + kLoadScreenWidth);
|
||||
const Rect loadScreenLocalRect = Rect::Create(0, 0, loadScreenRect.Height(), loadScreenRect.Width());
|
||||
|
||||
PortabilityLayer::WindowDef def = PortabilityLayer::WindowDef::Create(loadScreenRect, PortabilityLayer::WindowStyleFlags::kAlert, true, 0, 0, PSTR(""));
|
||||
|
||||
loadScreenWindow = PortabilityLayer::WindowManager::GetInstance()->CreateWindow(def);
|
||||
PortabilityLayer::WindowManager::GetInstance()->PutWindowBehind(loadScreenWindow, PL_GetPutInFrontWindowPtr());
|
||||
|
||||
DrawSurface *surface = loadScreenWindow->GetDrawSurface();
|
||||
PortabilityLayer::ResolveCachingColor blackColor(StdColors::Black());
|
||||
PortabilityLayer::ResolveCachingColor whiteColor(StdColors::White());
|
||||
|
||||
surface->FillRect(loadScreenLocalRect, whiteColor);
|
||||
|
||||
PortabilityLayer::WindowManager::GetInstance()->FlickerWindowIn(loadScreenWindow, 32);
|
||||
|
||||
PortabilityLayer::RenderedFont *font = GetApplicationFont(18, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
int32_t textY = (kLoadScreenHeight + font->GetMetrics().m_ascent) / 2;
|
||||
surface->DrawString(Point::Create(4 + 16 + 8, textY), loadingText, blackColor, font);
|
||||
|
||||
static const int32_t loadBarPadding = 16;
|
||||
static const int32_t loadBarHeight = 10;
|
||||
int32_t loadBarStartX = static_cast<int32_t>(font->MeasureString(loadingText.UChars(), loadingText.Length())) + 4 + 16 + 8 + loadBarPadding;
|
||||
int32_t loadBarEndX = loadScreenLocalRect.right - loadBarPadding;
|
||||
|
||||
loadScreenProgressBarRect = Rect::Create((loadScreenLocalRect.Height() - loadBarHeight) / 2, loadBarStartX, (loadScreenLocalRect.Height() + loadBarHeight) / 2, loadBarEndX);
|
||||
|
||||
PortabilityLayer::ResolveCachingColor partialFillColor(PortabilityLayer::RGBAColor::Create(255, 255, 204, 255));
|
||||
surface->FrameRect(loadScreenProgressBarRect, blackColor);
|
||||
surface->FillRect(loadScreenProgressBarRect.Inset(1, 1), partialFillColor);
|
||||
|
||||
Rect ringDestRect = Rect::Create(8, 8, 24, 24);
|
||||
Rect ringSrcRect = Rect::Create(0, 0, 16, 16);
|
||||
CopyBits(*loadRingSurface->m_port.GetPixMap(), *surface->m_port.GetPixMap(), &ringSrcRect, &ringDestRect, srcCopy);
|
||||
|
||||
loadRingImageH.Dispose();
|
||||
|
||||
loadScreenRingSurface = loadRingSurface;
|
||||
}
|
||||
}
|
||||
|
||||
void StepLoadScreen(int steps, bool insertDelay)
|
||||
{
|
||||
if (loadScreenWindow)
|
||||
{
|
||||
static const int kLoadScreenPhaseSwitchBreakpoint = 20;
|
||||
|
||||
int oldProgress = loadScreenProgress;
|
||||
|
||||
if (loadScreenProgress + steps >= kLoadScreenPhaseSwitchBreakpoint && loadScreenWindowPhase == 0)
|
||||
{
|
||||
loadScreenWindowPhase = 1;
|
||||
CreateLoadScreenWindow(loadScreenWindowPhase);
|
||||
|
||||
// Reset old progress since the progress bar was redrawn
|
||||
oldProgress = 0;
|
||||
}
|
||||
|
||||
const Rect loadScreenProgressBarFillRect = loadScreenProgressBarRect.Inset(1, 1);
|
||||
|
||||
int loadScreenMax = 43;
|
||||
loadScreenProgress = loadScreenProgress + steps;
|
||||
if (loadScreenProgress > loadScreenMax)
|
||||
loadScreenProgress = loadScreenMax;
|
||||
|
||||
PortabilityLayer::ResolveCachingColor fillColor(PortabilityLayer::RGBAColor::Create(51, 51, 51, 255));
|
||||
|
||||
int prevStep = oldProgress * loadScreenProgressBarFillRect.Width() / loadScreenMax;
|
||||
int thisStep = loadScreenProgress * loadScreenProgressBarFillRect.Width() / loadScreenMax;
|
||||
|
||||
loadScreenWindow->GetDrawSurface()->FillRect(Rect::Create(loadScreenProgressBarFillRect.top, loadScreenProgressBarFillRect.left + prevStep, loadScreenProgressBarFillRect.bottom, loadScreenProgressBarFillRect.left + thisStep), fillColor);
|
||||
ForceSyncFrame();
|
||||
|
||||
if (insertDelay)
|
||||
{
|
||||
StepLoadScreenRing();
|
||||
Delay(1, nullptr);
|
||||
}
|
||||
}
|
||||
else
|
||||
SpinCursor(steps);
|
||||
}
|
||||
|
||||
void InitLoadingWindow()
|
||||
{
|
||||
if (!thisMac.isTouchscreen && isPrefsLoaded)
|
||||
return;
|
||||
|
||||
if (isPrefsLoaded)
|
||||
loadScreenWindowPhase = 1;
|
||||
else
|
||||
loadScreenWindowPhase = 0;
|
||||
|
||||
CreateLoadScreenWindow(loadScreenWindowPhase);
|
||||
}
|
||||
|
||||
enum PreloadFontCategory
|
||||
{
|
||||
FontCategory_System,
|
||||
FontCategory_Application,
|
||||
FontCategory_Handwriting,
|
||||
FontCategory_Monospace,
|
||||
};
|
||||
|
||||
struct PreloadFontSpec
|
||||
{
|
||||
PreloadFontCategory m_category;
|
||||
int m_size;
|
||||
int m_flags;
|
||||
bool m_aa;
|
||||
};
|
||||
|
||||
struct PreloadFontWorkSlot
|
||||
{
|
||||
IGpThreadEvent *m_completedEvent;
|
||||
PortabilityLayer::WorkerThread *m_workerThread;
|
||||
std::atomic<int> m_singleJobCompleted;
|
||||
const PreloadFontSpec *m_spec;
|
||||
bool m_queued;
|
||||
|
||||
PreloadFontWorkSlot();
|
||||
~PreloadFontWorkSlot();
|
||||
};
|
||||
|
||||
PreloadFontWorkSlot::PreloadFontWorkSlot()
|
||||
: m_completedEvent(nullptr)
|
||||
, m_workerThread(nullptr)
|
||||
, m_spec(nullptr)
|
||||
, m_queued(false)
|
||||
{
|
||||
}
|
||||
|
||||
PreloadFontWorkSlot::~PreloadFontWorkSlot()
|
||||
{
|
||||
if (m_workerThread)
|
||||
m_workerThread->Destroy();
|
||||
}
|
||||
|
||||
void PreloadSingleFont (const PreloadFontSpec &spec)
|
||||
{
|
||||
switch (spec.m_category)
|
||||
{
|
||||
case FontCategory_Application:
|
||||
GetApplicationFont(spec.m_size, spec.m_flags, spec.m_aa);
|
||||
break;
|
||||
case FontCategory_System:
|
||||
GetSystemFont(spec.m_size, spec.m_flags, spec.m_aa);
|
||||
break;
|
||||
case FontCategory_Handwriting:
|
||||
GetHandwritingFont(spec.m_size, spec.m_flags, spec.m_aa);
|
||||
break;
|
||||
case FontCategory_Monospace:
|
||||
GetMonospaceFont(spec.m_size, spec.m_flags, spec.m_aa);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void PreloadFontThreadFunc(void *context)
|
||||
{
|
||||
PreloadFontWorkSlot *wSlot = static_cast<PreloadFontWorkSlot*>(context);
|
||||
|
||||
PreloadSingleFont(*wSlot->m_spec);
|
||||
wSlot->m_singleJobCompleted.fetch_add(1, std::memory_order_release);
|
||||
wSlot->m_completedEvent->Signal();
|
||||
}
|
||||
|
||||
void PreloadFonts()
|
||||
{
|
||||
static PreloadFontSpec specs[] =
|
||||
{
|
||||
// First entry should be the one needed to show the load screen
|
||||
{ FontCategory_Application, 18, PortabilityLayer::FontFamilyFlag_None, true },
|
||||
|
||||
{ FontCategory_System, 9, PortabilityLayer::FontFamilyFlag_Bold, true },
|
||||
{ FontCategory_System, 10, PortabilityLayer::FontFamilyFlag_Bold, true },
|
||||
{ FontCategory_System, 12, PortabilityLayer::FontFamilyFlag_None, true },
|
||||
{ FontCategory_System, 12, PortabilityLayer::FontFamilyFlag_Bold, true },
|
||||
{ FontCategory_Application, 8, PortabilityLayer::FontFamilyFlag_None, true },
|
||||
{ FontCategory_Application, 9, PortabilityLayer::FontFamilyFlag_None, true },
|
||||
{ FontCategory_Application, 12, PortabilityLayer::FontFamilyFlag_Bold, true },
|
||||
{ FontCategory_Application, 14, PortabilityLayer::FontFamilyFlag_Bold, true },
|
||||
{ FontCategory_Application, 14, PortabilityLayer::FontFamilyFlag_None, true },
|
||||
{ FontCategory_Application, 40, PortabilityLayer::FontFamilyFlag_None, true },
|
||||
{ FontCategory_Handwriting, 24, PortabilityLayer::FontFamilyFlag_None, true },
|
||||
{ FontCategory_Handwriting, 48, PortabilityLayer::FontFamilyFlag_None, true },
|
||||
{ FontCategory_Monospace, 10, PortabilityLayer::FontFamilyFlag_None, true },
|
||||
};
|
||||
|
||||
PortabilityLayer::MemoryManager *mm = PortabilityLayer::MemoryManager::GetInstance();
|
||||
|
||||
const int numFontSpecs = sizeof(specs) / sizeof(specs[0]);
|
||||
|
||||
int queuedSpecs = 0;
|
||||
int completedSpecs = 0;
|
||||
|
||||
// We can't actually slot these because FT isn't thread-safe when accessing the same font,
|
||||
// but we can do this to unclog the render thread.
|
||||
PreloadFontWorkSlot slot;
|
||||
slot.m_workerThread = PortabilityLayer::WorkerThread::Create();
|
||||
slot.m_completedEvent = PLDrivers::GetSystemServices()->CreateThreadEvent(true, false);
|
||||
|
||||
while (completedSpecs < numFontSpecs)
|
||||
{
|
||||
if (slot.m_queued)
|
||||
{
|
||||
if (slot.m_singleJobCompleted.load(std::memory_order_acquire) != 0)
|
||||
{
|
||||
slot.m_completedEvent->Wait();
|
||||
slot.m_queued = false;
|
||||
completedSpecs++;
|
||||
|
||||
StepLoadScreen(1, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (!slot.m_queued)
|
||||
{
|
||||
if (queuedSpecs < numFontSpecs)
|
||||
{
|
||||
slot.m_queued = true;
|
||||
slot.m_spec = specs + queuedSpecs;
|
||||
slot.m_singleJobCompleted.store(0, std::memory_order_release);
|
||||
slot.m_workerThread->AsyncExecuteTask(PreloadFontThreadFunc, &slot);
|
||||
|
||||
queuedSpecs++;
|
||||
}
|
||||
}
|
||||
|
||||
StepLoadScreenRing();
|
||||
Delay(1, nullptr);
|
||||
}
|
||||
|
||||
PortabilityLayer::FontManager::GetInstance()->PurgeCache();
|
||||
}
|
||||
|
||||
struct PreloadAATableSpec
|
||||
{
|
||||
PortabilityLayer::RGBAColor m_color;
|
||||
bool m_isTone;
|
||||
};
|
||||
|
||||
struct PreloadAATableWorkSlot
|
||||
{
|
||||
IGpThreadEvent *m_completedEvent;
|
||||
IGpMutex *m_mutex;
|
||||
PortabilityLayer::WorkerThread *m_workerThread;
|
||||
std::atomic<int> m_singleJobCompleted;
|
||||
const PreloadAATableSpec *m_spec;
|
||||
bool m_queued;
|
||||
|
||||
PreloadAATableWorkSlot();
|
||||
~PreloadAATableWorkSlot();
|
||||
};
|
||||
|
||||
PreloadAATableWorkSlot::PreloadAATableWorkSlot()
|
||||
: m_completedEvent(nullptr)
|
||||
, m_workerThread(nullptr)
|
||||
, m_spec(nullptr)
|
||||
, m_queued(false)
|
||||
{
|
||||
}
|
||||
|
||||
PreloadAATableWorkSlot::~PreloadAATableWorkSlot()
|
||||
{
|
||||
if (m_workerThread)
|
||||
m_workerThread->Destroy();
|
||||
}
|
||||
|
||||
|
||||
void PreloadAATableThreadFunc(void *context)
|
||||
{
|
||||
PreloadAATableWorkSlot *wSlot = static_cast<PreloadAATableWorkSlot*>(context);
|
||||
|
||||
PortabilityLayer::StandardPalette *sp = PortabilityLayer::StandardPalette::GetInstance();
|
||||
|
||||
if (wSlot->m_spec->m_isTone)
|
||||
sp->GetCachedToneAATable(wSlot->m_spec->m_color.r, wSlot->m_mutex);
|
||||
else
|
||||
sp->GetCachedPaletteAATable(wSlot->m_spec->m_color, wSlot->m_mutex);
|
||||
|
||||
wSlot->m_singleJobCompleted.fetch_add(1, std::memory_order_release);
|
||||
wSlot->m_completedEvent->Signal();
|
||||
}
|
||||
|
||||
void PreloadAATables()
|
||||
{
|
||||
PortabilityLayer::StandardPalette *sp = PortabilityLayer::StandardPalette::GetInstance();
|
||||
PortabilityLayer::RGBAColor preloadColors[] =
|
||||
{
|
||||
PortabilityLayer::RGBAColor::Create(255, 255, 255, 255),
|
||||
PortabilityLayer::RGBAColor::Create(255, 51, 51, 255),
|
||||
PortabilityLayer::RGBAColor::Create(255, 0, 0, 255),
|
||||
PortabilityLayer::RGBAColor::Create(255, 255, 0, 255),
|
||||
PortabilityLayer::RGBAColor::Create(0, 255, 255, 255),
|
||||
PortabilityLayer::RGBAColor::Create(0, 0, 255, 255),
|
||||
PortabilityLayer::RGBAColor::Create(204, 102, 51, 255),
|
||||
PortabilityLayer::RGBAColor::Create(102, 102, 102, 255),
|
||||
PortabilityLayer::RGBAColor::Create(51, 51, 102, 255),
|
||||
PortabilityLayer::RGBAColor::Create(255, 255, 51, 255),
|
||||
PortabilityLayer::RGBAColor::Create(0, 0, 0, 255),
|
||||
};
|
||||
|
||||
const size_t numPalettePreloads = sizeof(preloadColors) / sizeof(preloadColors[0]);
|
||||
const size_t maxTonePreloads = numPalettePreloads * 3;
|
||||
|
||||
PreloadAATableSpec specs[numPalettePreloads + maxTonePreloads];
|
||||
for (size_t i = 0; i < numPalettePreloads; i++)
|
||||
{
|
||||
specs[i].m_color = preloadColors[i];
|
||||
specs[i].m_isTone = false;
|
||||
}
|
||||
|
||||
size_t numTonePreloads = 0;
|
||||
for (size_t i = 0; i < numPalettePreloads; i++)
|
||||
{
|
||||
const uint8_t rgb[3] = { preloadColors[i].r, preloadColors[i].g, preloadColors[i].b };
|
||||
|
||||
for (int ch = 0; ch < 3; ch++)
|
||||
{
|
||||
uint8_t tone = rgb[ch];
|
||||
|
||||
bool toneAlreadyQueued = false;
|
||||
for (size_t j = 0; j < numTonePreloads; j++)
|
||||
{
|
||||
if (specs[numPalettePreloads + j].m_color.r == tone)
|
||||
{
|
||||
toneAlreadyQueued = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!toneAlreadyQueued)
|
||||
{
|
||||
PreloadAATableSpec &spec = specs[numPalettePreloads + numTonePreloads];
|
||||
numTonePreloads++;
|
||||
|
||||
spec.m_color = PortabilityLayer::RGBAColor::Create(tone, tone, tone, 255);
|
||||
spec.m_isTone = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PortabilityLayer::MemoryManager *mm = PortabilityLayer::MemoryManager::GetInstance();
|
||||
|
||||
const int numAASpecs = numPalettePreloads + numTonePreloads;
|
||||
|
||||
unsigned int cpus = PLDrivers::GetSystemServices()->GetCPUCount();
|
||||
if (cpus < 2)
|
||||
{
|
||||
for (size_t i = 0; i < numAASpecs; i++)
|
||||
{
|
||||
PreloadAATableThreadFunc(specs + i);
|
||||
StepLoadScreen(1, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cpus -= 1;
|
||||
|
||||
int queuedSpecs = 0;
|
||||
int completedSpecs = 0;
|
||||
|
||||
PreloadAATableWorkSlot *slots = static_cast<PreloadAATableWorkSlot*>(mm->Alloc(sizeof(PreloadAATableWorkSlot) * cpus));
|
||||
|
||||
IGpMutex *mutex = PLDrivers::GetSystemServices()->CreateMutex();
|
||||
|
||||
for (unsigned int i = 0; i < cpus; i++)
|
||||
{
|
||||
PreloadAATableWorkSlot *slot = new (slots + i) PreloadAATableWorkSlot();
|
||||
slot->m_workerThread = PortabilityLayer::WorkerThread::Create();
|
||||
slot->m_completedEvent = PLDrivers::GetSystemServices()->CreateThreadEvent(true, false);
|
||||
slot->m_mutex = mutex;
|
||||
}
|
||||
|
||||
while (completedSpecs < numAASpecs)
|
||||
{
|
||||
int completedThisStep = 0;
|
||||
for (unsigned int i = 0; i < cpus; i++)
|
||||
{
|
||||
PreloadAATableWorkSlot &slot = slots[i];
|
||||
|
||||
if (slot.m_queued)
|
||||
{
|
||||
if (slot.m_singleJobCompleted.load(std::memory_order_acquire) != 0)
|
||||
{
|
||||
slot.m_completedEvent->Wait();
|
||||
slot.m_queued = false;
|
||||
completedSpecs++;
|
||||
|
||||
completedThisStep++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!slot.m_queued)
|
||||
{
|
||||
if (queuedSpecs < numAASpecs)
|
||||
{
|
||||
slot.m_queued = true;
|
||||
slot.m_spec = specs + queuedSpecs;
|
||||
slot.m_singleJobCompleted.store(0, std::memory_order_release);
|
||||
slot.m_workerThread->AsyncExecuteTask(PreloadAATableThreadFunc, &slot);
|
||||
|
||||
queuedSpecs++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (completedThisStep > 0)
|
||||
StepLoadScreen(completedThisStep, false);
|
||||
|
||||
StepLoadScreenRing();
|
||||
Delay(1, nullptr);
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < cpus; i++)
|
||||
slots[i].~PreloadAATableWorkSlot();
|
||||
|
||||
mm->Release(slots);
|
||||
mutex->Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
void ShowInitialLaunchDisclaimer()
|
||||
{
|
||||
const char *disclaimerLines[] =
|
||||
@@ -933,8 +383,8 @@ void ShowInitialLaunchDisclaimer()
|
||||
|
||||
const size_t numLines = sizeof(disclaimerLines) / sizeof(disclaimerLines[0]);
|
||||
|
||||
PortabilityLayer::RenderedFont *rfont = GetApplicationFont(14, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *buttonFont = GetApplicationFont(18, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *rfont = GetFont(PortabilityLayer::FontPresets::kApplication14);
|
||||
PortabilityLayer::RenderedFont *buttonFont = GetFont(PortabilityLayer::FontPresets::kApplication18);
|
||||
|
||||
const int kButtonSpacing = 16;
|
||||
const int kButtonHeight = 32;
|
||||
@@ -1098,11 +548,6 @@ int gpAppMain()
|
||||
SpinCursor(2); // Tick once to let the display driver flush any resolution changes from prefs
|
||||
FlushResolutionChange();
|
||||
|
||||
InitLoadingWindow(); StepLoadScreen(2, true);
|
||||
PreloadAATables();
|
||||
assert(isPrefsLoaded || loadScreenWindowPhase == 0);
|
||||
PreloadFonts(); StepLoadScreen(2, true);
|
||||
|
||||
#if defined COMPILEDEMO
|
||||
copyGood = true;
|
||||
#elif defined COMPILENOCP
|
||||
@@ -1120,25 +565,12 @@ int gpAppMain()
|
||||
// if ((thisMac.numScreens > 1) && (isUseSecondScreen))
|
||||
// ReflectSecondMonitorEnvirons(false, true, true);
|
||||
HandleDepthSwitching();
|
||||
VariableInit(); StepLoadScreen(2, true);
|
||||
GetExtraCursors(); StepLoadScreen(2, true);
|
||||
VariableInit();
|
||||
GetExtraCursors();
|
||||
InitMarquee();
|
||||
CreatePointers(); StepLoadScreen(2, true);
|
||||
CreatePointers();
|
||||
InitSrcRects();
|
||||
CreateOffscreens(); StepLoadScreen(2, true);
|
||||
|
||||
if (loadScreenWindow)
|
||||
{
|
||||
PortabilityLayer::WindowManager::GetInstance()->FlickerWindowOut(loadScreenWindow, 32);
|
||||
PortabilityLayer::WindowManager::GetInstance()->DestroyWindow(loadScreenWindow);
|
||||
PLSysCalls::Sleep(15);
|
||||
}
|
||||
|
||||
if (loadScreenRingSurface)
|
||||
{
|
||||
DisposeGWorld(loadScreenRingSurface);
|
||||
loadScreenRingSurface = nullptr;
|
||||
}
|
||||
CreateOffscreens();
|
||||
|
||||
bool resolutionChanged = false;
|
||||
|
||||
|
||||
@@ -64,13 +64,13 @@ struct MainMenuUIState
|
||||
ControlID m_activeControl;
|
||||
|
||||
static const unsigned int kControlHeight = 40;
|
||||
static const unsigned int kControlFontSize = 24;
|
||||
static const unsigned int kControlLeftSpacing = 20;
|
||||
static const unsigned int kControlBottomSpacing = 20;
|
||||
static const unsigned int kControlIntermediateSpacing = 16;
|
||||
static const unsigned int kControlInteriorSpacing = 6;
|
||||
static const unsigned int kControlScrollInDecay = 32;
|
||||
static const unsigned int kControlScrollInDecayFalloffBits = 0;
|
||||
static const PortabilityLayer::FontPreset_t kControlFontPreset = PortabilityLayer::FontPresets::kHandwriting24;
|
||||
};
|
||||
|
||||
static MainMenuUIState mainMenu;
|
||||
@@ -135,7 +135,7 @@ static void DrawMainMenuControl(DrawSurface *surface, MainMenuUIState::ControlID
|
||||
{
|
||||
case MainMenuUIState::ControlStyle_Text:
|
||||
{
|
||||
PortabilityLayer::RenderedFont *rfont = GetHandwritingFont(MainMenuUIState::kControlFontSize, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *rfont = GetFont(MainMenuUIState::kControlFontPreset);
|
||||
if (!rfont)
|
||||
return;
|
||||
|
||||
@@ -219,7 +219,7 @@ void StartMainMenuUI()
|
||||
{
|
||||
DismissMainMenuUI();
|
||||
|
||||
PortabilityLayer::RenderedFont *rfont = GetHandwritingFont(MainMenuUIState::kControlFontSize, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *rfont = GetFont(MainMenuUIState::kControlFontPreset);
|
||||
if (!rfont)
|
||||
return;
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ void DrawOnSplash(DrawSurface *surface)
|
||||
if ((thisMac.hasQT) && (hasMovie))
|
||||
PasStringConcat(houseLoadedStr, PSTR(" (TV)"));
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(9, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication9Bold);
|
||||
|
||||
const Point textPoint = Point::Create(splashOriginH + 436, splashOriginV + 314);
|
||||
if (thisMac.isDepth == 4)
|
||||
|
||||
@@ -1057,7 +1057,7 @@ void DrawCalendar (Rect *theRect)
|
||||
backSrcMap->DrawPicture(thePicture, bounds);
|
||||
thePicture.Dispose();
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(9, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication9Bold);
|
||||
|
||||
GetTime(&timeRec);
|
||||
GetIndString(monthStr, kMonthStringID, timeRec.month);
|
||||
|
||||
@@ -251,7 +251,7 @@ void ReadyBackground (short theID, short *theTiles)
|
||||
|
||||
workSrcMap->FillRect(workSrcRect, ltGrayColor);
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(9, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication9);
|
||||
|
||||
const Point textPoint = Point::Create(10, 20);
|
||||
if (houseUnlocked)
|
||||
|
||||
@@ -44,7 +44,7 @@ static const int kScoreOffset = 320;
|
||||
static void FBUI_DrawLabels(DrawSurface *surface, const Point &basePoint)
|
||||
{
|
||||
PortabilityLayer::ResolveCachingColor blackColor(StdColors::Black());
|
||||
PortabilityLayer::RenderedFont *rfont = GetSystemFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *rfont = GetFont(PortabilityLayer::FontPresets::kSystem12Bold);
|
||||
|
||||
surface->DrawString(basePoint + Point::Create(kStarsOffset, 0), PSTR("Stars Left"), blackColor, rfont);
|
||||
surface->DrawString(basePoint + Point::Create(kGlidersOffset, 0), PSTR("Gliders"), blackColor, rfont);
|
||||
@@ -54,7 +54,7 @@ static void FBUI_DrawLabels(DrawSurface *surface, const Point &basePoint)
|
||||
static void FBUI_DrawFileDetails(DrawSurface *surface, const Point &basePoint, const Rect &constraintRect, void *fileDetails)
|
||||
{
|
||||
PortabilityLayer::ResolveCachingColor blackColor(StdColors::Black());
|
||||
PortabilityLayer::RenderedFont *rfont = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *rfont = GetFont(PortabilityLayer::FontPresets::kSystem12Bold);
|
||||
|
||||
const game2Type *gameData = static_cast<const game2Type*>(fileDetails);
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ void RefreshRoomTitle (short mode)
|
||||
const Point strShadowPoint = Point::Create(1, 10);
|
||||
const Point strPoint = Point::Create(0, 9);
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
@@ -221,7 +221,7 @@ void RefreshNumGliders (void)
|
||||
long displayMortals;
|
||||
DrawSurface *surface = boardGSrcMap;
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
|
||||
|
||||
PortabilityLayer::ResolveCachingColor theRGBColor = PortabilityLayer::ResolveCachingColor::FromStandardColor(kGrayBackgroundColor);
|
||||
PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black();
|
||||
@@ -256,7 +256,7 @@ void RefreshPoints (void)
|
||||
PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black();
|
||||
PortabilityLayer::ResolveCachingColor whiteColor = StdColors::White();
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
|
||||
|
||||
surface->FillRect(boardPSrcRect, theRGBColor);
|
||||
|
||||
@@ -286,7 +286,7 @@ void QuickGlidersRefresh (void)
|
||||
PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black();
|
||||
PortabilityLayer::ResolveCachingColor whiteColor = StdColors::White();
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
|
||||
|
||||
surface->FillRect(boardGSrcRect, theRGBColor);
|
||||
|
||||
@@ -316,7 +316,7 @@ void QuickScoreRefresh (void)
|
||||
PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black();
|
||||
PortabilityLayer::ResolveCachingColor whiteColor = StdColors::White();
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
|
||||
|
||||
surface->FillRect(boardPSrcRect, theRGBColor);
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ static void InitSourceExportWindow(SourceExportState *state)
|
||||
PortabilityLayer::WindowManager::GetInstance()->FlickerWindowIn(state->m_window, 32);
|
||||
|
||||
const PLPasStr loadingText = PSTR("Exporting...");
|
||||
PortabilityLayer::RenderedFont *font = GetApplicationFont(18, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *font = GetFont(PortabilityLayer::FontPresets::kApplication18);
|
||||
int32_t textY = (kLoadScreenHeight + font->GetMetrics().m_ascent) / 2;
|
||||
surface->DrawString(Point::Create(4 + 16, textY), loadingText, blackColor, font);
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ void DrawToolName (DrawSurface *surface)
|
||||
|
||||
const Point textPoint = Point::Create(toolTextRect.left + 3, toolTextRect.bottom - 6);
|
||||
|
||||
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(9, PortabilityLayer::FontFamilyFlag_Bold, true);
|
||||
PortabilityLayer::RenderedFont *appFont = GetFont(PortabilityLayer::FontPresets::kApplication9Bold);
|
||||
ColorText(surface, textPoint, theString, 171L, appFont);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -146,7 +146,7 @@ void SetMessageWindowMessage (StringPtr message, const PortabilityLayer::RGBACol
|
||||
{
|
||||
DrawSurface *surface = mssgWindow->GetDrawSurface();
|
||||
|
||||
PortabilityLayer::RenderedFont *sysFont = GetSystemFont(12, PortabilityLayer::FontFamilyFlag_None, true);
|
||||
PortabilityLayer::RenderedFont *sysFont = GetFont(PortabilityLayer::FontPresets::kSystem12);
|
||||
|
||||
SetRect(&mssgWindowRect, 0, 0, 256, kMessageWindowTall);
|
||||
InsetRect(&mssgWindowRect, 16, 16);
|
||||
|
||||
Reference in New Issue
Block a user