1 (* Copyright (C) Doom 2D: Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, version 3 of the License ONLY.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 *)
15 {$INCLUDE ../shared/a_modes.inc}
18 interface
22 type
23 // a WAV loader that just uses SDL_LoadWAV
26 public
33 private
39 public
45 implementation
47 uses
48 {$IFDEF USE_SDL}
49 SDL,
50 {$ELSE}
51 SDL2,
52 {$ENDIF}
55 (* TWAVLoaderFactory *)
58 var
60 begin
62 begin
64 exit;
67 Result := ((P+0)^ = Ord('R')) and ((P+1)^ = Ord('I')) and ((P+2)^ = Ord('F')) and ((P+3)^ = Ord('F'));
71 begin
72 // TODO: ehhh
77 begin
81 (* TWAVLoader *)
83 var
88 begin
93 {$IFDEF USE_SDL2}
95 {$ELSE}
97 {$ENDIF}
98 begin
100 end
101 else
102 begin
104 {$IFDEF USE_SDL2}
106 {$ELSE}
108 {$ENDIF}
120 var
125 begin
131 begin
133 exit;
136 {$IFDEF USE_SDL2}
138 {$ELSE}
140 {$ENDIF}
141 begin
143 end
144 else
145 begin
147 {$IFDEF USE_SDL2}
149 {$ELSE}
151 {$ENDIF}
163 begin
168 begin
172 begin
175 end
176 else
181 begin
187 begin
192 initialization