A conversion operator would be a hidden additional operator afaict from the discussion. I don't like this approach at all. And I don't think we should add opcodes without thinking too, that loop is a critical part that affects everything.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuimport float AbsF(float a);
import float MaxF(float a, float b);
import float MinF(float a, float b);
import float ClampF(float v, float min, float max);
float AbsF(float a)
{
if(a<0.0) return -a;
return a;
}
float MaxF(float a, float b)
{
if (a > b)
return a;
return b;
}
float MinF(float a, float b)
{
if (a < b)
return a;
return b;
}
float ClampF(float v, float min, float max)
{
return MinF(max, MaxF(v, min));
}
atbx export template -f ../../dkrey/ags_tumbleweed/ tumbleweed.agt ../
// new module header
import function Follow(this Character*, Character* toFollow, int dist=10, int eagerness=67);
import bool IsFollowing(this Character*);
import Character* Followed(this Character*);
// new module script
bool _isFollowing[];
Character* _following[];
void game_start(){
_isFollowing = new bool[Game.CharacterCount];
_following = new [/spoiler]Character[Game.CharacterCount];
}
function Follow(this Character*, Character* toFollow, int dist, int eagerness){
_following[this.ID] = toFollow;
if(toFollow!=null){
_isFollowing[this.ID] = true;
} else {
_isFollowing[this.ID] = false;
}
this.FollowCharacter(toFollow, dist, eagerness);
}
bool IsFollowing(this Character*){
return _isFollowing[this.ID];
}
Character* Followed(this Character*){
return _following[this.ID];
}
QuoteYou may have readonly global variables, local variables, function parameters, and struct attributes.
Two most common uses of a readonly variable are function parameters and local variables. This works as a "failproof" method to ensure that they are only assigned, but are never changed within the function by programmer's mistake.
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.082 seconds with 15 queries.