hi again :D
i wanted to display a sinewave on screen but ran into several
problems, which made me do a simple floatingpoint-testprogram:
Code:
Program blah;
{$APPTYPE ARM9}
{$DEFINE ARM9}
{$MODE OBJFPC}
uses
cTypes;
{$INCLUDE NDS.INC}
Var
NewX,NewY : Integer;
a,s,d : integer;
i : real;
Dummy : String;
Begin
consoleDemoInit();
videoSetMode(MODE_FB0);
vramSetBankA(VRAM_A_LCD);
lcdSwap;
i := 0;
newy := 0;
for a := 0 to 255 do
Begin
newy := trunc(i);
i:=i+1;
vram_A[(95 + NewY) * 256 + a] := rgb15(31,31,31);
Str(i,Dummy);
Dummy := Dummy + ' ';
printf(@Dummy+1);
End;
While True do;
end.
This produces:
... but when i replace "real" with "integer" it works normally, shown here:
shouldn't both ways produce the same result, as i only increment
a variable by 1?
oh and: is there any other way simple way to output a non-PChar? :D
Bookmarks