summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dda89b4)
raw | patch | inline | side by side (parent: dda89b4)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Wed, 4 Oct 2017 18:57:52 +0000 (21:57 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Wed, 4 Oct 2017 18:57:52 +0000 (21:57 +0300) |
src/game/g_holmes.pas | patch | blob | history | |
src/game/g_main.pas | patch | blob | history | |
src/game/g_window.pas | patch | blob | history |
diff --git a/src/game/g_holmes.pas b/src/game/g_holmes.pas
index 0b5c00de044b53516432b702412a73a6e5d6f48d..c3c29df5646f86a93c0c3c6b42474c611f6dd17d 100644 (file)
--- a/src/game/g_holmes.pas
+++ b/src/game/g_holmes.pas
if showMonsInfo then
begin
//fillRect(mx-4, my-7*8-6, 110, 7*8+6, 0, 0, 94, 250);
- hlmContext.font := 'msx';
+ hlmContext.font := 'msx6';
hlmContext.color := TGxRGBA.Create(255, 127, 0);
hlmContext.darkenRect(mx-4, my-7*hlmContext.charWidth(' ')-6, 110, 7*hlmContext.charWidth(' ')+6, 128);
tts: AnsiString;
tx: Integer;
begin
- hlmContext.font := 'msx';
+ hlmContext.font := 'msx6';
hlmContext.color := TGxRGBA.Create(255, 0, 255, 96);
hlmContext.fillRect(trig.x, trig.y, trig.width, trig.height);
tts := trigType2Str(trig.TriggerType);
if showMapCurPos then
begin
gxSetContext(hlmContext);
- hlmContext.font := 'dos';
+ hlmContext.font := 'win8';
hlmContext.color := TGxRGBA.Create(255, 255, 0);
hlmContext.drawText(4, gWinSizeY-10, Format('mappos:(%d,%d)', [pmsCurMapX, pmsCurMapY]));
gxSetContext(nil);
diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 7de78252194aea44adfb3baf70463f403f5ede8b..b5a22840fbda68d7b604cb420dd1e351f07f0fb2 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
procedure Main();
var
sdlflags: LongWord;
+{$IFNDEF HEADLESS}
+ flexloaded: Boolean;
+{$ENDIF}
begin
e_InitWritelnDriver();
{$ENDIF}
{$IFNDEF HEADLESS}
+ flexloaded := true;
if not fuiAddWad('flexui.wad') then
begin
if not fuiAddWad('./data/flexui.wad') then fuiAddWad('./flexui.wad');
end;
- g_holmes_imfunctional := true;
- try
- e_LogWriteln('FlexUI: loading stylesheet...');
- uiLoadStyles('flexui/widgets.wgs');
- except on e: TParserException do
- begin
- writeln('ERROR at (', e.tokLine, ',', e.tokCol, '): ', e.message);
- //raise;
- end;
- else
- begin
- //raise;
- end;
- end;
try
fuiGfxLoadFont('win8', 'flexui/fonts/win8.fuifont');
fuiGfxLoadFont('win14', 'flexui/fonts/win14.fuifont');
fuiGfxLoadFont('win16', 'flexui/fonts/win16.fuifont');
- g_holmes_imfunctional := false;
+ fuiGfxLoadFont('dos8', 'flexui/fonts/dos8.fuifont');
+ fuiGfxLoadFont('msx6', 'flexui/fonts/msx6.fuifont');
except on e: Exception do
begin
writeln('ERROR loading FlexUI fonts');
+ flexloaded := false;
//raise;
end;
else
begin
+ flexloaded := false;
//raise;
end;
end;
+ if (flexloaded) then
+ begin
+ try
+ e_LogWriteln('FlexUI: loading stylesheet...');
+ uiLoadStyles('flexui/widgets.wgs');
+ except on e: TParserException do
+ begin
+ writeln('ERROR at (', e.tokLine, ',', e.tokCol, '): ', e.message);
+ //raise;
+ flexloaded := false;
+ end;
+ else
+ begin
+ //raise;
+ flexloaded := false;
+ end;
+ end;
+ end;
+ g_holmes_imfunctional := not flexloaded;
{$ENDIF}
e_WriteLog('Entering SDLMain', TMsgType.Notify);
diff --git a/src/game/g_window.pas b/src/game/g_window.pas
index dbf50d348afa7ca9e77865300c10b126d94329bb..80e63fd640ae7fce250d3e713d7d6944440cfeb6 100644 (file)
--- a/src/game/g_window.pas
+++ b/src/game/g_window.pas
{$IFDEF HEADLESS}
e_NoGraphics := true;
{$ELSE}
- uiInitialize();
- uiContext.font := 'win14';
+ if (not g_holmes_imfunctional) then
+ begin
+ uiInitialize();
+ uiContext.font := 'win14';
+ end;
{$ENDIF}
idx := 1;