Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added start level argument #75

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Mia75owo
Copy link
Contributor

This adds the --startlevel argument.
When this gets passed to the game, it skips loading the cractro, main menu and the intro to directly start into the level.
This is just a little handy feature for debugging purposes and for using
external tools (like being able to directly start a level from a map editor).

There was a typo in the message displayed when the command line argument was not recognised.
This is needed for something like this:
```
--load ../data/levels/jungle.map
```
… the game

This checks if something was passed into --startlevel and then directly loads it,
skipping the cractro, main menu and the intro.
I added the check in the InitNewGameLevel function (basically the same as the --load flag)
@drfiemost drfiemost self-assigned this Feb 1, 2024
@drfiemost
Copy link
Member

Can't get it to work, what is the correct usage?
Also the help text is wrong.

The help message still contained "--loadlevel", but the flag is called "--startlevel"
so I renamed it.
This is because the "-S" flag exists, which is checked before "-SL".
So if "-SL" is passed, the "-S" gets triggered. :/
@Mia75owo
Copy link
Contributor Author

Mia75owo commented Mar 3, 2024

Sorry, it was a stressful week when I wrote this. There were multiple mistakes in this
terrible PR which I think are fixed now.
The correct usage for the flag is to pass a path to a map file.
For example: (executed in Hurrican/Hurrican/build)

./hurrican -RL ../data/levels/mpde.map
./hurrican --startlevel ../data/levels/temple.map

@drfiemost
Copy link
Member

Thanks, will have a look, as time permits.

@drfiemost
Copy link
Member

Ok, now it works, but it's similar to the --level option, except that it takes you directly to the game. Could this be changed into something like a skipmenu option to be used in combination with the former?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants