49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
|
|
var cam = camera_get_active();
|
|
global.projMat = camera_get_proj_mat(cam);
|
|
global.viewMat = camera_get_view_mat(cam);
|
|
setCam();
|
|
draw_set_color(c_black);
|
|
draw_rectangle(-9999, -9999, 9999, 9999, false);
|
|
var i, j, k;
|
|
for (i=0; i<array_length(global.map); i++) {
|
|
for (j=0; j<array_length(global.map[i]); j++) {
|
|
draw_set_color(c_white);
|
|
draw_rectangle(
|
|
i*global.tilesize.x,
|
|
j*global.tilesize.y,
|
|
(i+1)*global.tilesize.x,
|
|
(j+1)*global.tilesize.y, false
|
|
);
|
|
for (k=0; k<array_length(global.map[i][j].overlays); k++) {
|
|
draw_set_color(global.map[i][j].overlays[k]);
|
|
draw_set_alpha(.4);
|
|
draw_rectangle(
|
|
i*global.tilesize.x,
|
|
j*global.tilesize.y,
|
|
(i+1)*global.tilesize.x,
|
|
(j+1)*global.tilesize.y, false
|
|
);
|
|
draw_set_alpha(1);
|
|
}
|
|
}
|
|
}
|
|
draw_set_color(c_black);
|
|
|
|
var i, j;
|
|
for (i=0; i<array_length(global.map); i++) {
|
|
for (j=0; j<array_length(global.map[i]); j++) {
|
|
draw_rectangle(
|
|
i*global.tilesize.x,
|
|
j*global.tilesize.y,
|
|
(i+1)*global.tilesize.x-1,
|
|
(j+1)*global.tilesize.y-1, true
|
|
);
|
|
}
|
|
}
|
|
//matrix_get(matrix_
|
|
|
|
var a = c_2dto3d(mouse_x,mouse_y);
|
|
draw_circle(a.x,a.y,2,false);
|
|
|
|
drawModels(); |