Skip to content

Commit 0b91a46

Browse files
committed
blin demo, bug fixes
1 parent 12a77fa commit 0b91a46

File tree

14 files changed

+67
-42
lines changed

14 files changed

+67
-42
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
surf_circle = surface_create(256, 256);
22
surf_curved = surface_create(256, 256);
33

4-
percentage = new DynamicValue(1, -0.01, 0, 1, DVLimitMode.CLAMP);
5-
alpha = new DynamicValue(1, -0.001, 0.25, 1, DVLimitMode.CLAMP);
4+
percentage = new DynamicValue(1, -0.01, 0, 1, DVLimitMode.CLAMP, false);
5+
alpha = new DynamicValue(1, -0.001, 0.25, 1, DVLimitMode.CLAMP, false);

current-scripts/Demos/useful-scripts/objects/obj_drawing_demo/obj_drawing_demo.yy

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

current-scripts/Demos/useful-scripts/objects/obj_easing_tester/Create_0.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ reset_graph = function() {
1111
surf = surface_create(surf_width, surf_height);
1212
reset_graph();
1313

14-
t = new DynamicValue(0, 1, 0, surf_width, DVLimitMode.CEILING);
14+
t = new DynamicValue(0, 1, 0, surf_width, DVLimitMode.CEILING, false);
1515
ev = 0;
1616
easing_func_id = asset_get_index(easing_func);

current-scripts/Demos/useful-scripts/objects/obj_easing_tester/obj_easing_tester.yy

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

current-scripts/Demos/useful-scripts/objects/obj_laser_demo/Create_0.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
reflector_angle = new DynamicValue(0, 0.1, 0, 360, DVLimitMode.WRAP);
1+
reflector_angle = new DynamicValue(0, 0.1, 0, 360, DVLimitMode.WRAP, false);
22
reflector = new LineSegment(0, 0, 0, 0);
33
reflector.a.x = x + dcos(reflector_angle.v) * reflector_half_length;
44
reflector.a.y = y - dsin(reflector_angle.v) * reflector_half_length;

current-scripts/Demos/useful-scripts/objects/obj_laser_demo/obj_laser_demo.yy

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ds_grid_destroy(blin_values);

current-scripts/Demos/useful-scripts/objects/obj_math_demo/Create_0.gml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,26 @@ vec_B = new Vector2(-1, 2);
33
vec_C = new Vector3(-2, 3, 4);
44
vec_D = new Vector3(10, -5, 7);
55

6-
pulse_counter = new DynamicValue(0, 0.01, 0, 1, DVLimitMode.WRAP);
6+
pulse_counter = new DynamicValue(0, 0.01, 0, 1, DVLimitMode.WRAP, false);
77
pulse_t = 0;
88

9-
wrap_counter = new DynamicValue(-10, 0.01, -10, 10, DVLimitMode.WRAP);
10-
wrapped_value = 0;
9+
wrap_counter = new DynamicValue(-10, 0.01, -10, 10, DVLimitMode.WRAP, false);
10+
wrapped_value = 0;
11+
12+
blin_values = ds_grid_create(5, 5);
13+
blin_values[# 0, 0] = -10;
14+
blin_values[# 0, 4] = 50;
15+
blin_values[# 4, 0] = 25;
16+
blin_values[# 4, 4] = 100;
17+
18+
for (var i=0; i<5; i++) {
19+
for (var j=0; j<5; j++) {
20+
blin_values[# i, j] = blin(
21+
blin_values[# 0, 0],
22+
blin_values[# 4, 0],
23+
blin_values[# 0, 4],
24+
blin_values[# 4, 4],
25+
i/4, j/4
26+
);
27+
}
28+
}

current-scripts/Demos/useful-scripts/objects/obj_math_demo/Draw_0.gml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ draw_sprite_ext(spr_meter, 0, 16, 288, 0.25, 0.25, 0, c_gray, 1);
1616
draw_sprite_ext(spr_meter, 0, 16, 288, 0.25, 0.25, 0, $80FFFF, pulse_t);
1717

1818
draw_text(640, 256, "Wrap");
19+
draw_text(640, 336, "Blin");
1920

2021
draw_set_font(fnt_demo);
2122
// Vectors
@@ -41,4 +42,11 @@ draw_text(176, 288, "p(t): " + string(pulse_t));
4142

4243
// Wrap
4344
draw_text(640, 288, "t: " + string(wrap_counter.v));
44-
draw_text(720, 288, "w(t): " + string(wrapped_value));
45+
draw_text(720, 288, "w(t): " + string(wrapped_value));
46+
47+
// Blin
48+
for (var i=0; i<5; i++) {
49+
for (var j=0; j<5; j++) {
50+
draw_text(640 + i*64, 368 + j*32, string(blin_values[# i, j]));
51+
}
52+
}

current-scripts/Demos/useful-scripts/objects/obj_math_demo/obj_math_demo.yy

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)