From: hgn Date: Fri, 26 Nov 2021 18:16:06 +0000 (+0000) Subject: Merge branch 'master' of harrygodden.com:/home/fishladder X-Git-Url: https://harrygodden.com/git/?a=commitdiff_plain;h=b68e3832a078dc6a4a3c8c4670632148c8288bf8;hp=72e9a469a490e537f2e12464c1b075eb8991a868;p=fishladder.git Merge branch 'master' of harrygodden.com:/home/fishladder --- diff --git a/build.sh b/build.sh index a6a260a..c22ad79 100755 --- a/build.sh +++ b/build.sh @@ -92,6 +92,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then mkdir build.linux/textures -p mkdir build.linux/sound -p mkdir build.linux/maps -p + mkdir build.linux/sav -p cp $target ./build.linux/$target cp ./steam/libsteam_api.so ./build.linux/libsteam_api.so @@ -112,6 +113,7 @@ else mkdir build.win32/textures -p mkdir build.win32/sound -p mkdir build.win32/maps -p + mkdir build.win32/sav -p cp $target ./build.win32/$target rm -r ./build.win32/textures diff --git a/fishladder.c b/fishladder.c index e7cd191..68f04fe 100644 --- a/fishladder.c +++ b/fishladder.c @@ -314,15 +314,21 @@ static int map_load( const char *str, const char *name ) if( !*c ) break; + if( *c == '\r' ) { c ++; continue; } // fuck off windows + if( *c == ';' ) { c ++; - + + if( *c == '\r' ) c ++; + // Parse attribs if( *c != '\n' ) { while( *c ) { + if( *c == '\r' ) { c ++; continue; } + if( reg_start < reg_end ) { struct cell_terminal *terminal = &world.io[ reg_start ]; @@ -736,12 +742,12 @@ static int console_changelevel( int argc, char const *argv[] ) if( argc >= 1 ) { // Save current level - if( console_save_map( 0, NULL ) ) - if( console_load_map( argc, argv ) ) - { - simulation_stop(); - return 1; - } + console_save_map( 0, NULL ); + if( console_load_map( argc, argv ) ) + { + simulation_stop(); + return 1; + } } else {