From cfcfd3e26322d3cd59b366f96454a36634184b68 Mon Sep 17 00:00:00 2001 From: the me Date: Sun, 14 Aug 2022 21:06:41 -0700 Subject: [PATCH] ugokeru --- eastern flames/eastern flames.yyp | 5 ++ .../objects/ARTICULATOR/ARTICULATOR.yy | 1 + .../objects/ARTICULATOR/Create_0.gml | 2 +- .../objects/ARTICULATOR/Draw_72.gml | 15 +++- eastern flames/objects/ARTICULATOR/Step_0.gml | 17 +++++ eastern flames/objects/o_unit/Create_0.gml | 7 +- eastern flames/objects/o_unit/Draw_0.gml | 1 + eastern flames/objects/o_unit/Step_0.gml | 4 +- .../scripts/c_inheritunit/c_inheritunit.gml | 1 + eastern flames/scripts/c_input/c_input.gml | 9 +++ eastern flames/scripts/c_input/c_input.yy | 12 ++++ .../scripts/c_selectunit/c_selectunit.gml | 20 ++++++ .../scripts/c_selectunit/c_selectunit.yy | 12 ++++ .../linear_approach/linear_approach.gml | 6 ++ .../linear_approach/linear_approach.yy | 12 ++++ .../scripts/st_moving/st_moving.gml | 68 +++++++++++++++++++ eastern flames/scripts/st_moving/st_moving.yy | 12 ++++ .../scripts/st_moving/st_standing.yy | 12 ++++ .../scripts/st_standing/st_standing.gml | 5 ++ .../scripts/st_standing/st_standing.yy | 12 ++++ eastern flames/scripts/tiledata/tiledata.gml | 1 + 21 files changed, 227 insertions(+), 7 deletions(-) create mode 100644 eastern flames/objects/ARTICULATOR/Step_0.gml create mode 100644 eastern flames/scripts/c_input/c_input.gml create mode 100644 eastern flames/scripts/c_input/c_input.yy create mode 100644 eastern flames/scripts/c_selectunit/c_selectunit.gml create mode 100644 eastern flames/scripts/c_selectunit/c_selectunit.yy create mode 100644 eastern flames/scripts/linear_approach/linear_approach.gml create mode 100644 eastern flames/scripts/linear_approach/linear_approach.yy create mode 100644 eastern flames/scripts/st_moving/st_moving.gml create mode 100644 eastern flames/scripts/st_moving/st_moving.yy create mode 100644 eastern flames/scripts/st_moving/st_standing.yy create mode 100644 eastern flames/scripts/st_standing/st_standing.gml create mode 100644 eastern flames/scripts/st_standing/st_standing.yy diff --git a/eastern flames/eastern flames.yyp b/eastern flames/eastern flames.yyp index e5677cb..c0581ae 100644 --- a/eastern flames/eastern flames.yyp +++ b/eastern flames/eastern flames.yyp @@ -38,6 +38,7 @@ {"id":{"name":"is_prime","path":"scripts/is_prime/is_prime.yy",},"order":14,}, {"id":{"name":"KROMER_scrip","path":"scripts/KROMER_scrip/KROMER_scrip.yy",},"order":0,}, {"id":{"name":"is_oob","path":"scripts/is_oob/is_oob.yy",},"order":7,}, + {"id":{"name":"linear_approach","path":"scripts/linear_approach/linear_approach.yy",},"order":18,}, {"id":{"name":"array_contains","path":"scripts/array_contains/array_contains.yy",},"order":0,}, {"id":{"name":"song","path":"scripts/song/song.yy",},"order":1,}, {"id":{"name":"cpp","path":"scripts/cpp/cpp.yy",},"order":1,}, @@ -48,7 +49,10 @@ {"id":{"name":"dir2hv","path":"scripts/dir2hv/dir2hv.yy",},"order":2,}, {"id":{"name":"tag","path":"scripts/tag/tag.yy",},"order":6,}, {"id":{"name":"instance_create","path":"scripts/instance_create/instance_create.yy",},"order":6,}, + {"id":{"name":"c_selectunit","path":"scripts/c_selectunit/c_selectunit.yy",},"order":9,}, {"id":{"name":"array_generate_2d","path":"scripts/array_generate_2d/array_generate_2d.yy",},"order":3,}, + {"id":{"name":"c_input","path":"scripts/c_input/c_input.yy",},"order":8,}, + {"id":{"name":"st_standing","path":"scripts/st_standing/st_standing.yy",},"order":6,}, {"id":{"name":"unit","path":"scripts/unit/unit.yy",},"order":2,}, {"id":{"name":"se_play","path":"scripts/se_play/se_play.yy",},"order":5,}, {"id":{"name":"msglang","path":"scripts/msglang/msglang.yy",},"order":15,}, @@ -63,6 +67,7 @@ {"id":{"name":"array_find_index","path":"scripts/array_find_index/array_find_index.yy",},"order":1,}, {"id":{"name":"array_greatest","path":"scripts/array_greatest/array_greatest.yy",},"order":4,}, {"id":{"name":"c_null","path":"scripts/c_null/c_null.yy",},"order":4,}, + {"id":{"name":"st_moving","path":"scripts/st_moving/st_moving.yy",},"order":7,}, {"id":{"name":"Room1","path":"rooms/Room1/Room1.yy",},"order":0,}, ], "Options": [ diff --git a/eastern flames/objects/ARTICULATOR/ARTICULATOR.yy b/eastern flames/objects/ARTICULATOR/ARTICULATOR.yy index f6a069e..20cef4a 100644 --- a/eastern flames/objects/ARTICULATOR/ARTICULATOR.yy +++ b/eastern flames/objects/ARTICULATOR/ARTICULATOR.yy @@ -21,6 +21,7 @@ {"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, {"isDnD":false,"eventNum":72,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, ], "properties": [], "overriddenProperties": [], diff --git a/eastern flames/objects/ARTICULATOR/Create_0.gml b/eastern flames/objects/ARTICULATOR/Create_0.gml index 2148150..4e7cc18 100644 --- a/eastern flames/objects/ARTICULATOR/Create_0.gml +++ b/eastern flames/objects/ARTICULATOR/Create_0.gml @@ -1,2 +1,2 @@ log(un); -c_inheritunit(1, 1, un.chara); \ No newline at end of file +c_inheritunit(2, 2, un.chara); \ No newline at end of file diff --git a/eastern flames/objects/ARTICULATOR/Draw_72.gml b/eastern flames/objects/ARTICULATOR/Draw_72.gml index 65ca27d..8b429a9 100644 --- a/eastern flames/objects/ARTICULATOR/Draw_72.gml +++ b/eastern flames/objects/ARTICULATOR/Draw_72.gml @@ -1,13 +1,24 @@ -draw_set_color(c_white); -var i, j; +var i, j, k; for (i=0; i goal return val-amount; + if val == goal return goal; +} \ No newline at end of file diff --git a/eastern flames/scripts/linear_approach/linear_approach.yy b/eastern flames/scripts/linear_approach/linear_approach.yy new file mode 100644 index 0000000..ad221a7 --- /dev/null +++ b/eastern flames/scripts/linear_approach/linear_approach.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "data", + "path": "folders/Scripts/util/data.yy", + }, + "resourceVersion": "1.0", + "name": "linear_approach", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/eastern flames/scripts/st_moving/st_moving.gml b/eastern flames/scripts/st_moving/st_moving.gml new file mode 100644 index 0000000..93fb1e1 --- /dev/null +++ b/eastern flames/scripts/st_moving/st_moving.gml @@ -0,0 +1,68 @@ +function st_moving() { + var mov = 2 + c_input(); + + hspd = lerp(hspd, (right-left)*.05, .4); + vspd = lerp(vspd, (down-up)*.05, .4); + var remainingmov = mov+1 - ( + abs(x+hspd-16-pos.x*ts.x)/ts.x + + abs(y+vspd-16-pos.y*ts.y)/ts.y + ); + //var shitmode = point_distance(x, y, pos.x*ts.x, pos.y*ts.y); + //if shitmode > mov*ts.x { + x += hspd*ts.x; + y += vspd*ts.y; + while !remainingmov { + hspd = 0; + vspd = 0; + x = linear_approach(x, pos.x*ts.x+16, 1); + y = linear_approach(y, pos.y*ts.y+16, 1); + log(x, pos.x*ts.x); + log(y, pos.y*ts.y); + var remainingmov = mov+1 - ( + abs(x+hspd-16-pos.x*ts.x)/ts.x + + abs(y+vspd-16-pos.y*ts.y)/ts.y + ); + //log("oob, " + string(remainingmov)); + /*} else { + log("not oob!");*/ + + } + prevremainingmov = remainingmov; + /*if x < (pos.x-mov)*ts.x { + x = (pos.x-mov)*ts.x; + } else if x > (pos.x+mov+1)*ts.x { + x = (pos.x+mov+1)*ts.x; + } else { + x += hspd*ts.x; + } + if y < (pos.y-mov)*ts.y { + y = (pos.y-mov)*ts.y; + } else if y > (pos.y+mov+1)*ts.y { + y = (pos.y+mov+1)*ts.y; + } else { + y += vspd*ts.y; + }*/ + +} + +function st_movingdraw() { + /*var mov = 2; + draw_set_color(c_cyan); + draw_set_alpha(.4); + var i, j; + for (i=-mov; i<=mov; i++) { + for (j=-mov; j<=mov; j++) { + if abs(i)+abs(j) <= mov { + draw_rectangle( + (pos.x+i)*ts.x, + (pos.y+j)*ts.y, + (pos.x+i+1)*ts.x, + (pos.y+j+1)*ts.y, false + ); + } + } + } + draw_set_alpha(1);*/ +} +#macro ts global.tilesize \ No newline at end of file diff --git a/eastern flames/scripts/st_moving/st_moving.yy b/eastern flames/scripts/st_moving/st_moving.yy new file mode 100644 index 0000000..e2b7164 --- /dev/null +++ b/eastern flames/scripts/st_moving/st_moving.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Scripts", + "path": "folders/Scripts.yy", + }, + "resourceVersion": "1.0", + "name": "st_moving", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/eastern flames/scripts/st_moving/st_standing.yy b/eastern flames/scripts/st_moving/st_standing.yy new file mode 100644 index 0000000..83006c8 --- /dev/null +++ b/eastern flames/scripts/st_moving/st_standing.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Scripts", + "path": "folders/Scripts.yy", + }, + "resourceVersion": "1.0", + "name": "st_standing", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/eastern flames/scripts/st_standing/st_standing.gml b/eastern flames/scripts/st_standing/st_standing.gml new file mode 100644 index 0000000..ffc02f2 --- /dev/null +++ b/eastern flames/scripts/st_standing/st_standing.gml @@ -0,0 +1,5 @@ +function st_standing() { + x = pos.x*global.tilesize.x+global.tilesize.x/2; + y = pos.y*global.tilesize.y+global.tilesize.y/2; + //log(x, y); +} \ No newline at end of file diff --git a/eastern flames/scripts/st_standing/st_standing.yy b/eastern flames/scripts/st_standing/st_standing.yy new file mode 100644 index 0000000..83006c8 --- /dev/null +++ b/eastern flames/scripts/st_standing/st_standing.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Scripts", + "path": "folders/Scripts.yy", + }, + "resourceVersion": "1.0", + "name": "st_standing", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/eastern flames/scripts/tiledata/tiledata.gml b/eastern flames/scripts/tiledata/tiledata.gml index 1e1b025..57297e9 100644 --- a/eastern flames/scripts/tiledata/tiledata.gml +++ b/eastern flames/scripts/tiledata/tiledata.gml @@ -10,4 +10,5 @@ global.tilesize = new vec2(32, 32); function tiledata(passable_=true) constructor { passable = passable; contents = []; + overlays = []; } \ No newline at end of file