Debian Codegraph @

share/README

raw
1 freedink.ico
2 ============
3
4 (and hence freedink_xpm.c, freedink.png, freedink.svg)
5
6 From the original Dink source package, see src/freedink_xpm.c
7
8 SVG conversion:
9 Copyright (C) 2019 Sylvain Beucler
10
11 This file is part of GNU FreeDink
12
13 GNU FreeDink is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 3 of the License, or (at
16 your option) any later version.
17
18 GNU FreeDink is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
25
26
27 jump.wav, stop.wav
28 ==================
29
30 The original sounds (see below) had unclear origin. I replaced them.
31
32 jump.wav: generated using sfxr
33 (http://www.cyd.liu.se/~tompe573/hp/project_sfxr.html). The parameters
34 are stored in jump.sfxr.
35
36 stop.wav: generated using Audacity and various try&test. As far as I
37 remember I started with a generated drum, reversed it to have 'bumps'
38 at the beginning and the end of the sound, then increased frequency
39 quite a lot, and eventually lowered the volume. The last state of the
40 Audacity project is in stop.aup.
41
42 Legal info:
43 Copyright (C) 2008 Sylvain Beucler
44
45 This file is part of GNU FreeDink
46
47 GNU FreeDink is free software; you can redistribute it and/or modify
48 it under the terms of the GNU General Public License as published by
49 the Free Software Foundation; either version 3 of the License, or (at
50 your option) any later version.
51
52 GNU FreeDink is distributed in the hope that it will be useful, but
53 WITHOUT ANY WARRANTY; without even the implied warranty of
54 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
55 General Public License for more details.
56
57 You should have received a copy of the GNU General Public License
58 along with this program. If not, see <http://www.gnu.org/licenses/>.
59
60
61
62 Extracting wav resources from dinkedit.exe
63 ==========================================
64
65 Dinkedit embedded sound resources in the v1.06 executable.
66
67 The resources were forgotten in v1.07, so if you noticed that sound
68 and application icon were missing, that's the reason :)
69
70 To extract and study them, I went the manual way. You need to get the
71 position and length of the data using a PE/COFF (aka .exe) analyser:
72
73 http://www.mikekohn.net/file_formats/anal_pe.php
74 $ ./anal_pe dinkedit106.exe
75
76 or
77 http://code.google.com/p/pefile/wiki/UsageExamples
78 $ python
79 >>> import pefile
80 >>> pe = pefile.PE('dinkedit106.exe')
81 >>> print pe.dump_info()
82
83
84 First, all data offsets are base memory offsets, not file offsets. You
85 can get the link between the two in the section header:
86 .rsrc
87 VirtualAddress = 0x3B9000 = 3907584 (memory)
88 PointerToRawData = 0x1C800 = 120320 (file)
89
90 Then you can compute the file offset:
91 Resource OffsetToData = 3908016 (memory)
92 => (3908016 - 3907584) + 120320 (file)
93 Size: 3356
94
95 Resource OffsetToData = 3911372 (memory)
96 => (3911372 - 3907584) + 120320 (file)
97 Size: 9196
98
99 (alternatively you can look for 'RIFF' in the file using hexedit :))
100
101
102 Now you can extract your data:
103
104 dd if=dinkedit106.exe of=stop-orig.wav bs=1 skip=120752 count=3356
105 dd if=dinkedit106.exe of=jump.wav bs=1 skip=124108 count=9196
106
107
108 stop-orig.wav has to be re-written using Audacity to make it
109 compatible with SDL_Mixer.