Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit f994072

Browse files
committed
clean up, change name
1 parent b168b53 commit f994072

File tree

4 files changed

+12
-33
lines changed

4 files changed

+12
-33
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
cmake_minimum_required(VERSION 3.0)
22

33

4-
project(S3M2STM)
4+
project(SCREAMVERTER)
55
set(CMAKE_C_STANDARD 99)
66
set(CMAKE_C_EXTENSIONS OFF)
77

8-
add_executable(s3m2stm src/main.c)
8+
add_executable(screamverter src/main.c)
99
# https://stackoverflow.com/a/50882216
1010
if(MSVC)
11-
target_compile_options(s3m2stm PRIVATE /W4)
11+
target_compile_options(screamverter PRIVATE /W4)
1212
else()
13-
target_compile_options(s3m2stm PRIVATE -Wall -Wextra -Wpedantic -Werror -march=native)
13+
target_compile_options(screamverter PRIVATE -Wall -Wextra -Wpedantic -Werror -march=native)
1414
endif()

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# s3m2stm
1+
# Screamverter
22

33
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=plastic)](https://github.com/RichardLitt/standard-readme)
44

5-
A command line tool to downgrade Scream Tracker 3 modules to Scream Tracker 2 (and Scream Tracker Music Interface Kit) modules, written in C99.
5+
A command line tool to downgrade (that being a **very heavy keyword**) Scream Tracker 3 modules to Scream Tracker 2 modules, written in C99.
66

77
## Table of Contents
88

@@ -14,7 +14,7 @@ A command line tool to downgrade Scream Tracker 3 modules to Scream Tracker 2 (a
1414
## Usage
1515

1616
```sh
17-
./s3m2stm input.s3m output.stm
17+
./screamverter [-s] input.s3m output.stm
1818
```
1919

2020
> [!IMPORTANT]
@@ -23,7 +23,7 @@ A command line tool to downgrade Scream Tracker 3 modules to Scream Tracker 2 (a
2323
> - 4 channels preferably (it only converts the first four channels.)
2424
> - Sample sizes cannot exceed 65535 (and no 16-bit samples.)
2525
> - No panning or Adlib, Scream Tracker 2/Scream Tracker Music Interface Kit is mono.
26-
> - Sample names are gonna be truncated heavily to 8.3 filenames, mainly for the purposes of being able to save it to disk.
26+
> - Sample names are gonna truncated heavily to 12 characters if its file name field is blank.
2727
> - You can only use effects A - J, with some caveats with the table shown below.
2828
>
2929
> | Effect | Function in ST2/STMIK - in ST3/others | Notes/Quirks (Effect memory **does not exist** in Scream Tracker 2, so a parameter of 0 will act like a no-op for any effect that normally has it. (e.g. volume slide, portamento slides, vibrato, etc.)) |

src/main.c

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* s3m2stm
2+
* Screamverter
33
* Made by RepellantMold/cs127 under ISC license
44
*
55
* Written in C99
@@ -27,19 +27,13 @@
2727
enum FOC_ReturnCode
2828
{
2929
FOC_SUCCESS = 0x00,
30-
3130
FOC_OPEN_FAILURE = 0x01,
3231
FOC_NOT_S3M_FILE = 0x02,
3332
FOC_MALFORMED_FILE = 0x04,
3433
FOC_CONV_FAILURE = 0x08,
35-
3634
FOC_ALLOC_FAIL = 0x10,
37-
3835
FOC_NO_INPUT = 0x20,
39-
40-
4136
FOC_NO_FILENAMES = 0x40,
42-
4337
FOC_CONVERSION_FAIL = 0x80,
4438
};
4539

@@ -60,20 +54,6 @@ u16 fgetw(FILE *fp)
6054
return (data[1] << 8) | data[0];
6155
}
6256

63-
/*
64-
u32 fgetl(FILE *fp)
65-
{
66-
u8 data[4];
67-
68-
data[0] = (u8)fgetc(fp);
69-
data[1] = (u8)fgetc(fp);
70-
data[2] = (u8)fgetc(fp);
71-
data[3] = (u8)fgetc(fp);
72-
73-
return (data[3] << 24) | (data[2] << 16) | (data[1] << 8) | data[0];
74-
}
75-
*/
76-
7757
void eprintf(const char* format, ...) {
7858
va_list ap;
7959

@@ -119,7 +99,7 @@ void warning_printf(const char* format, ...) {
11999
}
120100

121101
void print_help(void) {
122-
puts("Usage: s3m2stm [options] <inputfile> <outputfile>");
102+
puts("Usage: screamverter [options] <inputfile> <outputfile>");
123103
puts("(C) RepellantMold/cs127, 2024");
124104
puts("Licensed under ISC");
125105
puts("");
@@ -128,7 +108,7 @@ void print_help(void) {
128108
puts(" -v, --verbose Enable extremely verbose output");
129109
puts(" -s, --sanitize Sanitize sample names during conversion, useful for saving them on DOS");
130110
puts(" -stm Convert the S3M to STM (default)");
131-
puts(" -stx Convert the S3M to STX");
111+
puts(" -stx Convert the S3M to STX (not implemented yet)");
132112
}
133113

134114
void handle_sample_headers_s3mtostm(FOC_Context* context, usize sample_count);
@@ -364,6 +344,6 @@ bool check_valid_s3m(FILE *S3Mfile) {
364344

365345
int convert_s3m_to_stx(FOC_Context* context) {
366346
(void)context;
367-
printf("TODO!\n");
347+
printf("This is not implemented yet.\n");
368348
return FOC_SUCCESS;
369349
}

src/main.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,5 @@ void warning_puts(const char* msg);
3131
void warning_printf(const char* format, ...);
3232

3333
static u16 fgetw(FILE *fp);
34-
//static u32 fgetl(FILE *fp);
3534

3635
#endif

0 commit comments

Comments
 (0)