Descent3 icon indicating copy to clipboard operation
Descent3 copied to clipboard

Fix endline characters

Open GravisZro opened this issue 10 months ago • 4 comments

Replace \r\n with \n.

#!/bin/sh
for filename in $(find)
do
  encoding=$(file -b --mime-encoding $filename)
  if [ "$encoding" = "us-ascii" ] ||
     [ "$encoding" = "iso-8859-1" ]; then
    echo fixing ${filename}
    sed 's/\r$//' ${filename} > ${filename}.lf
    mv ${filename}.lf ${filename}
done

Fixes #129

GravisZro avatar Apr 22 '24 17:04 GravisZro

The file encodings are not altered by this patch.

GravisZro avatar Apr 22 '24 18:04 GravisZro

Needs Windows testing to make sure levels are generated properly without CRLF

Lgt2x avatar Apr 23 '24 08:04 Lgt2x

@Lgt2x By properly generated do you mean the game or the editor?

GravisZro avatar Apr 23 '24 16:04 GravisZro

the game when creating the HOGs

Lgt2x avatar Apr 23 '24 17:04 Lgt2x

I just played through Level 5 with this build, I think it's fine.

JeodC avatar Apr 24 '24 22:04 JeodC