Index of /pkgsrc/DevTerm-R01/ChocolateDuke3D/
Name | Last Modified | Size | Type |
../ | | - | Directory |
All/ | 2024-Jul-06 17:06:50 | - | Directory |
README.txt | 2024-Jun-20 21:03:49 | 1.4K | text/plain; charset=utf-8 |
______ _ _ _ _ _____ _
| _ \ | | | \ | | | | |____ | | |
| | | |_ _| | _____ | \| |_ _| | _____ _ __ ___ / / __| |
| | | | | | | |/ / _ \ | . ` | | | | |/ / _ \ '_ ` _ \ \ \/ _` |
| |/ /| |_| | < __/ | |\ | |_| | < __/ | | | | | .___/ / (_| |
|___/ \__,_|_|\_\___| \_| \_/\__,_|_|\_\___|_| |_| |_| \____/ \__,_|
----------------------------------------------------------------------------
Original sources used https://github.com/rohit-n/chocolate_duke3D
Fixed SDL 1.2 issue in Engine/src/display.c to build on pkgsrc and riscv64
//CODE EXPLORATION
//Used only to write the last palette to file.
memcpy(lastPalette, palettebuffer, 768);
for (i = 0; i < 256; i++){
sdlp->b = (Uint8) ((((float) *p++) / 63.0) * 255.0);
sdlp->g = (Uint8) ((((float) *p++) / 63.0) * 255.0);
sdlp->r = (Uint8) ((((float) *p++) / 63.0) * 255.0);
sdlp->unused = *p++; /* This byte is unused in BUILD, too. */
sdlp++;
Installation (make sure you have bootsrapped pkgsrc) :
export PATH=$PATH:/usr/pkg/bin
export PATH=$PATH:/usr/pkg/sbin
PKG_PATH="http://astr0baby.online/riscv64/DevTerm-R01/All"
export PKG_PATH
pkg_add cduke
# Download DukeNukem3D data to some directory and extract it
# On the Devterm R01 the best performance is with the following options
export SDL_AUDIODRIVER=disk
export SDL_DISKAUDIOFILE=/dev/null
/usr/pkg/bin/chocolate-duke3d