sotn-decomp/include/settings.h
Luciano Ciccariello 151346d62c
Update clang-format as self-contained binary (#1257)
Version 18.1.6 pulled from
https://github.com/xeeynamo/sotn-decomp/releases and compiled with the
following:

```Dockerfile
FROM alpine:latest
RUN apk add --no-cache \
    build-base \
    cmake \
    git \
    ninja \
    libstdc++ \
    zlib-dev \
    python3
ENV LLVM_VERSION=llvmorg-18.1.6
RUN mkdir -p /opt/llvm \
    && cd /opt/llvm \
    && git clone --depth=1 --branch $LLVM_VERSION https://github.com/llvm/llvm-project.git \
    && mkdir -p llvm-project/build \
    && cd llvm-project/build \
    && cmake -G Ninja \
        -DLLVM_ENABLE_PROJECTS=clang \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_CXX_FLAGS="-static-libstdc++ -static-libgcc" \
        -DCMAKE_EXE_LINKER_FLAGS="-static" \
        -DLLVM_ENABLE_RTTI=ON \
        ../llvm \
    && ninja clang-format \
    && strip bin/clang-format
FROM scratch
COPY --from=0 /opt/llvm/llvm-project/build/bin/clang-format /clang-format
ENTRYPOINT ["/usr/local/bin/clang-format"]
```
`docker build --output . .`

Original source code:
https://github.com/llvm/llvm-project/tree/llvmorg-18.1.6
commit: `1118c2e05e67a36ed8ca250524525cdb66a55256`
2024-06-04 21:07:50 +01:00

19 lines
610 B
C

// Set custom values to override the original game values
// Enable some micro optimizations to make the code more efficient
#define USE_MICRO_OPTIMIZATIONS 0
// The PSX allows to select which speed to use when reading from the disk.
// The two modes are Normal and Double. The normal uses 1x speed at 150kB/s
// while the double uses the 2x speed at 300kB/s.
#define USE_CD_SPEED_DOUBLE 0
#if USE_MICRO_OPTIMIZATIONS == 0
// use the slower memcpy from the PSX SDK
#define MEMCPY memcpy
#else
// use a much faster memcpy
#define MEMCPY fast_memcpy
// TODO not sure where to store the new fast_memcpy
#endif