projects
/
fishladder.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
18aa936
)
fixed windows line-endings messing stuff up
author
hgn
<hgodden00@gmail.com>
Fri, 26 Nov 2021 16:22:30 +0000
(16:22 +0000)
committer
hgn
<hgodden00@gmail.com>
Fri, 26 Nov 2021 16:22:30 +0000
(16:22 +0000)
build.sh
patch
|
blob
|
history
fishladder.c
patch
|
blob
|
history
diff --git
a/build.sh
b/build.sh
index ab013e2b2371ec28eaa18311d656abe52d0b7a41..c24169d30f577750c4fc9d3945672f565d78b7e3 100755
(executable)
--- a/
build.sh
+++ b/
build.sh
@@
-83,6
+83,7
@@
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
mkdir build.linux/textures -p
mkdir build.linux/sound -p
mkdir build.linux/maps -p
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
cp $target ./build.linux/$target
cp ./steam/libsteam_api.so ./build.linux/libsteam_api.so
@@
-102,6
+103,7
@@
else
mkdir build.win32/textures -p
mkdir build.win32/sound -p
mkdir build.win32/maps -p
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
cp -r ./textures/ ./build.win32/
cp $target ./build.win32/$target
cp -r ./textures/ ./build.win32/
diff --git
a/fishladder.c
b/fishladder.c
index e7cd191add03093edde65cec9982454be901e139..68f04febd75e54bd42da4c043bf3d956d0503caf 100644
(file)
--- 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 )
break;
+ if( *c == '\r' ) { c ++; continue; } // fuck off windows
+
if( *c == ';' )
{
c ++;
if( *c == ';' )
{
c ++;
-
+
+ if( *c == '\r' ) c ++;
+
// Parse attribs
if( *c != '\n' )
{
while( *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 ];
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( 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
{
}
else
{