ENIGMA Development Environment
Home
About
Download
Wiki
Forums
EDC
Games
Tracker
Progress
Guest |
login
|
register
Commit to
enigma-dev
by
time-killer-games
: "
Add focus wait to Zenity/KDialog (#2198)"
(at 2021-03-28 22:54:56;
Click here to view
.)
ENIGMA Forums
>
Contributing to ENIGMA
>
Developing ENIGMA
>
Game End Return Value
Pages:
1
« previous
next »
Print
Author
Topic: Game End Return Value (Read 9667 times)
Goombert
Posted on:
April 05, 2014, 11:51:37 pm
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2991
Just curious, why did game_end() never get a parameter? In most programming languages, ie. Java has System.Exit(return);
We should overload it to accept variant or some shit for ENIGMA.
«
Last Edit: April 15, 2014, 01:16:04 pm by Robert B Colton
»
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
The 11th plague of Egypt
Reply #1 Posted on:
April 14, 2014, 07:00:30 am
Joined: Dec 2009
Posts: 274
Good idea.
Does it also return something?
Logged
Rusky
Reply #2 Posted on:
April 14, 2014, 09:32:38 am
Joined: Feb 2008
Posts: 954
It returns the first argument of the next run of the game, which starts at that call.
Logged
[
www.abubalay.com
]
Goombert
Reply #3 Posted on:
April 14, 2014, 02:11:55 pm
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2991
What Rusky? That doesn't make much sense.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
Rusky
Reply #4 Posted on:
April 14, 2014, 11:25:58 pm
Joined: Feb 2008
Posts: 954
It makes more sense than asking for a return value from System.Quit
Logged
[
www.abubalay.com
]
Goombert
Reply #5 Posted on:
April 14, 2014, 11:34:18 pm
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2991
Troll. Anyway, I went ahead and overloaded it per Josh's instructions with an int parameter type for all platforms.
Documentation for the function is here.
http://enigma-dev.org/docs/Wiki/Game_end
This was the commit.
https://github.com/RobertBColton/enigma-dev/commit/5484cbdb1f4fab04618c128cbb4b407bb5a45b22
«
Last Edit: April 15, 2014, 12:26:59 am by Robert B Colton
»
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
Rusky
Reply #6 Posted on:
April 15, 2014, 08:51:27 am
Joined: Feb 2008
Posts: 954
printf("%d\n", game_end(5))
$ ./game
$ echo $?
5
$ ./game 42
42
Logged
[
www.abubalay.com
]
Pages:
1
Print
« previous
next »
0