Pages: 1 [2]
  Print  
Author Topic: Help File?  (Read 5036 times)
Offline (Male) retep998
Reply #15 Posted on: August 23, 2010, 03:34:18 PM

Member
Location: Where else?
Joined: Jan 2010
Posts: 248
MSN Messenger - retep998@charter.net AOL Instant Messenger - retep998 Yahoo Instant Messenger - retep998
View Profile Email
Also, I'd recommend using "sprite_id" instead of "sprite" because really, you could probably enter any number and it would be considered acceptable by the compiler.
What happens when you give gm a decimal sprite id like 2.5?
Does it round, floor, ceil?
Or does it just ignore it?
Or does it error?
Or does it crash?
Or does it fuck up utterly?
Logged
Offline (Male) RetroX
Reply #16 Posted on: August 23, 2010, 04:03:01 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
It gives you an error because you're giving a double and not an int
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Female) IsmAvatar
Reply #17 Posted on: August 23, 2010, 04:15:04 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 891

View Profile Email
Enigma will. He asked about GM, though, which doesn't distinguish between double and int.
Logged
Offline (Male) Josh @ Dreamland
Reply #18 Posted on: August 23, 2010, 04:15:35 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2953

View Profile Email
ENIGMA Will do no such thing. A warning is thrown if the variable is not an ENIGMA type, and the value is truncated.
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
Offline (Unknown gender) TheExDeus
Reply #19 Posted on: August 23, 2010, 05:13:59 PM

Developer
Joined: Apr 2008
Posts: 1919

View Profile
Quote
What happens when you give gm a decimal sprite id like 2.5?
Its rounds it. So 2.5 would be 2.

And in what format should these functions be? I guess the best way to document them would be trought the description boxes in function progress page. This way it automatically goes into the database. I see it works again. Thou another input box should be need no? Like one box for the function "draw_sprite(sprite_id sprite, int image_index,int x,int y)" and the big box for the description. So when you type/search the function you get something like:
Function name - Description
E.g.
draw_sprite(sprite_id sprite, int image_index,int x,int y) - Draws a sprite with its origin at position (x,y) and subimage of image_index.
Or:
draw_sprite(sprite_id sprite, int image_index,int x,int y) - Draws a sprite with its origin at position (x,y) and subimage of image_index.
Logged
Offline (Male) RetroX
Reply #20 Posted on: August 23, 2010, 06:21:25 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Italics are nice.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Josh @ Dreamland
Reply #21 Posted on: August 23, 2010, 06:39:59 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2953

View Profile Email
HaRRiKiRi:
The function list page (however outdated) will allow you to submit a description.
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
Offline (Female) IsmAvatar
Reply #22 Posted on: August 23, 2010, 07:07:05 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 891

View Profile Email
Might also be nice to include a return type.
Logged
Offline (Male) retep998
Reply #23 Posted on: August 23, 2010, 11:44:48 PM

Member
Location: Where else?
Joined: Jan 2010
Posts: 248
MSN Messenger - retep998@charter.net AOL Instant Messenger - retep998 Yahoo Instant Messenger - retep998
View Profile Email
We need an open source documentation system for enigma, which can be stored both locally and also retrieved off the internet, with the optional feature of also being able to add and edit documentation, all from within the LGM IDE.
We also need some sort of intellisense for LGM, otherwise Imma stick to vc++.
Logged
Offline (Unknown gender) TheExDeus
Reply #24 Posted on: August 24, 2010, 05:08:04 AM

Developer
Joined: Apr 2008
Posts: 1919

View Profile
Quote
The function list page (however outdated) will allow you to submit a description.
I tried submitting one, but it still shows that no description was submitted to the function. I tried "draw_sprite". And the thing is, if I can't change the function string itself, then I need to write its description accordingly. Like instead of:
Quote
draw_sprite(sprite_id sprite, int image_index,int x,int y) - Draws a sprite with its origin at position (x,y) and sub-image of image_index.
How I initially planned, I need to write:
Quote
Draws a sprite with its origin at position (x,y) and sub-image of subimg.
So if in the future you change the argument names, like replacing subimg to image_index (thou this is a variable, so subimg probably would stay), then description would need to be changed too. This way I would also be able to set the argument types, as this does seem a manual process (thou it could be possible to get the argument types from C+ definitions and generate these automatically..).

Quote
We need an open source documentation system for enigma, which can be stored both locally and also retrieved off the internet, with the optional feature of also being able to add and edit documentation, all from within the LGM IDE.
This would be nice. Especially saving locally.
Logged
Pages: 1 [2]
  Print