marpis
2009-11-22 09:22:01
Like many of us knows, RM just wrote very nice functions for SmartColors.SCAR, which has already been committed to open-dev repo.
Should we just use those functions as a base for all MS finding?
We would make an array of the TMSObj and record colors and stuff from all objects and NPCs we're using. The only object finding function would be
But we would first change the function a bit, so the parameter would be Integer instead of String, and the "FindWhat" parameter would be the index of Array og TMSObj. I also think the name of the function should be SmartFinder(FindWhat: Integer): Boolean;
Example:
Instead of just updating the colours in the array, we should save all the changes in an .INI or something.
What do you guys think?
Should we just use those functions as a base for all MS finding?
We would make an array of the TMSObj and record colors and stuff from all objects and NPCs we're using. The only object finding function would be
{*******************************************************************************
Function SmartColors(FindWhat: string): boolean;
By: Rasta Magician
Description: Finds object 'FindWhat'. Need to call MakeObj first.
*******************************************************************************}
Function SmartColors(FindWhat: string): boolean;
But we would first change the function a bit, so the parameter would be Integer instead of String, and the "FindWhat" parameter would be the index of Array og TMSObj. I also think the name of the function should be SmartFinder(FindWhat: Integer): Boolean;
Example:
Var
Objects: Array [0..3] Of TMSObj;
Const
NPC_GIANTRAT = 0;
NPC_SCORPION = 1;
OBJ_ROCK_IRON = 2;
OBJ_TREE_YEW = 3;
Procedure LoadColorInfo;
Begin
With Objects[NPC_GIANTRAT] Do
Begin
Name := 'iant';
Color := 123123;
Hue := 0.04;
Sat := 1.22;
...
End;
End;
{ Finding a Giant Rat }
SmartFind(NPC_GIANTRAT)
// or
SmartColor(NPC_GIANTRAT)
// depending on which is the final name of the function. I think SmartColors() can be misleading.
Instead of just updating the colours in the array, we should save all the changes in an .INI or something.
What do you guys think?