equal
deleted
inserted
replaced
25 procedure Draw; |
25 procedure Draw; |
26 procedure initModule; |
26 procedure initModule; |
27 procedure freeModule; |
27 procedure freeModule; |
28 |
28 |
29 implementation |
29 implementation |
30 uses uLandGraphics, uConsts, uUtils, SDLh, uCommands, uDebug; |
30 uses uLandGraphics, uConsts, uVariables, uUtils, SDLh, uCommands, uDebug; |
31 |
31 |
32 type PointRec = packed record |
32 type PointRec = packed record |
33 X, Y: SmallInt; |
33 X, Y: SmallInt; |
34 flags: byte; |
34 flags: byte; |
35 end; |
35 end; |
55 begin |
55 begin |
56 prec:= @s[i]; |
56 prec:= @s[i]; |
57 rec:= prec^; |
57 rec:= prec^; |
58 rec.X:= SDLNet_Read16(@rec.X); |
58 rec.X:= SDLNet_Read16(@rec.X); |
59 rec.Y:= SDLNet_Read16(@rec.Y); |
59 rec.Y:= SDLNet_Read16(@rec.Y); |
|
60 if rec.X < -323 then rec.X:= -323; |
|
61 if rec.X > LAND_WIDTH+323 then rec.X:= LAND_WIDTH+323; |
|
62 if rec.Y < -323 then rec.Y:= -323; |
|
63 if rec.Y > LAND_HEIGHT+323 then rec.Y:= LAND_HEIGHT+323; |
60 |
64 |
61 new(pe); |
65 new(pe); |
62 if pointsListLast = nil then |
66 if pointsListLast = nil then |
63 pointsListHead:= pe |
67 pointsListHead:= pe |
64 else |
68 else |