uh oh
This commit is contained in:
commit
f52e476acf
|
@ -3,6 +3,7 @@
|
|||
{"id":{"name":"c_loadstageone","path":"scripts/c_loadstageone/c_loadstageone.yy",},"order":20,},
|
||||
{"id":{"name":"draw_sprite_at","path":"scripts/draw_sprite_at/draw_sprite_at.yy",},"order":8,},
|
||||
{"id":{"name":"c_inheritunit","path":"scripts/c_inheritunit/c_inheritunit.yy",},"order":5,},
|
||||
{"id":{"name":"vertex_format_create_simple","path":"scripts/vertex_format_create_simple/vertex_format_create_simple.yy",},"order":5,},
|
||||
{"id":{"name":"array_sum","path":"scripts/array_sum/array_sum.yy",},"order":7,},
|
||||
{"id":{"name":"c_doenemyai","path":"scripts/c_doenemyai/c_doenemyai.yy",},"order":23,},
|
||||
{"id":{"name":"clampneg","path":"scripts/clampneg/clampneg.yy",},"order":8,},
|
||||
|
@ -31,6 +32,7 @@
|
|||
{"id":{"name":"draw_settings","path":"scripts/draw_settings/draw_settings.yy",},"order":3,},
|
||||
{"id":{"name":"draw_circle_curve","path":"scripts/draw_circle_curve/draw_circle_curve.yy",},"order":2,},
|
||||
{"id":{"name":"s_momijidown","path":"sprites/s_momijidown/s_momijidown.yy",},"order":2,},
|
||||
{"id":{"name":"camera_reset","path":"scripts/camera_reset/camera_reset.yy",},"order":0,},
|
||||
{"id":{"name":"o_unit","path":"objects/o_unit/o_unit.yy",},"order":2,},
|
||||
{"id":{"name":"combat","path":"scripts/combat/combat.yy",},"order":13,},
|
||||
{"id":{"name":"mod_negative","path":"scripts/mod_negative/mod_negative.yy",},"order":11,},
|
||||
|
@ -41,6 +43,7 @@
|
|||
{"id":{"name":"format_time","path":"scripts/format_time/format_time.yy",},"order":12,},
|
||||
{"id":{"name":"o_screenshake","path":"objects/o_screenshake/o_screenshake.yy",},"order":0,},
|
||||
{"id":{"name":"ncm","path":"scripts/ncm/ncm.yy",},"order":14,},
|
||||
{"id":{"name":"Model","path":"scripts/Model/Model.yy",},"order":2,},
|
||||
{"id":{"name":"c_gettile","path":"scripts/c_gettile/c_gettile.yy",},"order":11,},
|
||||
{"id":{"name":"sinmult","path":"scripts/sinmult/sinmult.yy",},"order":16,},
|
||||
{"id":{"name":"munction","path":"scripts/munction/munction.yy",},"order":12,},
|
||||
|
@ -53,6 +56,7 @@
|
|||
{"id":{"name":"linear_approach","path":"scripts/linear_approach/linear_approach.yy",},"order":18,},
|
||||
{"id":{"name":"s_momijiup","path":"sprites/s_momijiup/s_momijiup.yy",},"order":1,},
|
||||
{"id":{"name":"array_contains","path":"scripts/array_contains/array_contains.yy",},"order":0,},
|
||||
{"id":{"name":"model_transform","path":"scripts/model_transform/model_transform.yy",},"order":4,},
|
||||
{"id":{"name":"song","path":"scripts/song/song.yy",},"order":1,},
|
||||
{"id":{"name":"cpp","path":"scripts/cpp/cpp.yy",},"order":1,},
|
||||
{"id":{"name":"log","path":"scripts/log/log.yy",},"order":10,},
|
||||
|
@ -77,7 +81,9 @@
|
|||
{"id":{"name":"se_play","path":"scripts/se_play/se_play.yy",},"order":5,},
|
||||
{"id":{"name":"msglang","path":"scripts/msglang/msglang.yy",},"order":15,},
|
||||
{"id":{"name":"array_front","path":"scripts/array_front/array_front.yy",},"order":2,},
|
||||
{"id":{"name":"model_load","path":"scripts/model_load/model_load.yy",},"order":3,},
|
||||
{"id":{"name":"with_array","path":"scripts/with_array/with_array.yy",},"order":17,},
|
||||
{"id":{"name":"matrux_transpose","path":"scripts/matrux_transpose/matrux_transpose.yy",},"order":1,},
|
||||
{"id":{"name":"point_me","path":"scripts/point_me/point_me.yy",},"order":15,},
|
||||
{"id":{"name":"draw_hitbox","path":"scripts/draw_hitbox/draw_hitbox.yy",},"order":4,},
|
||||
{"id":{"name":"ARTICULATOR","path":"objects/ARTICULATOR/ARTICULATOR.yy",},"order":0,},
|
||||
|
@ -130,7 +136,11 @@
|
|||
{"folderPath":"folders/Scripts/util/drawing/vlambeer.yy","order":1,"resourceVersion":"1.0","name":"vlambeer","tags":[],"resourceType":"GMFolder",},
|
||||
{"folderPath":"folders/Scripts/util.yy","order":1,"resourceVersion":"1.0","name":"util","tags":[],"resourceType":"GMFolder",},
|
||||
{"folderPath":"folders/Sprites/momiji.yy","order":2,"resourceVersion":"1.0","name":"momiji","tags":[],"resourceType":"GMFolder",},
|
||||
<<<<<<< HEAD
|
||||
{"folderPath":"folders/Sprites/wabbit.yy","order":3,"resourceVersion":"1.0","name":"wabbit","tags":[],"resourceType":"GMFolder",},
|
||||
=======
|
||||
{"folderPath":"folders/Scripts/3d.yy","order":19,"resourceVersion":"1.0","name":"3d","tags":[],"resourceType":"GMFolder",},
|
||||
>>>>>>> a9003c47cacfdee8c6ba2588fdb26b55ad87617b
|
||||
],
|
||||
"AudioGroups": [
|
||||
{"targets":-1,"resourceVersion":"1.3","name":"audiogroup_default","resourceType":"GMAudioGroup",},
|
||||
|
@ -139,12 +149,17 @@
|
|||
{"isScaled":true,"autocrop":true,"border":2,"mipsToGenerate":0,"groupParent":null,"targets":-1,"resourceVersion":"1.3","name":"Default","resourceType":"GMTextureGroup",},
|
||||
],
|
||||
"IncludedFiles": [
|
||||
<<<<<<< HEAD
|
||||
{"CopyToMask":-1,"filePath":"datafiles/Test Map","resourceVersion":"1.0","name":"GBA Test.dat","resourceType":"GMIncludedFile",},
|
||||
{"CopyToMask":-1,"filePath":"datafiles/Test Map","resourceVersion":"1.0","name":"GBA Test.size","resourceType":"GMIncludedFile",},
|
||||
{"CopyToMask":-1,"filePath":"datafiles/Test Map","resourceVersion":"1.0","name":"grass.png","resourceType":"GMIncludedFile",},
|
||||
{"CopyToMask":-1,"filePath":"datafiles/Test Map","resourceVersion":"1.0","name":"koakuma.png","resourceType":"GMIncludedFile",},
|
||||
{"CopyToMask":-1,"filePath":"datafiles","resourceVersion":"1.0","name":"shrine thing tex.png","resourceType":"GMIncludedFile",},
|
||||
{"CopyToMask":-1,"filePath":"datafiles","resourceVersion":"1.0","name":"shrine thing.dat","resourceType":"GMIncludedFile",},
|
||||
=======
|
||||
{"CopyToMask":-1,"filePath":"datafiles","resourceVersion":"1.0","name":"shrine thing.dat","resourceType":"GMIncludedFile",},
|
||||
{"CopyToMask":-1,"filePath":"datafiles","resourceVersion":"1.0","name":"shrine thing tex.png","resourceType":"GMIncludedFile",},
|
||||
>>>>>>> a9003c47cacfdee8c6ba2588fdb26b55ad87617b
|
||||
],
|
||||
"MetaData": {
|
||||
"IDEVersion": "2.3.3.574",
|
||||
|
|
|
@ -23,8 +23,12 @@ function getProj(){
|
|||
function getView(){
|
||||
var _x = global.camerax;
|
||||
var _y = global.cameray;
|
||||
<<<<<<< HEAD
|
||||
var half = (7.5*32)+40;
|
||||
return matrix_build_lookat(_x,_y+180,150,_x,_y,0,0,0,-1);
|
||||
=======
|
||||
return matrix_build_lookat(_x,_y+100,100,_x,_y,0,0,0,-1);
|
||||
>>>>>>> a9003c47cacfdee8c6ba2588fdb26b55ad87617b
|
||||
}
|
||||
|
||||
function setCam(){
|
||||
|
@ -33,4 +37,22 @@ function setCam(){
|
|||
camera_set_view_mat(cam,getView())
|
||||
camera_apply(cam);
|
||||
}
|
||||
global.turn = ARMY.US;
|
||||
<<<<<<< HEAD
|
||||
global.turn = ARMY.US;
|
||||
=======
|
||||
|
||||
function drawModels(){
|
||||
gpu_set_cullmode(cull_counterclockwise);
|
||||
gpu_set_ztestenable(true);
|
||||
for(var i = 0; i < array_length(models);i++){
|
||||
models[i].draw();
|
||||
}
|
||||
gpu_set_cullmode(cull_noculling);
|
||||
gpu_set_ztestenable(false);
|
||||
}
|
||||
|
||||
models = [];
|
||||
|
||||
var spr = sprite_add("./shrine thing tex.png",0,false,false,0,0);
|
||||
nu Model("./shrine thing.dat",spr);
|
||||
>>>>>>> a9003c47cacfdee8c6ba2588fdb26b55ad87617b
|
||||
|
|
|
@ -44,4 +44,6 @@ for (i=0; i<array_length(global.map); i++) {
|
|||
//matrix_get(matrix_
|
||||
|
||||
var a = c_2dto3d(mouse_x,mouse_y);
|
||||
draw_circle(a.x,a.y,2,false);
|
||||
draw_circle(a.x,a.y,2,false);
|
||||
|
||||
drawModels();
|
|
@ -0,0 +1,70 @@
|
|||
// Script assets have changed for v2.3.0 see
|
||||
// https://help.yoyogames.com/hc/en-us/articles/360005277377 for more information
|
||||
function Model(filePath, texture, vformat = vertex_format_create_simple(true,true,true,false), _x = 0, _y = 0, _z = 0, _scale = 1,_xrot = 0, _yrot = 0, _zrot = 0,loopdist=0) constructor{
|
||||
vertexBuffer = model_load(filePath,vformat);
|
||||
//texture = s_mistake;
|
||||
try{
|
||||
vertex_freeze(vertexBuffer)
|
||||
}
|
||||
catch(e){
|
||||
//log(e);
|
||||
//log("this error is probably fine, its caused by trying to freeze an already frozen vertex buffer, but gamemaker has no way to check if a buffer is already frozen...");
|
||||
}
|
||||
//vertex
|
||||
tex = sprite_get_texture(texture,0);
|
||||
//log(self);
|
||||
//log(vertexBuffer);
|
||||
x = _x;
|
||||
y = _y;
|
||||
z = _z;
|
||||
xrot = _xrot;
|
||||
zrot = _zrot;
|
||||
yrot = _yrot;
|
||||
scale = _scale;
|
||||
//bpy.context.scene.cursor.location
|
||||
width = 0;
|
||||
height = 0 ;
|
||||
array_push(ARTICULATOR.models,self);
|
||||
draw = function() {
|
||||
//var camera = camera_get_active();
|
||||
//var cammat = camera_get_view_mat(camera);
|
||||
//camera_set_view_mat(camera,matrix_build_lookat(global.camerax-x,global.cameray-y,global.cameraz-z,global.camerax +cos(o_3dmanager.mousex/100),global.cameray +sin(o_3dmanager.mousex/100),global.cameraz+sin(o_3dmanager.mousey/100),0,0,1));
|
||||
//shader_set(z_tile3d);
|
||||
//if(shader_current() != z_translate) {
|
||||
// shader_reset();
|
||||
// shader_set(z_translate);
|
||||
//}
|
||||
//shader_set_uniform_f(shader_get_uniform(z_translate,"movement"),x,y,z);
|
||||
//shader_set(z_differentnormal)
|
||||
matrix_set(matrix_world,matrix_build(x,y,z,xrot,yrot,zrot,scale,scale,scale ))
|
||||
|
||||
vertex_submit(vertexBuffer,pr_trianglelist,tex);
|
||||
//shader_reset();
|
||||
//shader_reset();
|
||||
//shader_reset();
|
||||
//log(buffer_read(vertexBuffer,buffer_vbuffer));
|
||||
//camera_set_view_mat(camera,cammat);
|
||||
//matrix_set(matrix_world,)
|
||||
}
|
||||
destroy = function() {
|
||||
throw "idiot";
|
||||
}
|
||||
}
|
||||
|
||||
global.cache = {
|
||||
load: function(name,vformat){
|
||||
if(ds_map_exists(theCache,name)){
|
||||
return theCache[?name];
|
||||
}
|
||||
else{
|
||||
var buff = buffer_load(name);
|
||||
var vbuff = vertex_create_buffer_from_buffer(buff, vformat);
|
||||
theCache[?name] = vbuff;
|
||||
return theCache[?name];
|
||||
}
|
||||
},
|
||||
clear: function(){
|
||||
ds_map_clear(theCache);
|
||||
},
|
||||
theCache: ds_map_create(),
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "3d",
|
||||
"path": "folders/Scripts/3d.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "Model",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
// Script assets have changed for v2.3.0 see
|
||||
// https://help.yoyogames.com/hc/en-us/articles/360005277377 for more information
|
||||
function camera_reset(){
|
||||
var camera = camera_get_active();
|
||||
camera_set_view_mat(camera,global.vmat);
|
||||
camera_set_proj_mat(camera,matrix_multiply(global.projmat,matrix_build(0,0,0,0,0,0,1,-1,1)));
|
||||
camera_apply(camera);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "3d",
|
||||
"path": "folders/Scripts/3d.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "camera_reset",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
/// Function: matrix_transpose()
|
||||
function matrix_transpose(){
|
||||
var _m0 = argument0;
|
||||
var _m1 = argument0;
|
||||
for (var _i = 0; _i < 3; _i++) {
|
||||
for (var _j = 0; _j < 3; _j++) {
|
||||
_m1[_j*4+_i] = _m0[_i*4+_j];
|
||||
}
|
||||
}
|
||||
return _m1;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "3d",
|
||||
"path": "folders/Scripts/3d.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "matrux_transpose",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
///model_load(filepath, vformat)
|
||||
/// @func model_load(filepath, vformat)
|
||||
/// @desc Loads a mobel in via buffer. Returns -1 if the file isn't found, otherwise returns a vertex buffer ID
|
||||
/// @arg filepath
|
||||
/// @arg vformat
|
||||
/// @return -1 on fail or a vbuffer ID
|
||||
|
||||
function model_load(filepath,vformat){
|
||||
|
||||
if(!file_exists(filepath))
|
||||
{
|
||||
show_debug_message("File not Found: " + string(filepath));
|
||||
return -1;
|
||||
}
|
||||
//var buff = buffer_load(filepath);
|
||||
|
||||
//var vbuff = vertex_create_buffer_from_buffer(buff, vformat);
|
||||
|
||||
var vbuff = global.cache.load(filepath,vformat);
|
||||
//buffer_delete(buff);
|
||||
return vbuff;
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "3d",
|
||||
"path": "folders/Scripts/3d.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "model_load",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
// Script assets have changed for v2.3.0 see
|
||||
// https://help.yoyogames.com/hc/en-us/articles/360005277377 for more information
|
||||
|
||||
//like move models around or some shit lol
|
||||
function model_transform(){
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "3d",
|
||||
"path": "folders/Scripts/3d.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "model_transform",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
///vertex_format_create_simple(hasNormal, hasColour, hasTexcoord, *hasTangentData)
|
||||
///@func vertex_format_create_simple(hasNormal, hasColour, hasTexcoord)
|
||||
///@desc Creates and returns a simple vertex format including Position3D as well as the others specified in the arguments. Useful when used with my Blender Export.
|
||||
///@arg hasNormal
|
||||
///@arg hasColour
|
||||
///@arg hasTexcoord
|
||||
///@return Vertex Format ID
|
||||
function vertex_format_create_simple(hasNormal = true,hasColor = true,hasTexcoord = true, hasTangentData = false){
|
||||
vertex_format_begin();
|
||||
vertex_format_add_position_3d();
|
||||
if(argument_count > 0 && argument[0]){
|
||||
vertex_format_add_normal();
|
||||
}
|
||||
if(argument_count > 1 && argument[1]){
|
||||
vertex_format_add_color();
|
||||
}
|
||||
if(argument_count > 2 && argument[2]){
|
||||
vertex_format_add_texcoord();
|
||||
}
|
||||
if(argument_count > 3 && argument[3]){
|
||||
vertex_format_add_custom(vertex_type_float3, vertex_usage_texcoord);
|
||||
vertex_format_add_custom(vertex_type_float3, vertex_usage_texcoord);
|
||||
}
|
||||
|
||||
return vertex_format_end();
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "3d",
|
||||
"path": "folders/Scripts/3d.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "vertex_format_create_simple",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
Loading…
Reference in New Issue