Skip to content

Commit

Permalink
docs, script_function::get_namespace, #include pack.dat deprication
Browse files Browse the repository at this point in the history
* Packs should now be embedded using `#pragma embed packname.dat` at all times.

* This reregisters script_function entirely to get rid of the c++ script_function class and instead registers asIScriptFunction directly. You can now create a funcdef, then a handle to that funcdef, then do script_function_instance.retrieve(@handle); before calling the function handle directly!
  • Loading branch information
samtupy committed Oct 7, 2024
1 parent fa1627e commit 63ec14c
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 193 deletions.
1 change: 1 addition & 0 deletions doc/src/appendix/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This document lists all major changes that have taken place in NVGT since we started keeping track.

## New in 0.89.0-alpha (unreleased):
* Including pack files via the `#include` directive has been removed in favor of being able to include scripts of any extension, you should use the `#pragma embed` directive to do this instead.
* NVGT games now run on intel as well as arm mac computers!
* The calendar object is now registered as a reference type with Angelscript meaning it now supports handles, for BGT backwards compatibility. The other datetime classes are still value types.
* Added bool sdl_set_hint(const string&in hint, const string&in value, sdl_hint_priority priority = SDL_HINT_NORMAL) and string sdl_get_hint() functions, allowing the user to customize over 200 different SDL options from screen orientation to the video backend used and many more.
Expand Down
1 change: 1 addition & 0 deletions doc/src/manual/-BGT Upgrading+.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ our goal is to make the transition as seamless as possible from BGT to NVGT, but
* The dynamic_menu.bgt include is now called bgt_dynamic_menu.nvgt. This is because NVGT now includes it's own menu class called menu.nvgt.
* There is a type called `var` in the engine now, so you may need to be careful if your project contains any variables named var.
* It's worth noting that unlike BGT, NVGT by default attempts to fully package your game for you including sounds, libraries, documents and any other assets into a .zip file or similar on other platforms intended for distrobution. If you don't like this behavior, you can create a file next to nvgt.exe called config.properties and add the line build.windows_bundle = 0 which will cause NVGT to just produce a standalone executable like BGT did, though you now may need to copy some libraries from the lib folder for the compiled product to run.
* In bgt, you could include pack files with the `#include` directive. In nvgt, we've decided that this should only include code. To embed packs, you can instead add the line `#pragma embed packname.dat` to your project, the extension can be any of your choosing for both code and packs this way.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Sets the sound's position in 3d space.
* float sound_x: the x position of the sound.
* float sound_y: the y position of the sound.
* float sound_z: the z position of the sound.
* float rotation: the rotation of the listener (in degrees).
* float rotation: the rotation of the listener (in radians).
* float pan_step: the pan step (e.g. how extreme the panning is).
* float volume_step: the volume step (very similar to pan_step but for volume).

Expand Down
4 changes: 0 additions & 4 deletions src/angelscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,6 @@ int IncludeCallback(const char* filename, const char* sectionname, CScriptBuilde
try {
Path include(Path::expand(filename));
include.makeAbsolute();
if (include.getExtension() != "nvgt") { // Embedded pack
embed_pack(include.toString(), filename);
return 0;
}
include_file = include;
if (include_file.exists() && include_file.isFile()) return builder->AddSectionFromFile(include.toString().c_str());
include = Path(sectionname).parent().append(filename);
Expand Down
Loading

0 comments on commit 63ec14c

Please sign in to comment.