I get the strangest error when I try running my project with this code in it. Thing is this code works in another project, it should be code independant. What am I not seeing?
[pascal]procedure DrawTile(GameScreen: PSDL_Surface; X, Y, TileIndex, TileSize: Integer; TileSet: PSDL_Surface);
var
SrcRect, DestRect: TSDL_Rect;
begin
SrcRect := SDLRect(TileIndex * TileSize, 0, TileSize, TileSize);
DestRect := SDLRect(X, Y, TileSize, TileSize);
if ((X < GameScreen.w) or (X > -TileSize)) and ((Y < GameScreen.h) or (Y > -TileSize)) then
SDL_BlitSurface(TileSet, @SrcRect, GameScreen, @DestRect);
end;[/pascal]
w and h are the Width and Height of the game screen.
Here are the error messages I'm getting:
oh FYI...Originally Posted by Messages
[pascal]if ((X < GameScreen.w) or (X > -TileSize)) and ((Y < GameScreen.h) or (Y > -TileSize)) then[/pascal] is line 359.
Bookmarks