Thread: TRNG - Updates
View Single Post
Old 28-01-17, 00:09   #35
AkyV
Moderator
 
Joined: Dec 2011
Posts: 4,881
Default

TRNG 1.3.0.4 Updater
(Released: 27 January 2017)

See the update functions in NG Center and TRNG Patcher.

NG Center updater (CU-5):

- Fixed unjustified warning message from some plugins
It has been removed the warning about "not even size in AddNGToken() function".
Above message will be showed in log, or on screen when DGX_ERRORS was enabled, everytime it was saved a savegame and some plugin was mounted.
That warning was not really worrying, so it has been removed.
Note: you can recognize updated plugins because their version will be "1.0.0.2"

- Fixed old bug in NGLE program
This was a bug of old winroomedit program.
Using some commands to look for texture, untextured faces, illegal slope, objects or triggers, when this item was in a new room, the name and flip map value, of this new room, it was not updated.

- Fixed old bug in NGLE program
This was a bug of old winroomedit program.
After having set menu command: [Texture->Load palette], used to replace the standard palette with the palette of given .pcx image, the colors in the editor were messed up.

- Fixed bug in NG_Center
In previous version, NG_Doctor failed to parse plugin installation if there was a plugin that was: present in ng_center but missing (with its plugin_.dll) in trle folder. There was an execption and the looking for errors was stopped.

- Fixed bug in Flipeffect 309
In previous version, the trigger F309, used to show in log the value and name of a given numeric variable, wrote wrong names when the variable was: "Last Input Number", Last Input Text", "Current Value" or "Big Text"

- Attemp to fix a bug about underwater playing of sfx anim command sounds
I say "attempt" because I have had problems to reproduce this bug on my pc. In my tests there was no bug.
Anyway I rewrote from scratch the code to hanlde this situation (playing underwater sfx via animcommand) and I hope the bug was solved.
I remind you some notes about sfx sound management:
1) When you use an exported trigger as animcommand to ply sfx sound, it will have the "always" flag. This means that it will be played indifferently wehter the room of that moveable was in water or less
2) If you use the BUGF_LAND_WATER_SFX_ENEMIES in the script, you shoul take care that the [Water/Land] flags (in wad merger's AnimCommands window) have been set correctly.
3) It's better avoiding to play same sfx sound twice or more times in short time (few tick frame of difference) because the replay of a sound, that already was playing, could forbid that sound to be played in correct way. Only "looped" sounds do exception to above rule.

- Attempt to fix bug about delay in drawing load level image
Using the script command:
Customize= CUST_BACKGROUND, BKGDT_LOADING_LEVEL,...
To set an image in loading level phase, there was a delay in drawing image.
Like for above bug, I've not been able to detect any delay, anyway I performed an attempt (at blind way) to fix this problem.

- Fixed bug about updating process
In previous version of NG_Center, the folder with update files was not opened as said.

TRNG Patcher updater (PU-5):

- Added input parameters for cbInitLevel() callback
While in previous versions the prototype of cbInitLevel was void (no input arguments):

void cbInitLevel(void)

Now some input arguments have been added:

void cbInitLevel(int LevelNow, int LevelOld, DWORD FIL_Flags)

New arguments give informations that could be useful to perform selective initialise of your variables.

LevelNow = Current number of level is going to begin
LevelOld = Previous level (0=title, -1 = from savegame, OtherValues= number of level from where there has been the level jump to current level)
FIL flags = you can testing this value with "&" operator (like for all flags) and enumFIL. enumerator. It gives you specific informations about how this level it has been started.

For instance to understand when you should set the default value for your variables, you should perform this condition:
if (FIL_Flags & enumFIL.FROM_NEW_LEVEL) {
// current level begins for first time: reset from scratch all my variables and features

}

Note: in spite this change seems violate the rule to keep backward compatibility, also already compiled plugins will be able to work with new 1.3.0.4 tomb_nextgeneration.dll without problems, because the adding of input arguments don't affect any problem for old plugins that don't use these extra input parameters.

- Removed warning about "not even size in AddNGToken() function"
Above message was generated, in save game process, when the MyData.Local or .Global structure was yet empty. Anyway it was a false positive.
Now it will be omitted but it could coming back only then plugin author add variables in some local or global structure of MyData and these variable had a not even amount of bytes.

- Renamed a folder's description in Trng Patcher's Settings window
In TrngPatcher's Settings window, it has been renamed the description of plugin sources folder, to get more understandable its usage.
Now the description is "Folder of YOUR Plugin Sources: (*.cpp and .h files)"
It's important to set this path because it will be in this folder that trng patcher will update source files downloaded in last update.

- Added new callback
It has been added the CB_DIAGNOSTIC callback
You can use it to add your text to show on screen when level builder enabled diagnostic in the script.
You require it (inside of RequireMyCallBacks() function) in this way:

GET_CALLBACK(enumCB.DIAGNOSTIC, 0,0, cbDiagnosticMine);

Then you create the corresponding function to manage it, in this way:

char *cbDiagnosticMine(WORD DGX_Type, WORD EDGX_Flags, char *pCurrentLogText)
{
static char MyBuffer[4096];

sprintf(MyBuffer, "MyProgActions=%d\nAmount Bubbles=%d", MyData.TotProgrActions, MyData.Save.Local.Bubbles );

return MyBuffer;
}

Notes:
* You should type above function over RequireMyCallBacks() function, as usual.
* Remember to define as "static" the local buffer (MyBuffer[] in above example) where you'll type your log to return.
* Use "\n" characters to signal a new line.
* In spite you could easily making yourself a simil-diagnostic on-screen, it should be better that your diagnostic was linked with that of trng, to permit at level builders to enable/disable all diagnostics via script and to avoid that other texts overalpping yours or viceversa

See declaration of CALL_DIAGNOSTIC prototype in DefTomb4Funct.h source for more infos.

- Improved FromNgleIndexToTomb4Index() and Convert() functions
It has been added the chance to convert ngle indices about cameras in tomb4 format.
Previously this ngle / tomb conversion worked only for moveable item indices.

- Fixed bugs in Get() function
In Get() function, for some enumGET values requiring an index, it was ignored the check for further NGLE_INDEX flag, used to require a conversion from ngle index to tomb index.
This problem was present in following GET_ parameters:
GET_INFO_ITEM
GET_CAMERA
GET_CAMERA_FLY

- Fixed bug in [Export Function] button of ngle program
In previous versions, when you tried to export a trigger (like A41) that had in object parameter a camera or fixed camera index, in resulting exported funcion the "| NGLE_INDEX" constant, to force conversion from ngle index to tomb index, was missing.

- Fixed bug in NGLE program
In previous versions, when you click on [Export Function] in "Set Trigger Type" window and some field of trigger was missing, it may be that program crashed

- Fixed bug in Get() function
In previous version, the call to get data for (trng and memory) variables:
Get(enumGET.VARIABLES,0,0);
produced a crash.

- Improved Get() function
About the enumGET.COLOR_RGB request, now there will be a new parameter to set in SecondaryIndex of Get() function.
The syntax now is:

Get(enumGET.COLOR_RGB request, IdOfRgbColor, enumCOLF_ (COLor Format));

The new constants COLF have only two values:

COLF_WINDOWS_COLOR (to get the color in the format required by Windows Api functions
COLF_TOMB_COLOR (to get the color in the format required by Tomb4 functions.

- Corrected wrong description about #REPEAT# tag syntax.
In previous documentation the description of #repeat# tag was wrong about last (optional) parameter.
It was described like an "increment" but in the reality it was the FirstIndex parameter, to set a value for index of each row, different than the number of counter showed in the description of that parameter.
The FirstIndex argument will be used in very specific situations.
See the (updated) description of #REPEAT# tag in "How to add new Triggers" tutorial, for more infos.

- Fixed some internal links in Function Collections tutorial
In previous release the links for GetMemory() and LoadFile() functions were wrong.
AkyV is offline