Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVGT Includes Improvements #133

Merged
merged 9 commits into from
Nov 6, 2024
Merged

NVGT Includes Improvements #133

merged 9 commits into from
Nov 6, 2024

Conversation

harrymkt
Copy link
Contributor

@harrymkt harrymkt commented Oct 27, 2024

  • 3D methods in sound pool are now overloaded with vectors.
    • int play_3d(string filename, pack@ packfile, vector listener, vector sound_coordinate, double rotation, bool looping, bool persistent = false);
    • int play_3d(string filename, vector listener, vector sound_coordinate, double rotation, bool looping, bool persistent = false);
    • void update_listener_3d(vector listener, double rotation = 0.0, bool refresh_y_is_elevation = true);
    • bool update_sound_3d(int slot, vector coordinate);
    • bool update_sounds_3d(string owner, vector coordinate, double rotation = -1);
  • Improved is_available method in touch.nvgt by shortening the return line to dev.length() > 0
  • Added a property in touch.nvgt called available which returns true or false whether touch can be used, similar to is_available method but for short.
  • Documented sub form functions (closes Documentation about create_subform and set_subform #78.
  • Documented sound pool.
  • Added some overloaded functions to rotation.nvgt.
    • shared double get_3d_distance(vector c1, vector c2);
    • shared double get_3d_distance_circle(vector c1, vector c2);
  • Added 2 new functions to rotation.nvgt to retrieve the differents in not only X Y Z but also by minimum and maximum of them.
    • shared double get_clamped_3d_distance(vector current, vector min, vector max);
    • shared double calculate_clamped_x_y_angle(vector current, vector min, vector max, double deg, bool at_least_1_tile = true, bool floor_deg = true);

* 3D methods in sound pool are now overloaded with vectors.
	* `int play_3d(string filename, pack@ packfile, vector listener, vector sound_coordinate, double rotation, bool looping, bool persistent = false);`
	* `int play_3d(string filename, vector listener, vector sound_coordinate, double rotation, bool looping, bool persistent = false);`
	* `void update_listener_3d(vector listener, double rotation = 0.0, bool refresh_y_is_elevation = true);`
	* `bool update_sound_3d(int slot, vector coordinate);`
	* `bool update_sounds_3d(string owner, vector coordinate, double rotation = -1);`
* Improved `is_available` method in touch.nvgt by shortening the return line to `dev.length() > 0`
* Added a property in touch.nvgt called `available` which returns true or false whether touch can be used, similar to `is_available` method but for short.
* Documented sub form functions.
* Added some overloaded functions to rotation.nvgt.
	* `shared double get_3d_distance(vector c1, vector c2);`
	* `shared double get_3d_distance_circle(vector c1, vector c2);`
* Added 2 new functions to rotation.nvgt to retrieve the differents in not only X Y Z but also by minimum and maximum of them.
	* `shared double get_clamped_3d_distance(vector current, vector min, vector max);`
	* `shared double calculate_clamped_x_y_angle(vector current, vector min, vector max, double deg, bool at_least_1_tile = true, bool floor_deg = true);`
@alex-chap
Copy link

That's cool, it's nice we're getting improvements to the includes

@samtupy samtupy merged commit 2d9895b into samtupy:main Nov 6, 2024
@harrymkt harrymkt deleted the Includes branch November 6, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation about create_subform and set_subform
3 participants