Skip to content

Commit

Permalink
printusage()
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtBagXon committed Jul 4, 2023
1 parent cd259aa commit 329b748
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/hypseus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ int main(int argc, char **argv)
// if command line was bogus, quit
else {
printerror("Bad command line or initialization problem.");
printusage();
}

// if our g_game class was allocated
Expand Down
43 changes: 43 additions & 0 deletions src/io/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,46 @@ void printnotice(const char *s)
{
LOGE << s;
}

void printusage()
{
const char * usage = R"USAGE(
Hypseus Singe (C)2023 DirtBagXon
Usage: hypseus <game> vldp -framefile <framefile.txt> ...
The above arguments are, at minimum, required:
- <game> consists of a supported Daphne ROM or 'singe'
- Singe games require an extra '-script <game.singe>'
<game.singe> defines the main Singe LUA game file.
- Other common arguments are:
-bezel <game.png>
-fastboot
-fullscreen
-gamepad
-nolinear_scale
- Common Singe arguments:
-script <game.singe> : (This is required)
-blend_sprites
-manymouse
See documentation for a full list of available arguments:
Visit: https://github.com/DirtBagXon/hypseus-singe
Use -v to display version and build information.
)USAGE";

#ifdef WIN32
MessageBox(NULL, usage, "Usage", MB_OK | MB_ICONINFORMATION);
#else
fprintf(stdout, "%s", usage);
#endif
}
1 change: 1 addition & 0 deletions src/io/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
void printerror(const char *);
void printnowookin(const char *s);
void printnotice(const char *s);
void printusage();

0 comments on commit 329b748

Please sign in to comment.