-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdrawMap.m
More file actions
24 lines (18 loc) · 732 Bytes
/
drawMap.m
File metadata and controls
24 lines (18 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function image = drawMap
global gameWindow gameMap tileSize scale;
% ghost house door
%rectColor = [1 0.7216 0.8706]; %[255 184 222] / 255.0;
if gameMap.ghostHouseTile.x>=0
Screen('FillRect', gameWindow, [1 0.7216 0.8706], [(gameMap.ghostHouseTile.x-1)*tileSize ...
gameMap.ghostHouseTile.y*tileSize-2*scale (gameMap.ghostHouseTile.x+1)*tileSize ...
gameMap.ghostHouseTile.y*tileSize]);
end
fillStyle = gameMap.wallFillColor;
strokeStyle = gameMap.wallStrokeColor;
for i=1:length(gameMap.walls)
Screen('FillPoly', gameWindow, fillStyle, gameMap.walls{i}, 0);
Screen('FramePoly', gameWindow, strokeStyle, gameMap.walls{i});
end
Screen('Flip', gameWindow);
image = Screen('GetImage', gameWindow);
end