Skip to content

Commit 9bb55f7

Browse files
authored
Merge pull request #9 from mstop4/housekeeping
Housekeeping
2 parents 12a77fa + 7b24a06 commit 9bb55f7

File tree

26 files changed

+226
-63
lines changed

26 files changed

+226
-63
lines changed

current-scripts/Demos/useful-scripts/objects/obj_column_menu/Step_1.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ if (!enabled) exit;
99
control_state.poll_input();
1010

1111
if (control_state.pressed_state[MENU_CONTROLS.UP]) {
12-
pos = wrap(pos-1, 0, num_items-1);
12+
pos = wrap(pos-1, 0, num_items);
1313
audio_play_sound(cursor_move_sfx, 1, false);
1414
}
1515

1616
if (control_state.pressed_state[MENU_CONTROLS.DOWN]) {
17-
pos = wrap(pos+1, 0, num_items-1);
17+
pos = wrap(pos+1, 0, num_items);
1818
audio_play_sound(cursor_move_sfx, 1, false);
1919
}
2020

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
randomise();
2+
test_array = [1, -3, "foo", { n: "bar" }, [0, 2.333]];
3+
choice = choose_from_array(test_array);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
draw_set_font(fnt_title);
2+
draw_set_halign(fa_center);
3+
draw_set_colour(c_white);
4+
draw_text(room_width/2, 16, "Data Structures Demo");
5+
6+
draw_set_halign(fa_left);
7+
draw_text(16, 64, "Choose From Array");
8+
9+
draw_set_font(fnt_demo);
10+
11+
// Choose From Array
12+
draw_text(16, 96, "Original Array: " + string(test_array));
13+
draw_text(16, 128, "Random Choice: " + string(choice));

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

Lines changed: 34 additions & 0 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_demo_title/Create_0.gml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
rooms = [
22
room_control_manager_demo,
3+
room_data_structures_demo,
34
room_drawing_demo,
45
room_dta_demo,
56
room_easing_demo,
@@ -15,6 +16,7 @@ num_rooms = array_length(rooms);
1516

1617
room_names = [
1718
"Control Manager",
19+
"Data Structures",
1820
"Drawing",
1921
"Delta Time Alarm",
2022
"Easings",
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_grid_menu/Step_1.gml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if (control_state.pressed_state[MENU_CONTROLS.UP]) {
1414
var _item = -1;
1515

1616
do {
17-
pos.y = wrap(pos.y-1, 0, ds_grid_height(items)-1);
17+
pos.y = wrap(pos.y-1, 0, ds_grid_height(items));
1818
_item = items[# pos.x, pos.y];
1919
} until (is_struct(_item) || _cur_pos == pos.y)
2020

@@ -26,7 +26,7 @@ if (control_state.pressed_state[MENU_CONTROLS.DOWN]) {
2626
var _item = -1;
2727

2828
do {
29-
pos.y = wrap(pos.y+1, 0, ds_grid_height(items)-1);
29+
pos.y = wrap(pos.y+1, 0, ds_grid_height(items));
3030
_item = items[# pos.x, pos.y];
3131
} until (is_struct(_item) || _cur_pos == pos.y)
3232

@@ -45,7 +45,7 @@ if (control_state.pressed_state[MENU_CONTROLS.LEFT]) {
4545
}
4646

4747
do {
48-
pos.x = wrap(pos.x-1, 0, ds_grid_width(items)-1);
48+
pos.x = wrap(pos.x-1, 0, ds_grid_width(items));
4949
_item = items[# pos.x, pos.y];
5050
} until (is_struct(_item) || _cur_pos == pos.x)
5151

@@ -64,7 +64,7 @@ if (control_state.pressed_state[MENU_CONTROLS.RIGHT]) {
6464
}
6565

6666
do {
67-
pos.x = wrap(pos.x+1, 0, ds_grid_width(items)-1);
67+
pos.x = wrap(pos.x+1, 0, ds_grid_width(items));
6868
_item = items[# pos.x, pos.y];
6969
} until (is_struct(_item) || _cur_pos == pos.x)
7070

0 commit comments

Comments
 (0)