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

62 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2022-08-23 09:43:11 +00:00
2022-08-18 20:47:07 +00:00
//c_addunit(un.chara, ARMY.US);
//c_addunit(un.kris, ARMY.THEM);
2022-08-15 17:51:51 +00:00
var i;
2022-08-16 02:04:23 +00:00
/*for (i=0; i<array_length(global.units[ARMY.US]); i++) {
2022-08-15 17:51:51 +00:00
c_inheritunit(2+i, 2, un.chara);
2022-08-16 02:04:23 +00:00
}*/
2022-08-18 20:47:07 +00:00
2022-08-23 13:06:02 +00:00
x -= 150;
2022-08-18 20:47:07 +00:00
c_loadstageone();
2022-08-23 08:34:45 +00:00
waiting = 0;
2022-08-16 22:28:01 +00:00
selectedunit = noone;
2022-08-16 22:39:22 +00:00
hoveredunit = noone;
2022-08-17 16:49:45 +00:00
hspd = 0;
vspd = 0;
2022-08-16 22:28:01 +00:00
global.gw = 640;
2022-08-17 06:45:08 +00:00
global.gh = 360;
global.camerax = 0;
global.cameray = 0;
2022-08-19 17:19:08 +00:00
state = st_control;
2022-08-19 22:06:05 +00:00
cursor = new vec2(0, 0);
2022-08-17 06:45:08 +00:00
//these are functions bc c_2dto3d uses them
function getProj(){
return matrix_build_projection_perspective_fov(60,-16/9,1,4000)
}
function getView(){
var _x = global.camerax;
var _y = global.cameray;
var half = (7.5*32)+40;
return matrix_build_lookat(_x,_y+60,90,_x,_y,0,0,0,-1);
2022-08-17 06:45:08 +00:00
}
function setCam(){
var cam = camera_get_active();
camera_set_proj_mat(cam,getProj());
camera_set_view_mat(cam,getView())
camera_apply(cam);
2022-08-18 20:47:07 +00:00
}
2022-08-19 01:06:30 +00:00
global.turn = ARMY.US;
2022-08-19 01:03:51 +00:00
function drawModels(){
2022-08-19 07:39:16 +00:00
//gpu_set_cullmode(cull_counterclockwise);
2022-08-19 01:03:51 +00:00
gpu_set_ztestenable(true);
2022-08-19 07:39:16 +00:00
gpu_set_alphatestenable(true);
gpu_set_alphatestref(128);
2022-08-19 01:03:51 +00:00
for(var i = 0; i < array_length(models);i++){
models[i].draw();
}
2022-08-19 07:39:16 +00:00
gpu_set_alphatestenable(false);
2022-08-19 01:03:51 +00:00
gpu_set_cullmode(cull_noculling);
gpu_set_ztestenable(false);
}
models = [];
2022-08-19 01:47:44 +00:00
//var spr = sprite_add("./shrine thing tex.png",0,false,false,0,0);
2022-08-19 17:19:08 +00:00
2022-08-23 09:43:11 +00:00
textbox_create(txt_intro);
2022-08-19 07:26:53 +00:00
var spr = sprite_add("./map1/mapatlas.png",0,false,false,0,0);
nu Model("./map1/map1.dat", spr, u, 200, 140, u, 4, u, u, u,);
2022-08-19 22:06:05 +00:00
setCam();