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

69 lines
1.9 KiB
Plaintext
Raw Normal View History

2022-08-17 06:45:08 +00:00
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);
2022-08-19 04:48:16 +00:00
drawModels();
2022-08-19 22:06:21 +00:00
matrix_set(matrix_world,matrix_build_identity())
//setCam();
2022-08-15 04:06:41 +00:00
var i, j, k;
2022-08-15 02:35:57 +00:00
for (i=0; i<array_length(global.map); i++) {
for (j=0; j<array_length(global.map[i]); j++) {
2022-08-19 04:48:16 +00:00
/*draw_set_color(c_white);
2022-08-15 02:35:57 +00:00
draw_rectangle(
i*global.tilesize.x,
j*global.tilesize.y,
(i+1)*global.tilesize.x,
(j+1)*global.tilesize.y, false
2022-08-19 04:48:16 +00:00
);*/
2022-08-15 04:06:41 +00:00
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);
}
2022-08-15 02:35:57 +00:00
}
}
draw_set_color(c_black);
2022-08-17 06:45:08 +00:00
2022-08-15 02:35:57 +00:00
var i, j;
2022-08-19 22:06:21 +00:00
draw_set_alpha(.1);
2022-08-15 02:35:57 +00:00
for (i=0; i<array_length(global.map); i++) {
for (j=0; j<array_length(global.map[i]); j++) {
2022-08-19 22:06:21 +00:00
if !global.map[i][j].passable continue;
2022-08-15 02:35:57 +00:00
draw_rectangle(
i*global.tilesize.x,
j*global.tilesize.y,
(i+1)*global.tilesize.x-1,
(j+1)*global.tilesize.y-1, true
);
}
2022-08-17 06:45:08 +00:00
}
2022-08-19 22:06:21 +00:00
draw_set_alpha(1);
2022-08-17 06:45:08 +00:00
//matrix_get(matrix_
2022-08-19 22:06:21 +00:00
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);
2022-08-19 22:06:21 +00:00
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);
2022-08-19 22:06:21 +00:00
matrix_set(matrix_world,worldMat);