Skip to content

Instantly share code, notes, and snippets.

@kolen
Created January 14, 2019 18:07
Show Gist options
  • Save kolen/f383572d99fcdf91edc027269a6ac003 to your computer and use it in GitHub Desktop.
Save kolen/f383572d99fcdf91edc027269a6ac003 to your computer and use it in GitHub Desktop.
Testing of utils from quake 2 engine
~/items/qengine/build % mv quake2.pal palette.pal
~/items/qengine/build % tools/pcx2wal quake2-generated-colormap.pcx
PCX2WAL (c) Iikka Keränen 1997-1998
1 texture to be converted...
quake2-generated-colormap.pcx ... quake2-generated-colormap saved as quake2-generated-colormap.wal
~/items/qengine/build % ls -l quake2-generated-colormap.wal
-rw-r--r-- 1 kolen staff 108900 14 янв 21:06 quake2-generated-colormap.wal
~/items/qengine/build % ln -s ~/Downloads/COLORMAP.PCX colormap.pcx
~/items/qengine/build % tools/16to8
32 to go...
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Saving 16to8.dat
~/items/qengine/build % shasum 16to8.dat
d08fa25c15d8973181542e37e7c0c1aab7262407 16to8.dat
~/items/qengine/build % tools/pcx2pal ~/.quake2/baseq2/pics/colormap.pcx quake2.pal
~/items/qengine/build % ls -l quake2.pal
-rw-r--r-- 1 kolen staff 768 14 янв 20:56 quake2.pal
~/items/qengine/build % tools/colormap quake2.pal quake2-generated-colormap.pcx
Colormap.exe by Iikka Keränen 1998
Saving as quake2-generated-colormap.pcx...
~/items/qengine/build % diff ~/.quake2/baseq2/pics/colormap.pcx quake2-generated-colormap.pcx
Binary files /Users/kolen/.quake2/baseq2/pics/colormap.pcx and quake2-generated-colormap.pcx differ
# They differ when comparing as layers in Gimp too
# Generated file: https://imgur.com/a/0xQOXxe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment