|
@@ -96,9 +96,7 @@ var
|
|
|
WindowForReqSave: PWindow;
|
|
|
Process: PProcess;
|
|
|
|
|
|
-{$IFNDEF AROS}
|
|
|
FontBitmap: PBitmap;
|
|
|
-{$ENDIF}
|
|
|
(*
|
|
|
GetScreen: pScreen;
|
|
|
|
|
@@ -227,6 +225,7 @@ var
|
|
|
Counter,
|
|
|
Counter2: LongInt;
|
|
|
P: PWord;
|
|
|
+ flags: DWord;
|
|
|
begin
|
|
|
{$IFDEF MORPHOS}
|
|
|
InitGraphicsLibrary;
|
|
@@ -293,26 +292,39 @@ begin
|
|
|
{$endif}
|
|
|
end;
|
|
|
|
|
|
-{$IFNDEF AROS}
|
|
|
{ Obtain Friend bitmap for font blitting }
|
|
|
FontBitmap:=AllocBitMap(16,16*256,1,0,VideoWindow^.RPort^.Bitmap);
|
|
|
|
|
|
- { We need to make the data word wide, otherwise the blit will fail
|
|
|
- miserably on classics (tested on 3.1 + AGA) }
|
|
|
- if FontBitmap <> nil then
|
|
|
+ if (FontBitmap <> nil) then
|
|
|
begin
|
|
|
- { Locking the bitmap would be better, but that requires CGFX/P96/etc specific calls }
|
|
|
- Forbid();
|
|
|
- p:=PWord(FontBitmap^.Planes[0]);
|
|
|
- for counter:=0 to 255 do
|
|
|
- for counter2:=0 to 15 do
|
|
|
+ flags:=GetBitmapAttr(FontBitmap,BMA_FLAGS);
|
|
|
+ if (Flags and BMF_STANDARD) > 0 then
|
|
|
+ begin
|
|
|
+ {$ifdef VIDEODEBUG}
|
|
|
+ writeln('Using fontbitmap mode.');
|
|
|
+ {$endif}
|
|
|
+ { Locking the bitmap would be better, but that requires CGFX/P96/etc specific calls }
|
|
|
+ Forbid();
|
|
|
+ { We need to make the data word wide, otherwise the blit will fail
|
|
|
+ miserably on classics (tested on 3.1 + AGA) }
|
|
|
+ p:=PWord(FontBitmap^.Planes[0]);
|
|
|
+ for counter:=0 to 255 do
|
|
|
+ for counter2:=0 to 15 do
|
|
|
begin
|
|
|
p^:=vgafont[counter,counter2] shl 8;
|
|
|
inc(p);
|
|
|
end;
|
|
|
- Permit();
|
|
|
+ Permit();
|
|
|
+ end
|
|
|
+ else
|
|
|
+ begin
|
|
|
+ {$ifdef VIDEODEBUG}
|
|
|
+ writeln('Using direct-from-fontdata mode.');
|
|
|
+ {$endif}
|
|
|
+ FreeBitmap(FontBitmap);
|
|
|
+ FontBitmap:=nil;
|
|
|
+ end;
|
|
|
end;
|
|
|
-{$ENDIF}
|
|
|
|
|
|
CursorX := 0;
|
|
|
CursorY := 0;
|
|
@@ -356,9 +368,7 @@ begin
|
|
|
VideoWindow := nil;
|
|
|
end;
|
|
|
|
|
|
-{$IFNDEF AROS}
|
|
|
FreeBitMap(FontBitmap);
|
|
|
-{$ENDIF}
|
|
|
|
|
|
{$ifdef WITHBUFFERING}
|
|
|
FreeBitmap(BufRp^.Bitmap);
|
|
@@ -439,11 +449,10 @@ begin
|
|
|
SetABPenDrMd(rp, VideoPens[tmpBGColor], VideoPens[tmpFGColor], JAM2);
|
|
|
end;
|
|
|
|
|
|
-{$IFNDEF AROS}
|
|
|
- BltTemplate(@(PWord(FontBitmap^.Planes[0])[tmpChar * 16]), 0, 2, rp, sX, sY, 8, 16);
|
|
|
-{$ELSE}
|
|
|
- BltTemplate(@Vgafont[tmpChar, 0], 0, 1, rp, sX, sY, 8, 16);
|
|
|
-{$ENDIF}
|
|
|
+ if FontBitmap <> nil then
|
|
|
+ BltTemplate(@(PWord(FontBitmap^.Planes[0])[tmpChar * 16]), 0, 2, rp, sX, sY, 8, 16)
|
|
|
+ else
|
|
|
+ BltTemplate(@Vgafont[tmpChar, 0], 0, 1, rp, sX, sY, 8, 16);
|
|
|
|
|
|
if crType = crUnderLine then
|
|
|
begin
|