summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-27 18:32:26 +0000
committereathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-27 18:32:26 +0000
commit306819ac6682ae2a814531c6990193bdfd120c23 (patch)
treee2b07f6d8768dd5f6dfdee4283573f34758098db /src
parent65544f2659ecec6d399f23037347e19571da24ab (diff)
downloadhercules-306819ac6682ae2a814531c6990193bdfd120c23.tar.gz
hercules-306819ac6682ae2a814531c6990193bdfd120c23.tar.bz2
hercules-306819ac6682ae2a814531c6990193bdfd120c23.tar.xz
hercules-306819ac6682ae2a814531c6990193bdfd120c23.zip
* Merged changes up to eAthena 15050.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15287 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/common/grfio.c8
-rw-r--r--src/map/map.c43
2 files changed, 39 insertions, 12 deletions
diff --git a/src/common/grfio.c b/src/common/grfio.c
index 57e942892..88642cfe5 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -825,11 +825,15 @@ void grfio_init(const char* fname)
continue; // skip unrecognized lines
// Entry table reading
- if( strcmp(w1, "grf") == 0 ) { // GRF file
+ if( strcmp(w1, "grf") == 0 ) // GRF file
+ {
if( grfio_add(w2) == 0 )
++grf_num;
- } else if( strcmp(w1,"data_dir") == 0 ) // Data directory
+ }
+ else if( strcmp(w1,"data_dir") == 0 ) // Data directory
+ {
safestrncpy(data_dir, w2, sizeof(data_dir));
+ }
}
fclose(data_conf);
diff --git a/src/map/map.c b/src/map/map.c
index 3800cb992..30fb4fc28 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3644,36 +3644,59 @@ int do_init(int argc, char *argv[])
arg++;
if( strcmp(arg, "help") == 0 )
+ {
map_helpscreen(true);
+ }
else if( strcmp(arg, "version") == 0 )
+ {
map_versionscreen(true);
- else if( strcmp(arg, "map-config") == 0 ) {
+ }
+ else if( strcmp(arg, "map-config") == 0 )
+ {
if( map_arg_next_value(arg, i, argc) )
MAP_CONF_NAME = argv[++i];
- } else if( strcmp(arg, "battle-config") == 0 ) {
+ }
+ else if( strcmp(arg, "battle-config") == 0 )
+ {
if( map_arg_next_value(arg, i, argc) )
BATTLE_CONF_FILENAME = argv[++i];
- } else if( strcmp(arg, "atcommand-config") == 0 ) {
+ }
+ else if( strcmp(arg, "atcommand-config") == 0 )
+ {
if( map_arg_next_value(arg, i, argc) )
ATCOMMAND_CONF_FILENAME = argv[++i];
- } else if( strcmp(arg, "script-config") == 0 ) {
+ }
+ else if( strcmp(arg, "script-config") == 0 )
+ {
if( map_arg_next_value(arg, i, argc) )
SCRIPT_CONF_NAME = argv[++i];
- } else if( strcmp(arg, "msg-config") == 0 ) {
+ }
+ else if( strcmp(arg, "msg-config") == 0 )
+ {
if( map_arg_next_value(arg, i, argc) )
MSG_CONF_NAME = argv[++i];
- } else if( strcmp(arg, "grf-path-file") == 0 ) {
+ }
+ else if( strcmp(arg, "grf-path-file") == 0 )
+ {
if( map_arg_next_value(arg, i, argc) )
GRF_PATH_FILENAME = argv[++i];
- } else if( strcmp(arg, "inter-config") == 0 ) {
+ }
+ else if( strcmp(arg, "inter-config") == 0 )
+ {
if( map_arg_next_value(arg, i, argc) )
INTER_CONF_NAME = argv[++i];
- } else if( strcmp(arg, "log-config") == 0 ) {
+ }
+ else if( strcmp(arg, "log-config") == 0 )
+ {
if( map_arg_next_value(arg, i, argc) )
LOG_CONF_NAME = argv[++i];
- } else if( strcmp(arg, "run-once") == 0 ) // close the map-server as soon as its done.. for testing [Celest]
+ }
+ else if( strcmp(arg, "run-once") == 0 ) // close the map-server as soon as its done.. for testing [Celest]
+ {
runflag = CORE_ST_STOP;
- else {
+ }
+ else
+ {
ShowError("Unknown option '%s'.\n", argv[i]);
exit(EXIT_FAILURE);
}