eastern-flames/eastern flames/objects/ARTICULATOR/Draw_72.gml

69 lines
1.9 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);
drawModels();
matrix_set(matrix_world,matrix_build_identity())
//setCam();
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;
draw_set_alpha(.1);
for (i=0; i<array_length(global.map); i++) {
for (j=0; j<array_length(global.map[i]); j++) {
if !global.map[i][j].passable continue;
draw_rectangle(
i*global.tilesize.x,
j*global.tilesize.y,
(i+1)*global.tilesize.x-1,
(j+1)*global.tilesize.y-1, true
);
}
}
draw_set_alpha(1);
//matrix_get(matrix_
var a = c_2dto3d(cursor.x,cursor.y);
//draw_circle(a.x,a.y,2,false);
draw_sprite_ext(s_cursorup, 0, a.x, a.y, ts.x/20, ts.y/20, 0, c_white, 1);
var worldMat = matrix_get(matrix_world);
var worldMat2 = matrix_build(a.x,a.y-ts.y/2,0,90,0,0,1,1,1);
matrix_set(matrix_world,worldMat2);
draw_sprite(s_cursor, 0, -ts.x/2, 0);
var worldMat2 = matrix_build(a.x,a.y-ts.y/2,0,90,0,0,1,1,1);
matrix_set(matrix_world,worldMat2);
draw_sprite(s_cursor, 0, ts.x/2-1, 0);
var worldMat2 = matrix_build(a.x,a.y+ts.y/2,0,90,0,0,1,1,1);
matrix_set(matrix_world,worldMat2);
draw_sprite(s_cursor, 0, -ts.x/2, 0);
var worldMat2 = matrix_build(a.x,a.y+ts.y/2,0,90,0,0,1,1,1);
matrix_set(matrix_world,worldMat2);
draw_sprite(s_cursor, 0, ts.x/2-1, 0);
matrix_set(matrix_world,worldMat);