This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
INSTALLER_PATH="$1" | |
print_usage () { | |
echo "Usage: " | |
echo " $0 /path/to/setup_daikatana_2.0.0.3.exe" | |
} | |
print_bug_info () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Daikatana .wal format is similar to Quake2, but supports a palette per texture | |
(even if it's not always used, see below) and 9 mipmap levels instead of 4. | |
If you wanna check whether a .wal is in daikatana or q2 format, check whether | |
the first byte is == 3 (daikatana) or > 32 (ASCII ' '; then it's likely Quake2) | |
because in Quake2 it's the name which should start with a printable ASCII char. | |
Having 9 MipMap levels implies that for many textures, the last levels will be | |
1x1 pixels... Daikatana itself stops loading more mipmaps once the last loaded | |
one has a width or height of 1. | |
Each mipmap level has half the width and height of the previous one. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* All function names and corresponding pointer-to-function-types | |
* from the OpenAL headers, wrapped in a magic macro so it can be used for whatever. | |
* | |
* Idea for the magic X macro from Walter Bright: | |
* http://www.drdobbs.com/cpp/the-x-macro/228700289 | |
* | |
* To use this, you have to #define the AL_X_MAGIC(fn, fnptrt) | |
* macro for the AL_H_FUNCS and ALC_H_FUNCS and the | |
* ALEXT_X_MAGIC(fn, fnptrt, ext) macro for the ALEXT_H_FUNCS and EFX_H_FUNCS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is mostly generated by Visual Studio 2013, I marked all places I changed/added with // DG: ... | |
// this probably doesn't build as is; I didn't know how to create a portable Visual Studio "solution" | |
// or which parts of the project folder are relevant.. | |
// when running this, you can quit with Alt+F4 | |
// TestMouseWarp.cpp : Defines the entry point for the application. | |
// | |
#include <windowsx.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -Wall -o warptest `sdl2-config --cflags` warptest.c `sdl2-config --libs` | |
#include <stdio.h> | |
#include <SDL.h> | |
static FILE* outfile = NULL; | |
static void UpdateWinTitle(int accumX, int accumY, SDL_Window* win) | |
{ | |
char buf[128]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GOG music/Track02.ogg to Track11.ogg => baseq2/music/02.ogg .. 11.ogg | |
Track12.ogg .. Track21.ogg => rogue/music/02.ogg .. 11.ogg | |
For xatrix it's like to following | |
(xatrix track number => Q2/Ground Zero(GZ) Track number => GOG Track number) | |
02 => Q2:09 => Track09 | |
03 => GZ:03 => Track13 | |
04 => GZ:04 => Track14 | |
05 => Q2:07 => Track07 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* (C) 2019 Daniel Gibson | |
* | |
* This software is dual-licensed to the public domain and under the following | |
* license: you are granted a perpetual, irrevocable license to copy, modify, | |
* publish, and distribute this file as you see fit. | |
* No warranty implied; use at your own risk. | |
*/ | |
#include <stdlib.h> // size_t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// can be built with: | |
// $ gcc -o sdl2test `sdl2-config --cflags` sdl_fullscreentest.c `sdl2-config --libs` | |
// will try to create a fullscreen window with 1920x1080 by default, | |
// but accepts commandline arguments to use a different resolution, like | |
// $ ./sdl2test 2560 1440 | |
// will create testlog.txt and write some info there | |
#include <SDL.h> | |
#include <unistd.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Encodes a given file to png using stb_image_write, miniz, lodepng and libpng | |
* | |
* Useful to compare the compression ratios achievable with the different encoders. | |
* Blog post with results: http://wp.me/pEPJ4-5U | |
* | |
* Needs: | |
* - stb_image.h and stb_image_write.h from https://github.com/nothings/stb | |
* - lodepng.c and lodepng.h from http://lodev.org/lodepng/ | |
* - miniz.c from https://github.com/richgel999/miniz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8.11) | |
# this can be used to test if both SDL2_LIBRARIES/SDL2_INCLUDE_DIRS | |
# and SDL2::SDL2/SDL2::SDL2main can be used to build an SDL2 application | |
# it also prints all properties of SDL2::SDL2 and SDL2::SDL2main and the | |
# values of SDL2_LIBRARIES/SDL2_LIBDIR/SDL2_INCLUDEDIRS | |
# you might have to disable printing the properties, see comment around line 66 | |
project(SDL2Test) |