Compare commits

..

No commits in common. "a9003c47cacfdee8c6ba2588fdb26b55ad87617b" and "23c7ce250359177378d5953924632ce4a896d772" have entirely different histories.

15 changed files with 4 additions and 248 deletions

View File

@ -2,7 +2,6 @@
"resources": [
{"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":"clampneg","path":"scripts/clampneg/clampneg.yy",},"order":8,},
{"id":{"name":"array_remove","path":"scripts/array_remove/array_remove.yy",},"order":6,},
@ -27,7 +26,6 @@
{"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,},
@ -38,7 +36,6 @@
{"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,},
@ -51,7 +48,6 @@
{"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,},
@ -74,9 +70,7 @@
{"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,},
@ -126,7 +120,6 @@
{"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",},
{"folderPath":"folders/Scripts/3d.yy","order":19,"resourceVersion":"1.0","name":"3d","tags":[],"resourceType":"GMFolder",},
],
"AudioGroups": [
{"targets":-1,"resourceVersion":"1.3","name":"audiogroup_default","resourceType":"GMAudioGroup",},
@ -134,10 +127,7 @@
"TextureGroups": [
{"isScaled":true,"autocrop":true,"border":2,"mipsToGenerate":0,"groupParent":null,"targets":-1,"resourceVersion":"1.3","name":"Default","resourceType":"GMTextureGroup",},
],
"IncludedFiles": [
{"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",},
],
"IncludedFiles": [],
"MetaData": {
"IDEVersion": "2.3.3.574",
},

View File

@ -24,6 +24,7 @@ function getProj(){
function getView(){
var _x = global.camerax;
var _y = global.cameray;
var half = (7.5*32)+40;
return matrix_build_lookat(_x,_y+100,100,_x,_y,0,0,0,-1);
}
@ -33,18 +34,3 @@ function setCam(){
camera_set_view_mat(cam,getView())
camera_apply(cam);
}
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);

View File

@ -43,5 +43,3 @@ for (i=0; i<array_length(global.map); i++) {
var a = c_2dto3d(mouse_x,mouse_y);
draw_circle(a.x,a.y,2,false);
drawModels();

View File

@ -1,70 +0,0 @@
// 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(),
}

View File

@ -1,12 +0,0 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "3d",
"path": "folders/Scripts/3d.yy",
},
"resourceVersion": "1.0",
"name": "Model",
"tags": [],
"resourceType": "GMScript",
}

View File

@ -1,8 +0,0 @@
// 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);
}

View File

@ -1,12 +0,0 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "3d",
"path": "folders/Scripts/3d.yy",
},
"resourceVersion": "1.0",
"name": "camera_reset",
"tags": [],
"resourceType": "GMScript",
}

View File

@ -1,12 +0,0 @@
/// 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;
}

View File

@ -1,12 +0,0 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "3d",
"path": "folders/Scripts/3d.yy",
},
"resourceVersion": "1.0",
"name": "matrux_transpose",
"tags": [],
"resourceType": "GMScript",
}

View File

@ -1,23 +0,0 @@
///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;
}

View File

@ -1,12 +0,0 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "3d",
"path": "folders/Scripts/3d.yy",
},
"resourceVersion": "1.0",
"name": "model_load",
"tags": [],
"resourceType": "GMScript",
}

View File

@ -1,7 +0,0 @@
// 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(){
}

View File

@ -1,12 +0,0 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "3d",
"path": "folders/Scripts/3d.yy",
},
"resourceVersion": "1.0",
"name": "model_transform",
"tags": [],
"resourceType": "GMScript",
}

View File

@ -1,26 +0,0 @@
///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();
}

View File

@ -1,12 +0,0 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "3d",
"path": "folders/Scripts/3d.yy",
},
"resourceVersion": "1.0",
"name": "vertex_format_create_simple",
"tags": [],
"resourceType": "GMScript",
}