tsoding / nothing

A simple platformer about nothing
MIT License
295 stars 76 forks source link

The colors of Player and Labels are not displayed correctly in the TCC build #1229

Open rexim opened 4 years ago

rexim commented 4 years ago

Introduced in #1228

Steps to reproduce

Observed

The color of the player and labels is just a shade of gray

Expect

The color of the player and labels should be the same as in GCC, CLANG, etc builds.

rexim commented 4 years ago

It's probably this bug:

Nykseli commented 4 years ago

Confirmed that that patch fixes the color bug.

Steps for building the fixed tcc. Only tested on debian 10

sudo apt-get install tcc

# Get the source code tarball from debian
wget http://deb.debian.org/debian/pool/main/t/tcc/tcc_0.9.27.orig.tar.bz2

# extract
tar -xf tcc_0.9.27.orig.tar.bz2 && cd tcc-0.9.27

# get and apply the patch
wget -O fix.patch https://repo.or.cz/tinycc.git/patch/fadfc118e5f8c476000fcf6486c5b530ffaf86da
patch -i fix.patch

# configure and build
./configure --libdir=/usr/lib/x86_64-linux-gnu/tcc/ --tccdir=/usr/lib/x86_64-linux-gnu/tcc/
make -j4

# go to nothing and build
CC=./tcc-0.9.27/tcc \
CFLAGS='-DSDL_DISABLE_IMMINTRIN_H -L/usr/lib/x86_64-linux-gnu/pulseaudio' \
./build-posix.sh

# run and confirm it works
./nothing
rexim commented 4 years ago

@Nykseli thank you so much for verifying that! I guess the only thing to do now is to wait until the fix is actually officially released.