Bye bye tools, nobody is going to miss them

This commit is contained in:
KiritoDv
2023-10-04 21:47:19 -06:00
parent cf1d8dadc6
commit cd9063f292
118 changed files with 0 additions and 69735 deletions
-17
View File
@@ -1,17 +0,0 @@
/aifc_decode
/aiff_extract_codebook
/armips
/extract_data_for_mio
/mio0
/n64cksum
/n64graphics
/n64graphics_ci
/patch_elf_32bit
/skyconv
/tabledesign
/textconv
/vadpcm_enc
!/ido5.3_compiler/lib/*.so
!/ido5.3_compiler/usr/lib/*.so
!/ido5.3_compiler/usr/lib/*.so.1
!/ido5.3_compiler/**/*.o
-87
View File
@@ -1,87 +0,0 @@
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
project(sm64-tmp VERSION 0.1.0 LANGUAGES C CXX)
if (MSVC)
find_path(DIRENT_INCLUDE_DIRS "dirent.h")
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${DIRENT_INCLUDE_DIRS})
else()
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
endif()
if (MSVC)
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_CURRENT_SOURCE_DIR} )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_CURRENT_SOURCE_DIR} )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_CURRENT_SOURCE_DIR} )
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
endif()
set(mio0_SOURCES libmio0.c)
add_executable(mio0 ${mio0_SOURCES})
target_compile_definitions(mio0 PUBLIC MIO0_STANDALONE)
set(n64cksum_SOURCES n64cksum.c utils.c)
add_executable(n64cksum ${n64cksum_SOURCES})
target_compile_definitions(n64cksum PUBLIC N64CKSUM_STANDALONE)
set(textconv_SOURCES textconv.c utf8.c hashtable.c)
add_executable(textconv ${textconv_SOURCES})
set(patch_elf_32bit_SOURCES patch_elf_32bit.c)
add_executable(patch_elf_32bit ${patch_elf_32bit_SOURCES})
set(aifc_decode_SOURCES aifc_decode.c)
add_executable(aifc_decode ${aifc_decode_SOURCES})
set(aiff_extract_codebook_SOURCES aiff_extract_codebook.c)
add_executable(aiff_extract_cookbook ${aiff_extract_codebook_SOURCES})
add_dependencies(aiff_extract_cookbook tabledesign)
file(GLOB_RECURSE AUDIOFILE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} audiofile/*.cpp audiofile/*.h)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/audiofile)
add_library(audiofile STATIC ${AUDIOFILE_FILES})
set_target_properties(audiofile PROPERTIES CXX_STANDARD 11)
#tabledesign: $(LIBAUDIOFILE)
set(tabledesign_SOURCES sdk-tools/tabledesign/codebook.c sdk-tools/tabledesign/estimate.c sdk-tools/tabledesign/print.c sdk-tools/tabledesign/getopt.c sdk-tools/tabledesign/tabledesign.c)
#tabledesign_CFLAGS := -Iaudiofile -Wno-uninitialized
#tabledesign_LDFLAGS := -Laudiofile -laudiofile -lstdc++
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/audiofile)
if (MSVC)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/audiofile/include-windows)
endif()
add_executable(tabledesign ${tabledesign_SOURCES})
target_link_libraries(tabledesign PUBLIC audiofile)
if(MSVC)
find_path(GETOPT_INCLUDE_DIR getopt.h)
find_library(GETOPT_LIB getopt)
set(WINLIBS ${GETOPT_LIB} )
endif()
set(vadpcm_enc_SOURCES sdk-tools/adpcm/vadpcm_enc.c sdk-tools/adpcm/vpredictor.c sdk-tools/adpcm/quant.c sdk-tools/adpcm/util.c sdk-tools/adpcm/vencode.c)
#vadpcm_enc_CFLAGS := -Wno-unused-result -Wno-uninitialized -Wno-sign-compare -Wno-absolute-value
add_executable(vadpcm_enc ${vadpcm_enc_SOURCES})
target_link_libraries(vadpcm_enc PRIVATE ${WINLIBS})
target_include_directories(vadpcm_enc PRIVATE ${GETOPT_INCLUDE_DIR})
set(extract_data_for_mio_SOURCES extract_data_for_mio.c)
add_executable(extract_data_for_mio ${extract_data_for_mio_SOURCES})
# tools required for extract_assets.py
add_custom_target(Tools
DEPENDS
aifc_decode
mio0
)
-83
View File
@@ -1,83 +0,0 @@
include ../util.mk
HOST_ENV := $(shell uname 2>/dev/null || echo Unknown)
HOST_ENV := $(patsubst MINGW%,MinGW,$(HOST_ENV))
CC := gcc
CXX := g++
CFLAGS := -I . -Wall -Wextra -Wno-unused-parameter -pedantic -O2 -s
LDFLAGS := -lm
ALL_PROGRAMS := armips n64graphics n64graphics_ci mio0 n64cksum textconv patch_elf_32bit aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv
LIBAUDIOFILE := audiofile/libaudiofile.a
# Only build armips from tools if it is not found on the system
ifeq ($(call find-command,armips),)
BUILD_PROGRAMS := $(ALL_PROGRAMS)
else
BUILD_PROGRAMS := $(filter-out armips,$(ALL_PROGRAMS))
endif
default: all
n64graphics_SOURCES := n64graphics.c utils.c
n64graphics_CFLAGS := -DN64GRAPHICS_STANDALONE
n64graphics_ci_SOURCES := n64graphics_ci_dir/n64graphics_ci.c n64graphics_ci_dir/exoquant/exoquant.c n64graphics_ci_dir/utils.c
mio0_SOURCES := libmio0.c
mio0_CFLAGS := -DMIO0_STANDALONE
n64cksum_SOURCES := n64cksum.c utils.c
n64cksum_CFLAGS := -DN64CKSUM_STANDALONE
textconv_SOURCES := textconv.c utf8.c hashtable.c
patch_elf_32bit_SOURCES := patch_elf_32bit.c
aifc_decode_SOURCES := aifc_decode.c
aiff_extract_codebook_SOURCES := aiff_extract_codebook.c
tabledesign: $(LIBAUDIOFILE)
tabledesign_SOURCES := sdk-tools/tabledesign/codebook.c sdk-tools/tabledesign/estimate.c sdk-tools/tabledesign/print.c sdk-tools/tabledesign/tabledesign.c
tabledesign_CFLAGS := -Iaudiofile -Wno-uninitialized
tabledesign_LDFLAGS := -Laudiofile -laudiofile -lstdc++
vadpcm_enc_SOURCES := sdk-tools/adpcm/vadpcm_enc.c sdk-tools/adpcm/vpredictor.c sdk-tools/adpcm/quant.c sdk-tools/adpcm/util.c sdk-tools/adpcm/vencode.c
vadpcm_enc_CFLAGS := -Wno-unused-result -Wno-uninitialized -Wno-sign-compare -Wno-absolute-value
extract_data_for_mio_SOURCES := extract_data_for_mio.c
skyconv_SOURCES := skyconv.c n64graphics.c utils.c
armips: CC := $(CXX)
armips_SOURCES := armips.cpp
armips_CFLAGS := -std=c++11 -fno-exceptions -fno-rtti -pipe
armips_LDFLAGS := -pthread
ifeq ($(HOST_ENV),MinGW)
armips_LDFLAGS += -municode
endif
all-except-recomp: $(LIBAUDIOFILE) $(BUILD_PROGRAMS)
all: all-except-recomp ido5.3_recomp
clean:
$(RM) $(ALL_PROGRAMS)
$(MAKE) -C audiofile clean
$(MAKE) -C ido5.3_recomp clean
define COMPILE
$(1): $($1_SOURCES)
$$(CC) $(CFLAGS) $($1_CFLAGS) $$^ -o $$@ $($1_LDFLAGS) $(LDFLAGS)
endef
ido5.3_recomp:
$(MAKE) -C ido5.3_recomp
$(foreach p,$(BUILD_PROGRAMS),$(eval $(call COMPILE,$(p))))
$(LIBAUDIOFILE):
@$(MAKE) -C audiofile
.PHONY: all all-except-recomp clean default ido5.3_recomp
-681
View File
File diff suppressed because it is too large Load Diff
-191
View File
@@ -1,191 +0,0 @@
/**
* Create an ADPCM codebook either by extracting it from an AIFF section, or
* by executing tabledesign.
*/
#include <unistd.h>
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
typedef short s16;
typedef int s32;
typedef unsigned char u8;
typedef unsigned int u32;
#ifdef _MSC_VER
#define __builtin_bswap16 _byteswap_ushort
#define __builtin_bswap32 _byteswap_ulong
#define NORETURN
#define UNUSED
#else
#define NORETURN __attribute__((noreturn))
#define UNUSED __attribute__((unused))
#endif
#define BSWAP16(x) x = __builtin_bswap16(x)
#define BSWAP32(x) x = __builtin_bswap32(x)
typedef struct
{
u32 start;
u32 end;
u32 count;
s16 state[16];
} ALADPCMloop;
static const char usage[] = "input.aiff";
static const char *progname, *infilename;
#define checked_fread(a, b, c, d) if (fread(a, b, c, d) != c) fail_parse("error parsing file")
NORETURN
void fail_parse(const char *fmt, ...)
{
char *formatted = NULL;
va_list ap;
va_start(ap, fmt);
int size = vsnprintf(NULL, 0, fmt, ap);
va_end(ap);
if (size >= 0) {
size++;
formatted = malloc(size);
if (formatted != NULL) {
va_start(ap, fmt);
size = vsnprintf(formatted, size, fmt, ap);
va_end(ap);
if (size < 0) {
free(formatted);
formatted = NULL;
}
}
}
if (formatted != NULL) {
fprintf(stderr, "%s: %s [%s]\n", progname, formatted, infilename);
free(formatted);
}
exit(1);
}
s32 readaifccodebook(FILE *fhandle, s32 ****table, s16 *order, s16 *npredictors)
{
checked_fread(order, sizeof(s16), 1, fhandle);
BSWAP16(*order);
checked_fread(npredictors, sizeof(s16), 1, fhandle);
BSWAP16(*npredictors);
*table = malloc(*npredictors * sizeof(s32 **));
for (s32 i = 0; i < *npredictors; i++) {
(*table)[i] = malloc(8 * sizeof(s32 *));
for (s32 j = 0; j < 8; j++) {
(*table)[i][j] = malloc((*order + 8) * sizeof(s32));
}
}
for (s32 i = 0; i < *npredictors; i++) {
s32 **table_entry = (*table)[i];
for (s32 j = 0; j < *order; j++) {
for (s32 k = 0; k < 8; k++) {
s16 ts;
checked_fread(&ts, sizeof(s16), 1, fhandle);
BSWAP16(ts);
table_entry[k][j] = ts;
}
}
for (s32 k = 1; k < 8; k++) {
table_entry[k][*order] = table_entry[k - 1][*order - 1];
}
table_entry[0][*order] = 1 << 11;
for (s32 k = 1; k < 8; k++) {
s32 j = 0;
for (; j < k; j++) {
table_entry[j][k + *order] = 0;
}
for (; j < 8; j++) {
table_entry[j][k + *order] = table_entry[j - k][*order];
}
}
}
return 0;
}
int main(int argc, char **argv)
{
s16 order = -1;
s16 npredictors = -1;
s32 ***coefTable = NULL;
FILE *ifile;
progname = argv[0];
if (argc < 2) {
fprintf(stderr, "%s %s\n", progname, usage);
exit(1);
}
infilename = argv[1];
if ((ifile = fopen(infilename, "rb")) == NULL) {
fail_parse("AIFF file could not be opened");
exit(1);
}
char buf[5] = {0};
checked_fread(buf, 4, 1, ifile);
if (strcmp(buf, "FORM") != 0) fail_parse("not an AIFF file");
checked_fread(buf, 4, 1, ifile);
checked_fread(buf, 4, 1, ifile);
if (strcmp(buf, "AIFF") != 0 && strcmp(buf, "AIFC") != 0) {
fail_parse("not an AIFF file");
}
for (;;) {
s32 size;
if (!fread(buf, 4, 1, ifile) || !fread(&size, 4, 1, ifile)) break;
BSWAP32(size);
s32 nextOffset = ftell(ifile) + ((size + 1) & ~1);
if (strcmp(buf, "APPL") == 0) {
checked_fread(buf, 4, 1, ifile);
if (strcmp(buf, "stoc") == 0) {
u8 len;
checked_fread(&len, 1, 1, ifile);
if (len == 11) {
char chunkName[12];
s16 version;
checked_fread(chunkName, 11, 1, ifile);
chunkName[11] = '\0';
if (strcmp(chunkName, "VADPCMCODES") == 0) {
checked_fread(&version, sizeof(s16), 1, ifile);
BSWAP16(version);
if (version == 1) {
readaifccodebook(ifile, &coefTable, &order, &npredictors);
}
}
}
}
}
fseek(ifile, nextOffset, SEEK_SET);
}
fclose(ifile);
if (coefTable == NULL) {
execl("./tools/tabledesign", "tabledesign", "-s", "1", infilename, NULL);
} else {
printf("%d\n%d\n", order, npredictors);
for (s32 i = 0; i < npredictors; i++) {
for (s32 j = 0; j < order; j++) {
for (s32 k = 0; k < 8; k++) {
printf("% 5d ", coefTable[i][k][j]);
}
puts("");
}
}
}
return 0;
}
-27
View File
@@ -1,27 +0,0 @@
#!/bin/sh
#
# apply_patch.sh - Applies an enhancement patch
#
if [ "$#" -ne 1 ]
then
echo "Usage: $0 patch_file"
echo ' Applies a patch file to the current directory'
exit 1
fi
read -p "Do you wish to apply the patch '$1'? [Y/N] " response
case "$response" in
Y|y)
patch -p1 < "$1"
;;
N|n)
echo 'Quit'
exit 1
;;
*)
echo "Invalid response '$response'."
exit 1
;;
esac
-19906
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-36
View File
@@ -1,36 +0,0 @@
#!/usr/bin/env python3
import sys
import os
import shlex
import subprocess
import tempfile
dir_path = os.path.dirname(os.path.realpath(__file__))
asm_processor = ['python3', os.path.join(dir_path, "asm-processor.py")]
prelude = os.path.join(dir_path, "prelude.inc")
all_args = sys.argv[1:]
sep1 = all_args.index('--')
sep2 = all_args.index('--', sep1+1)
compiler = all_args[:sep1]
assembler = all_args[sep1+1:sep2]
assembler_sh = ' '.join(shlex.quote(x) for x in assembler)
compile_args = all_args[sep2+1:]
in_file = compile_args[-1]
out_ind = compile_args.index('-o')
out_file = compile_args[out_ind + 1]
del compile_args[-1]
del compile_args[out_ind + 1]
del compile_args[out_ind]
in_dir = os.path.split(os.path.realpath(in_file))[0]
opt_flags = [x for x in compile_args if x in ['-g', '-O2', '-O1', '-framepointer']]
preprocessed_file = tempfile.NamedTemporaryFile(prefix='preprocessed', suffix='.c')
subprocess.check_call(asm_processor + opt_flags + [in_file], stdout=preprocessed_file)
subprocess.check_call(compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name])
subprocess.check_call(asm_processor + opt_flags + [in_file, '--post-process', out_file, '--assembler', assembler_sh, '--asm-prelude', prelude])
-5
View File
@@ -1,5 +0,0 @@
.set noat
.set noreorder
.set gp=64
.include "macros.inc"
File diff suppressed because it is too large Load Diff
-12
View File
@@ -1,12 +0,0 @@
CXX := g++
libaudiofile.a: audiofile.o
$(AR) rcs $@ $^
audiofile.o: audiofile.cpp audiofile.h aupvlist.h
$(CXX) -std=c++11 -O2 -I. -c $< -o $@
clean:
$(RM) audiofile.o libaudiofile.a
.PHONY: clean
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-68
View File
@@ -1,68 +0,0 @@
/*
Audio File Library
Copyright (C) 1998-2000, Michael Pruett <michael@68k.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
/*
aupvlist.h
This file contains the interface to the parameter value list data
structures and routines.
*/
#ifndef AUPVLIST_H
#define AUPVLIST_H
#ifdef __cplusplus
extern "C" {
#endif
#if (defined(__GNUC__) && __GNUC__ >= 4) || defined(__clang__)
#define AFAPI __attribute__((visibility("default")))
#else
#define AFAPI
#endif
enum
{
AU_PVTYPE_LONG = 1,
AU_PVTYPE_DOUBLE = 2,
AU_PVTYPE_PTR = 3
};
typedef struct _AUpvlist *AUpvlist;
#define AU_NULL_PVLIST ((struct _AUpvlist *) 0)
AFAPI AUpvlist AUpvnew (int maxItems);
AFAPI int AUpvgetmaxitems (AUpvlist);
AFAPI int AUpvfree (AUpvlist);
AFAPI int AUpvsetparam (AUpvlist, int item, int param);
AFAPI int AUpvsetvaltype (AUpvlist, int item, int type);
AFAPI int AUpvsetval (AUpvlist, int item, void *val);
AFAPI int AUpvgetparam (AUpvlist, int item, int *param);
AFAPI int AUpvgetvaltype (AUpvlist, int item, int *type);
AFAPI int AUpvgetval (AUpvlist, int item, void *val);
#undef AFAPI
#ifdef __cplusplus
}
#endif
#endif /* AUPVLIST_H */
-51
View File
@@ -1,51 +0,0 @@
#ifdef _WIN32
#ifndef _UNISTD_H
#define _UNISTD_H 1
/* This is intended as a drop-in replacement for unistd.h on Windows.
* Please add functionality as needed.
* https://stackoverflow.com/a/826027/1202830
*/
#include <stdlib.h>
#include <io.h>
//#include <getopt.h> /* getopt at: https://gist.github.com/ashelly/7776712 */
#include <process.h> /* for getpid() and the exec..() family */
#include <direct.h> /* for _getcwd() and _chdir() */
#define srandom srand
#define random rand
/* Values for the second argument to access.
These may be OR'd together. */
#define R_OK 4 /* Test for read permission. */
#define W_OK 2 /* Test for write permission. */
//#define X_OK 1 /* execute permission - unsupported in windows*/
#define F_OK 0 /* Test for existence. */
#define access _access
#define dup2 _dup2
#define execve _execve
#define ftruncate _chsize
#define unlink _unlink
#define fileno _fileno
#define getcwd _getcwd
#define chdir _chdir
#define isatty _isatty
#define lseek _lseek
/* read, write, and close are NOT being #defined here, because while there are file handle specific versions for Windows, they probably don't work for sockets. You need to look at your app and consider whether to call e.g. closesocket(). */
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
/* should be in some equivalent to <sys/types.h> */
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
#endif /* unistd.h */
#endif
-45
View File
@@ -1,45 +0,0 @@
#!/bin/bash
# Given a list of header files, compute the bss index that results from
# including them. (See prevent_bss_reordering.h for more information.)
TEMPC=$(mktemp -t bss.XXXXXXX.c)
TEMPO=$(mktemp -t bss.XXXXXXX.o)
trap "rm -f $TEMPC $TEMPO" EXIT
set -e
if [[ $# = 0 ]]; then
echo "Usage: ./tools/calc_bss.sh file1.h file2.h ..." >&2
exit 1
fi
if [ -z "$QEMU_IRIX" ]; then
echo "env variable QEMU_IRIX should point to the qemu-mips binary" >&2
exit 1
fi
if [ -z "$CROSS" ]; then
CROSS=mips-linux-gnu-
fi
# bss indexing starts at 3
for I in {3..255}; do
echo "char bss$I;" >> $TEMPC
done
for I in {0..2}; do
echo "char bss$I;" >> $TEMPC
done
while [[ $# -gt 0 ]]; do
echo "#include \"$1\"" >> $TEMPC
shift
done
echo "char measurement;" >> $TEMPC
$QEMU_IRIX -silent -L $IRIX_ROOT $IRIX_ROOT/usr/bin/cc -c -non_shared -G 0 \
-g -Xcpluscomm -mips2 -I $(pwd)/include/ $TEMPC -o $TEMPO
LINE=$(${CROSS}objdump -t $TEMPO | grep measurement | cut -d' ' -f1)
NUM=$((0x$LINE - 1))
echo "bss index: $NUM"
-38
View File
@@ -1,38 +0,0 @@
#!/usr/bin/env bash
# Use clang-tidy to brace if statements and loops. This should be a feature of clang-format.
# The brace check is the only check being applied right now,
# but other checks (like naming scheme) may be added at a later time.
# '--fix-errors` due to generated text_strings.h as well as the enhancement inc.c files
TIDY_OPTS="-p . --fix --fix-errors"
COMPILER_OPTS="-nostdinc -fno-builtin -std=gnu90 -Iinclude -Isrc -D_LANGUAGE_C"
VERSIONS="-DVERSION_US -DVERSION_JP -DVERSION_EU"
# run script from the root of the repository
cd "$( dirname $0 )" >/dev/null 2>&1; cd ../
if (( $# > 0 )); then
printf "Tidy file(s) $*"
echo
for VER in ${VERSIONS}; do
echo "with compiler version flag ${VER}"
clang-tidy ${TIDY_OPTS} "$@" -- ${COMPILER_OPTS} ${VER}
done
printf "Done tidying file(s) $*"
echo
exit
fi
echo "Tidying all C files for all versions. This will take a bit"
for VER in ${VERSIONS}; do
echo "Tidying for compiler version flag ${VER}"
# Don't run clang-tidy on behaviors
clang-tidy ${TIDY_OPTS} src/audio/*.c -- ${COMPILER_OPTS} ${VER}
clang-tidy ${TIDY_OPTS} src/engine/*.c -- ${COMPILER_OPTS} ${VER}
clang-tidy ${TIDY_OPTS} src/game/*.c -- ${COMPILER_OPTS} ${VER}
clang-tidy ${TIDY_OPTS} src/goddard/*.c -- ${COMPILER_OPTS} ${VER}
clang-tidy ${TIDY_OPTS} lib/src/*.c -- ${COMPILER_OPTS} ${VER}
clang-tidy ${TIDY_OPTS} enhancements/*.inc.c -- ${COMPILER_OPTS} ${VER}
done
echo "Done tidying all C files. Hope you did something fun during the tidying"
-26
View File
@@ -1,26 +0,0 @@
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("FILE", help="the name of the file that you wish to dump", type=str)
args = parser.parse_args()
try:
with open(args.FILE, "rb") as f:
n = 0
b = f.read(16)
while b:
s1 = ",".join([f"0x{i:02x}" for i in b]) # hex string
#s1 = s1[0:23] + " " + s1[23:] # insert extra space between groups of 8 hex values
s2 = "".join([chr(i) if 32 <= i <= 127 else "." for i in b]) # ascii string; chained comparison
print(s1 + ",", end="")
n += 1
b = f.read(16)
print()
except Exception as e:
print(__file__, ": ", type(e).__name__, " - ", e, sep="", file=sys.stderr)
-25
View File
@@ -1,25 +0,0 @@
#!/bin/sh
#
# create_patch.sh - Creates an enhancement patch based on the current Git changes
#
if [ "$#" -ne 1 ]
then
echo "Usage: $0 patch_file"
echo ' Creates a patch file based on the changes made to the current directory'
exit 1
fi
# Make sure this is a git repository
if [ ! -d .git ]
then
echo 'Error: The current directory is not a Git repository.'
exit 1
fi
# 'git diff' is stupid and doesn't show new untracked files, so we must add them first.
git add .
# Generate the patch.
git diff -p --staged > "$1"
# Undo the 'git add'.
git reset

Some files were not shown because too many files have changed in this diff Show More