Pages: 1
  Print  
Author Topic: ds_list_ functions  (Read 2096 times)
Offline (Unknown gender) score_under
Posted on: October 22, 2008, 01:10:50 pm

Member
Joined: Aug 2008
Posts: 308

View Profile
ds_list_size(), along with the rest of them, results in a syntax error for me, saying that the function does not exist (with latest build from time of writing).
Since it's marked as finished, what's the problem with it?

(Enigma also reports that I have an unknown D&D action while every object has only code actions. ::) )

I also spotted this little gem while trying to work my way through the source code...
   char ordinal=(char) enigma::negmod(val,255);
Surely that can just be...
   char ordinal=(char)val; //val&0xFF is implied, as char is only 1 byte.
And thinking over that again, why do you have a function called "negmod", instead of just x%y ?
« Last Edit: October 22, 2008, 03:56:58 pm by score_under » Logged
Offline (Male) Rusky
Reply #1 Posted on: October 22, 2008, 07:27:33 pm

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
ds_list is finished, just not in the release apparently.
negmod is so mod functions the way it does in GM, it's different.
Logged
Offline (Unknown gender) score_under
Reply #2 Posted on: October 26, 2008, 10:13:39 am

Member
Joined: Aug 2008
Posts: 308

View Profile
ds_list is finished, just not in the release apparently.
negmod is so mod functions the way it does in GM, it's different.
Does the C++ compiler try to take it into its own hands and do something like double->int conversion beforehand?

Anyway, which D&D action is this mysterious thing which LGM shows nothing of?

(PS. If the ds_list_xxxx functions are stable, could I please have a .diff or similar format patch file?)
« Last Edit: October 26, 2008, 10:31:36 am by score_under » Logged
Offline (Male) Josh @ Dreamland
Reply #3 Posted on: November 16, 2008, 09:07:47 am

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
ds_list was done by Rusky. I have still yet to implement it, or test it for myself.

negmod was a general replacement for % after I discovered % didn't take doubles, and had trouble with negatives or something.

Either way, it's basically just (char) & 0xFF now.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Pages: 1
  Print