From efc00c7912a7f1054e10f7dcf821a2284a12b7e0 Mon Sep 17 00:00:00 2001 From: YYBartT Date: Fri, 6 Dec 2024 13:28:58 +0100 Subject: [PATCH 01/15] docs(general): "Clear Display Buffer" is not working YoYoGames/GameMaker-Bugs#7456 Small changes to window_get_colour() & window_set_colour() manual pages --- .../The_Game_Window/window_get_colour.htm | 22 ++++++------ .../The_Game_Window/window_set_colour.htm | 34 ++++++++++--------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_get_colour.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_get_colour.htm index 1004f516e..1d3a429bb 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_get_colour.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_Window/window_get_colour.htm @@ -4,7 +4,7 @@ window_get_colour - + @@ -15,33 +15,33 @@ -

window_get_colour

-

This function returns the background colour of the game window. This colour represents that which will be used for those areas of the game window that are not occupied by any views. The following image illustrates this:

-

Windfow colour illustrationThe above image has two views with two view ports, each one drawn at different positions. This stretches the game window to accommodate both ports and uses the window colour to colour the background where no view is shown.

+

window_get_colour

+

This function returns the background colour of the game window.

+

This colour represents that which will be used for those areas of the game window that are not occupied by any views. The following image illustrates this:

+

Windfow colour illustrationThe above image has two views with two view ports, each one drawn at a different position. This stretches the game window to accommodate both ports and uses the window colour to colour the background where no view is shown.

 

Syntax:

-

window_get_colour();

+

window_get_colour();

 

Returns:

-

Colour Constant

+

Colour

 

Example:

-

if (window_get_colour() != c_black)
+

if (window_get_colour() != c_black)
{
    window_set_colour(c_black);
}

The above code will check the window colour to see if it is set as black or not, and if it is not it sets it to black.

 

 

-

 

-

window_set_colour

-

This function can set the background colour of the game window. This colour represents that which will be used for those areas of the game window that are not occupied by any views. The following image illustrates this:

-

Window colour exampleThe above image has two views with two view ports, each one drawn at different positions. This stretches the game window to accommodate both ports and uses the window colour to colour the background where no view is shown.

+

window_set_colour

+

This function sets the background colour of the game window.

+

This colour represents that which will be used for those areas of the game window that are not occupied by any views. The following image illustrates this:

+

Window colour exampleThe above image has two views with two view ports, each one drawn at a different position. This stretches the game window to accommodate both ports and uses the window colour to colour the background where no view is shown.

 

Syntax:

-

window_set_colour(colour);

+

window_set_colour(colour);

- + + - + - + + - +
ArgumentTypeArgumentType Description
colourcolourColour The colour to set the region.

 

Returns:

-

+

N/A

 

Example:

-

if (window_get_colour() != c_black)
+

if (window_get_colour() != c_black)
{
-     window_set_colour(c_black);
+     window_set_colour(c_black);
}

The above code will check the window colour to see if it is set as black or not, and if it is not it sets it to black.

 

 

-

 

+ + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/debug_input_record.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/debug_input_record.htm new file mode 100644 index 000000000..a40f3c230 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/debug_input_record.htm @@ -0,0 +1,94 @@ + + + + + + debug_input_record + + + + + + + + + + +

debug_input_record

+

This function starts recording various types of input.

+

The types of input that you want to include are specified as a bitmask that can be a combination of the following constants: 

+ + + + + + + + + + + + + + + + + + + + + + + + +
Debug Input Filter Constant
ConstantDescription
debug_input_filter_keyboardInclude keyboard input
debug_input_filter_mouseInclude mouse input
debug_input_filter_touchInclude touch input
+

If you want to record, for example, keyboard and mouse input the value would be debug_input_filter_keyboard|debug_input_filter_mouse.

+
+

 

+

Syntax:

+

debug_input_record(filter);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
filterDebug Input Filter ConstantA bitmask combining the different types of input to record
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

debug_input_record(debug_input_filter_keyboard|debug_input_filter_mouse);

+

The above code starts recording both keyboard and mouse input, which can be saved to a file using debug_input_save.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/debug_input_save.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/debug_input_save.htm new file mode 100644 index 000000000..8f41a7925 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/debug_input_save.htm @@ -0,0 +1,69 @@ + + + + + + debug_input_save + + + + + + + + + + +

debug_input_save

+

This function stops recording input and saves it to the given file for later playback.

+

Recording of input must have previously been started with a call to debug_input_record.

+

 If you call this function in, e.g., a key press event this event will also be recorded (as the key press has already occurred at the time this function is called).

+
+

 

+

Syntax:

+

debug_input_save(filename);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
filenameStringThe path to the file to save the recorded input to
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

debug_input_save("input.data");

+

The above code saves recorded debug input to a file named "input.data".

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/fps_real.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/fps_real.htm index 98093f092..cf47e6245 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/fps_real.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/fps_real.htm @@ -20,28 +20,27 @@

fps_real

On the HTML5 target, this variable will instead return a multiple of the monitor refresh rate as GameMaker has to rely on the browser for timing and dispatch.

 

Syntax:

-

fps_real

+

fps_real

 

Returns:

-

Real

+

Real

 

Example:

-

if (debug_mode)
+

if (debug_mode)
{
    draw_text(32, 32, "FPS = " + string(fps_real));
}

The above code will check to see if the game is in debug mode and if it is it will display the current real fps on the screen.

 

 

-

 

-

window_mouse_get_y

+

window_mouse_get_y

With this function you can get the y position of the mouse cursor (in pixels) within the browser if it is an HTML5 game or within the display if it is a Windows, Ubuntu (Linux) or macOS game.

 

Syntax:

-

window_mouse_get_y();

+

window_mouse_get_y();

 

Returns:

-

Real

+

Real

 

Example:

-

wy = window_mouse_get_y();

-

The above code stores the current y axis window position of the mouse in the variable "wy".

+

wy = window_mouse_get_y();

+

The above code stores the current y axis window position of the mouse in the variable wy.

 

 

-

Ini Files

-

INI files are small, lightweight files which are compatible with most platforms. They are ideal for storing small pieces of information, like interface preferences, local high scores, level data etc... and as such are a great and easy way for you to start saving information from your games. If you are looking for more advanced ways to save information to files, you may wish to look at some of the other file functions like Text FilesBinary Files and Buffers.

-

 All GameMaker projects have a file called "options.ini", so you cannot name any file with that name (you will get a uid failure when you try to compile your game project).

-

The following functions exist for ini files:

+

INI Files

+

INI files are small, lightweight files which are compatible with most platforms. They are ideal for storing small pieces of information, like interface preferences, local high scores, level data, etc., and as such are a great and easy way for you to start saving information from your games. If you are looking for more advanced ways to save information to files, you may wish to look at some of the other file functions like Text FilesBinary Files and Buffers.

+

 All GameMaker projects have a file called "options.ini", so you cannot name any file with that name (you will get a UID failure when you try to compile your game project).

+

Function Reference

+

Opening & Closing

+ +

Reading & Writing

 

 

-