Skip to content

Commit

Permalink
no -w option. lineSize is 30 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Radvendii committed Oct 31, 2016
1 parent c168ae1 commit c76ffa4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MAR1D
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env bash
./build/MAR1D -w30
./build/MAR1D
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ I'll be trying to put out binaries in the near future, but for now you'll have t
The `./build/MAR1D` executable takes a few command line arguments (note that all numerical arguments must be integers):
* `-m` mutes the audio
* `-f` unmutes the sound effects if the audio is muted, so it does nothing on its own, but `-mf` will enable only sound effects.
* `-w` makes the display area wide (linux only, raises an error on mac). This is enabled by default if you run `./MAR1D`. `-w##` sets the display area to a width of `##` pixels
* `-w##` sets the display area to a width of `##` pixels.
* `-s##` sets the mouse sensitivity.
* `-r` reverses the mouse y axis. Not sure why this is necessary, but lots of games seem to include it.

Expand Down
11 changes: 3 additions & 8 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ struct state s;
int main(int argc, char **argv){
bool mute = false;
bool effects = false;
int lineSize = 1;
int lineSize = 30;
int sensitivity = 5;
bool reverse = false;
int c;
while ((c = getopt(argc, argv, "mfw::s:r")) != -1){
while ((c = getopt(argc, argv, "mfw:s:r")) != -1){
switch (c){
case 'm':
mute = true;
Expand All @@ -34,12 +34,7 @@ int main(int argc, char **argv){
effects = true;
break;
case 'w':
if(optarg == NULL){
lineSize = 30;
}
else{
lineSize = atoi(optarg);
}
lineSize = atoi(optarg);
break;
case 's':
sensitivity = atoi(optarg);
Expand Down

0 comments on commit c76ffa4

Please sign in to comment.