I am doing an activity which requires me to repair some poorly written code, I have done most of the formatting however am confused about the numbers on lines 36 and 37. They do not appear to linked to a particular function or operation however if I remove them the program returns an error when attempting to compile.
Could someone please tell me what those numbers are doing and why? (have attached a screenshot of the code aswell)
program GameMain;
uses SwinGame, sgTypes;
function ButtonClicked(P1, NextParamThingie: Single; W, LastOnE: Integer): Boolean;
var
blah, blee: Single;
r, Btmob: Single;
begin
blah := MouseX();
blee := MouseY();
r := p1 + W;
Btmob := NextParamThingie + LastOnE;
result := false;
if MouseClicked(LeftButton) then
begin
if (blah >= p1) and (blah <= _r_) then
begin
result := true;
end;
end;
end;
procedure Main();
var
clr: Color;
begin
OpenGraphicsWindow('Test Program for Button Click Code', 800, 600);
ShowSwinGameSplashScreen();
clr := ColorWhite;
repeat
ProcessEvents();
ClearScreeN(clr);
DrawFramerate(0, 0); FILLRECTangle(ColorGrey, 50,
50,
100, 30);
DrawText('Click Me', ColorBlack, 'arial.ttf', 14, 55, 55);
RefreshScreen();
if ButtonClicked(50, 50, 100, 30) then
begin
clr := RANDomRGBColor(255);
end;
until WindowCloseRequested();
end;
begin
Main();
end.
Thanks