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 topic
-
Next topic
Author
Topic: Game End Return Value (32,358 Views)
Goombert
Joined: Jan 2013
Posts: 2,991
Posted on:
April 06, 2014, 04:51:37 AM
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, 06: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
Joined: Dec 2009
Posts: 274
Reply #1 Posted on:
April 14, 2014, 12:00:30 PM
Good idea.
Does it also return something?
Logged
Rusky
Joined: Feb 2008
Posts: 954
Reply #2 Posted on:
April 14, 2014, 02:32:38 PM
It returns the first argument of the next run of the game, which starts at that call.
Logged
[
www.abubalay.com
]
Goombert
Joined: Jan 2013
Posts: 2,991
Reply #3 Posted on:
April 14, 2014, 07:11:55 PM
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
Joined: Feb 2008
Posts: 954
Reply #4 Posted on:
April 15, 2014, 04:25:58 AM
It makes more sense than asking for a return value from System.Quit
Logged
[
www.abubalay.com
]
Goombert
Joined: Jan 2013
Posts: 2,991
Reply #5 Posted on:
April 15, 2014, 04:34:18 AM
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, 05: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
Joined: Feb 2008
Posts: 954
Reply #6 Posted on:
April 15, 2014, 01:51:27 PM
printf("%d\n", game_end(5))
$ ./game
$ echo $?
5
$ ./game 42
42
Logged
[
www.abubalay.com
]
Pages:
1
Previous topic
-
Next topic
0
SMF 2.1.7 © 2026
,
Simple Machines