Functions that I would like to remove from System.c4g:
Commits.c
Nor(bool con1, bool con2, bool con3, bool con4, bool con5)Bounce(int iPower)RndMakeCrewMember(int iPlayer, id ID)SemiExplode(int iLevel, int incidence)PlaceInMaterial(id def, int material, int _retries) (PlaceObjects does the same and more)CastObjectsX(iddef,am,lev,x,y,angs,angw,callback) (instead extend the original function)CastPXSX(string mat,int am,int lev,int x,int y,int angs,int angw) (instead extend the original function)GetMaterialColorX(mat, num) (with the color determined by the texture, this is obsolete like GetMaterialColor)- FindConstructionSiteX(id idDef, &iVarX, &iVarY) (change the FindConstructionSite function to do what this function does now - references instead of Var(...))
C4.c
ForcePosition(object obj, int x, int y)AssignRemoval(object obj)Barrel-Functions - why does this need to be global?SetOnlyVisibleToOwner(bool fVisible, object pObj) (we don't need this wrapper around SetVisibility)GetOnlyVisibleToOwner(object pObj)MessageBoard(string msg, par0, par1, par2, par3, par4, par5, par6, par7, par8)
Helpers.c
CastlePanic() (???)CastlePanicResort(object pObj1, object pObj2)
C4Script.cpp
Or, And, Not, BitAnd, Sum, Mul, Mod, Sub, Div, Pow, LessThan, GreaterThan, SEqual- Smoke, Bubble - move to System.c4g
ObjectSetAction - obsolete: object->SetAction()SoundLevel - Sound can do everything that SoundLevel canSetSkyFade, SetSkyColor, GetSkyColor, GetMaterialColor, SetMaterialColor, IsNewGfxValue - One can ask the defcoreFindObject, FindObjectOwner, ObjectCount - rename FindObject2 to FindObject, ObjectCount2 to ObjectCount
Then, reorder it and document all remaining functions + remove docs for these.
>CastlePanic() (???)
CastlePanic normally resorts a castle so that every castle part is in front of every other castle part that is below the first one. But I think the function does not work atm. At least I had to write my own once
Plus, assume that all scripts are #strict 2 so #strict 2 doesn't need to be written down.
What do the devs think about this?
>As long as the object parameter is the last parameter, it doesn't really matter.
But that would mean that we could not add other parameters later on. The object parameter would not be the last one anymore and everything would be mixed up again
Value might be handy if it does the value-overriding callbacks, but we should probably replace those with a property. (I've only one more homework assignment and one exam this semester, so I should be able to write the savegame code for and merge this soon)
I already removed the documentation for these functions: And AssignVar BitAnd Dec DecVar Div Equal Global GreaterThan Inc IncVar IsNewgfx LessThan Local Mod Mul Not Or SEqual SetGlobal SetLocal SetMaterialColor SetSkyColor SetSkyFade SetVar Sub Sum Var
>I already removed the documentation for these functions: And AssignVar BitAnd Dec DecVar Div Equal Global GreaterThan Inc IncVar IsNewgfx LessThan Local Mod Mul Not Or SEqual SetGlobal SetLocal SetMaterialColor SetSkyColor SetSkyFade SetVar Sub Sum Var
Yeah I noticed. You forgot GetMaterialColor, though ;-)
Regarding the docs. I only find the German documentation in the repos, where are the English XMLs?
> Barrel-Functions - why does this need to be global?
Probably because they were in the engine once. They might also really be used by multiple objects.
> AsyncRandom - what is this?
As the name says - a random function which returns unsynchronized random values. There are very few uses for that, but I think they exist.
>> AsyncRandom - what is this?
>As the name says - a random function which returns unsynchronized random values. There are very few uses for that, but I think they exist.
You've gave me a new idea: how about asynchrous objects? These objects are not synchronized and can not change real objects. But unlike normal objects the can get asynchrous values like screensize, the curent real time and so on. This would be great for GUI and HeadUp Displays.
>RndMakeCrewMember(int iPlayer, id ID)
Why? That function is used a lot.
And btw, do we still need FindObject, FindObjectOwner and ObjectCount?
- ExtractLiquid
- FlameConsumeMaterial
- LaunchEarthquake
- LaunchLightning
We can probably also remove GBackSolid et al., but I haven't considered the performance implications.
Functions removed without replacement, and rationale:
- LaunchVolcano (already have a replacement in Commits.c)
- Var, as well as (Set/Inc/Dec)Var (obsolete due to named variables)
- SetLocal/SetGlobal (obsolete since Local/Global returns a reference)
- ObjectCall (obsolete, use arrow syntax and Call)
- Set/Inc/Dec (obsolete)
Also I've changed SetColor to use 32bit colors, like SetColorDw did before. The latter has been removed. Same thing with GetColor.
>ObjectCall (obsolete, use arrow syntax and Call)
ObjectCall was good to call a command out of a string. You can make a almost simillar result with "pObj->eval(szString);" or "pObj->Call(szString);" but I dont know how the performace is.
FindConstructionSiteX(id idDef, &iVarX, &iVarY) - should be rescripted when the hammer is scripted.
Barrel-functions - should be rescripted when the barrel is scripted.
Smoke, Bubble - I don't like to go too deep into the engine ... ;-)
LaunchRain - (the documentation part:) should be rescripted when the cloud is rescripted
I think Find_ActionTarget should be extended in such a way that you can specify the first action target, the second action target, or both. I.e. the specified object must be either the first or the second action target (this is the old FindObject functionality).
But if our lines become bidirectional, always looking for both action targets would make more sense. Want to make a patch? I'd guess it would be only one or two lines in src/game/script/C4FindObject.cpp.
>Search criterion: finds all objects that have the specified action target, either the first or the second.
Should be changed in the docu.
Find_ActionTarget(object pActionTarget)
will now find all objects having pActionTarget as one of its action targets, not only the first.ISC license is understood.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill