Chaosforge Forum

Coding => FPC Valkyrie => Topic started by: Igor Savin on January 24, 2008, 14:15

Title: Weird stuff in Valkyrie
Post by: Igor Savin on January 24, 2008, 14:15
procedure TTextModeOutput.DrawChar(x,y : byte; atr : byte; chr : char; Color : TColor = 0);
begin
  VideoBuf^[(x-1)+(y-1)*ScreenSizeX] := Ord(chr)+(atr shl 8);
end;

\\\

What is the "Color" here for?


***


Also, maybe you should update

(vini)
type TINIFileCallbackProcedure = procedure (const nkey,nvalue : string);

and

(*ui)
function InputCommandParser(const Token : String) : byte;


(vinput)
TTokenReader = function(const Token : string) : byte;

(vini)
type TINIEntry = record
                   a : ShortString;




to use ShortStrings, in order to avoid error messages like

E:\Elwin\Yhacking\Pascal\Valk\vui.pas(836,47) Error: Incompatible type for arg no. 1: Got "<address of procedure(const ShortString,const ShortString);Register>", expected "<procedure variable type of procedure(const AnsiString,const AnsiString);Register>"
Title: Re: Weird stuff in Valkyrie
Post by: Kornel Kisielewicz on January 25, 2008, 02:08
Color is implemented only in those interfaces that support it :P. As for the second one, I need to competely rewrite vini anyway soon.
Title: Re: Weird stuff in Valkyrie
Post by: Igor Savin on January 25, 2008, 02:46
TTokenReader in vInput would still benefit from clarifying type of String used.