ref: 80746e7900d91688eba6c2a3f8bb1164bdb3de73
parent: eba59fdf4448693b73b19ba12a11bff265d4ddfc
author: Russell Rice <[email protected]>
date: Fri Mar 9 21:11:18 EST 2007
Lots of changes/additions: * Add libpcsound codeblocks project * Use libraries that are built and project dependencies inside main chocolate-doom/setup project and remove source files. * libraries are now built in the "lib" top level directory * Fix some warnings Subversion-branch: /trunk/chocolate-doom Subversion-revision: 852
--- a/codeblocks/chocolate-doom.cbp
+++ b/codeblocks/chocolate-doom.cbp
@@ -10,9 +10,8 @@
<Option output="..\bin\chocolate-doom-dbg.exe" prefix_auto="0" extension_auto="0" />
<Option working_dir="..\bin" />
<Option object_output="..\obj\dbg" />
- <Option type="1" />
+ <Option type="0" />
<Option compiler="gcc" />
- <Option use_console_runner="0" />
<Option parameters="-iwad d:\russell\games\doom2\iwad\doom2.wad" />
<Compiler>
<Add option="-W" />
@@ -23,9 +22,8 @@
<Option output="..\bin\chocolate-doom.exe" prefix_auto="0" extension_auto="0" />
<Option working_dir="..\bin" />
<Option object_output="..\obj\rel" />
- <Option type="1" />
+ <Option type="0" />
<Option compiler="gcc" />
- <Option use_console_runner="0" />
<Compiler>
<Add option="-O2" />
</Compiler>
@@ -41,9 +39,10 @@
<Add directory="." />
<Add directory="..\src" />
<Add directory="..\textscreen" />
+ <Add directory="..\pcsound" />
</Compiler>
<Linker>
- <Add option="-lmingw32 -lSDLmain -lSDL -lSDL_mixer -lSDL_net -mwindows" />
+ <Add option="-lpcsound -ltextscreen -lmingw32 -lSDLmain -lSDL -lSDL_mixer -lSDL_net -mwindows" />
</Linker>
<Unit filename="chocolate-doom-res.rc">
<Option compilerVar="WINDRES" />
@@ -340,16 +339,6 @@
<Unit filename="..\src\p_user.c">
<Option compilerVar="CC" />
</Unit>
- <Unit filename="..\src\pcsound\pcsound.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\src\pcsound\pcsound.h" />
- <Unit filename="..\src\pcsound\pcsound_sdl.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\src\pcsound\pcsound_win32.c">
- <Option compilerVar="CC" />
- </Unit>
<Unit filename="..\src\r_bsp.c">
<Option compilerVar="CC" />
</Unit>
@@ -429,76 +418,6 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="..\src\z_zone.h" />
- <Unit filename="..\textscreen\textscreen.h" />
- <Unit filename="..\textscreen\txt_button.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_button.h" />
- <Unit filename="..\textscreen\txt_checkbox.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_checkbox.h" />
- <Unit filename="..\textscreen\txt_desktop.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_desktop.h" />
- <Unit filename="..\textscreen\txt_dropdown.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_dropdown.h" />
- <Unit filename="..\textscreen\txt_font.h" />
- <Unit filename="..\textscreen\txt_gui.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_gui.h" />
- <Unit filename="..\textscreen\txt_inputbox.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_inputbox.h" />
- <Unit filename="..\textscreen\txt_io.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_io.h" />
- <Unit filename="..\textscreen\txt_label.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_label.h" />
- <Unit filename="..\textscreen\txt_main.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_main.h" />
- <Unit filename="..\textscreen\txt_radiobutton.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_radiobutton.h" />
- <Unit filename="..\textscreen\txt_separator.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_separator.h" />
- <Unit filename="..\textscreen\txt_spinctrl.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_spinctrl.h" />
- <Unit filename="..\textscreen\txt_strut.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_strut.h" />
- <Unit filename="..\textscreen\txt_table.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_table.h" />
- <Unit filename="..\textscreen\txt_widget.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_widget.h" />
- <Unit filename="..\textscreen\txt_window.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_window.h" />
- <Unit filename="..\textscreen\txt_window_action.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_window_action.h" />
<Extensions>
<code_completion />
</Extensions>
--- a/codeblocks/chocolate-doom.workspace
+++ b/codeblocks/chocolate-doom.workspace
@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="chocolate-doom">
- <Project filename="chocolate-doom.cbp" active="1" />
+ <Project filename="chocolate-doom.cbp" active="1">
+ <Depends filename="textscreen.cbp" />
+ <Depends filename="libpcsound.cbp" />
+ </Project>
<Project filename="chocolate-server.cbp" />
+ <Project filename="chocolate-setup.cbp">
+ <Depends filename="textscreen.cbp" />
+ </Project>
<Project filename="textscreen.cbp" />
- <Project filename="chocolate-setup.cbp" />
+ <Project filename="libpcsound.cbp" />
</Workspace>
</CodeBlocks_workspace_file>
--- a/codeblocks/chocolate-server.cbp
+++ b/codeblocks/chocolate-server.cbp
@@ -10,9 +10,8 @@
<Option output="..\bin\chocolate-server-dbg.exe" prefix_auto="0" extension_auto="0" />
<Option working_dir="..\bin" />
<Option object_output="..\obj\dbg" />
- <Option type="1" />
+ <Option type="0" />
<Option compiler="gcc" />
- <Option use_console_runner="0" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
@@ -22,9 +21,8 @@
<Option output="..\bin\chocolate-server.exe" prefix_auto="0" extension_auto="0" />
<Option working_dir="..\bin" />
<Option object_output="..\obj\rel" />
- <Option type="1" />
+ <Option type="0" />
<Option compiler="gcc" />
- <Option use_console_runner="0" />
<Compiler>
<Add option="-O2" />
</Compiler>
--- a/codeblocks/chocolate-setup.cbp
+++ b/codeblocks/chocolate-setup.cbp
@@ -10,9 +10,8 @@
<Option output="..\bin\chocolate-setup-dbg.exe" prefix_auto="0" extension_auto="0" />
<Option working_dir="..\bin" />
<Option object_output="..\obj\dbg\" />
- <Option type="1" />
+ <Option type="0" />
<Option compiler="gcc" />
- <Option use_console_runner="0" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
@@ -22,9 +21,8 @@
<Option output="..\bin\chocolate-setup.exe" prefix_auto="0" extension_auto="0" />
<Option working_dir="..\bin" />
<Option object_output="..\obj\rel\" />
- <Option type="1" />
+ <Option type="0" />
<Option compiler="gcc" />
- <Option use_console_runner="0" />
<Compiler>
<Add option="-O2" />
</Compiler>
@@ -44,7 +42,7 @@
<Add directory="..\textscreen" />
</Compiler>
<Linker>
- <Add option="-lmingw32 -lSDLmain -lSDL -mwindows" />
+ <Add option="-ltextscreen -lmingw32 -lSDLmain -lSDL -mwindows" />
<Add directory="..\bin" />
</Linker>
<Unit filename="chocolate-setup-res.rc">
@@ -97,76 +95,6 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="..\setup\txt_mouseinput.h" />
- <Unit filename="..\textscreen\textscreen.h" />
- <Unit filename="..\textscreen\txt_button.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_button.h" />
- <Unit filename="..\textscreen\txt_checkbox.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_checkbox.h" />
- <Unit filename="..\textscreen\txt_desktop.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_desktop.h" />
- <Unit filename="..\textscreen\txt_dropdown.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_dropdown.h" />
- <Unit filename="..\textscreen\txt_font.h" />
- <Unit filename="..\textscreen\txt_gui.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_gui.h" />
- <Unit filename="..\textscreen\txt_inputbox.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_inputbox.h" />
- <Unit filename="..\textscreen\txt_io.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_io.h" />
- <Unit filename="..\textscreen\txt_label.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_label.h" />
- <Unit filename="..\textscreen\txt_main.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_main.h" />
- <Unit filename="..\textscreen\txt_radiobutton.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_radiobutton.h" />
- <Unit filename="..\textscreen\txt_separator.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_separator.h" />
- <Unit filename="..\textscreen\txt_spinctrl.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_spinctrl.h" />
- <Unit filename="..\textscreen\txt_strut.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_strut.h" />
- <Unit filename="..\textscreen\txt_table.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_table.h" />
- <Unit filename="..\textscreen\txt_widget.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_widget.h" />
- <Unit filename="..\textscreen\txt_window.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_window.h" />
- <Unit filename="..\textscreen\txt_window_action.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\textscreen\txt_window_action.h" />
<Extensions>
<code_completion />
</Extensions>
--- /dev/null
+++ b/codeblocks/libpcsound.cbp
@@ -1,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+ <FileVersion major="1" minor="6" />
+ <Project>
+ <Option title="libpcsound" />
+ <Option pch_mode="2" />
+ <Option compiler="gcc" />
+ <Build>
+ <Target title="Debug">
+ <Option output="..\lib\libpcsound-dbg.a" prefix_auto="1" extension_auto="1" />
+ <Option working_dir="" />
+ <Option object_output="..\obj\libpcsound\dbg" />
+ <Option type="2" />
+ <Option compiler="gcc" />
+ <Compiler>
+ <Add option="-g" />
+ </Compiler>
+ </Target>
+ <Target title="Release">
+ <Option output="..\lib\libpcsound.a" prefix_auto="1" extension_auto="1" />
+ <Option working_dir="" />
+ <Option object_output="..\obj\libpcsound\release" />
+ <Option type="2" />
+ <Option compiler="gcc" />
+ <Compiler>
+ <Add option="-O2" />
+ </Compiler>
+ <Linker>
+ <Add option="-s" />
+ </Linker>
+ </Target>
+ </Build>
+ <VirtualTargets>
+ <Add alias="All" targets="Debug-dyn;Release-dyn;Debug-stc;Release-stc;" />
+ </VirtualTargets>
+ <Compiler>
+ <Add option="-Wall" />
+ <Add directory="." />
+ </Compiler>
+ <Linker>
+ <Add option="-lmingw32 -lSDLmain -lSDL -lSDL_mixer -lSDL_net -mwindows" />
+ </Linker>
+ <Unit filename="..\pcsound\pcsound.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Unit filename="..\pcsound\pcsound.h" />
+ <Unit filename="..\pcsound\pcsound_linux.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Unit filename="..\pcsound\pcsound_sdl.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Unit filename="..\pcsound\pcsound_win32.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Extensions>
+ <code_completion />
+ </Extensions>
+ </Project>
+</CodeBlocks_project_file>
--- a/codeblocks/textscreen.cbp
+++ b/codeblocks/textscreen.cbp
@@ -2,14 +2,14 @@
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
- <Option title="textscreen" />
+ <Option title="libtextscreen" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug-dyn">
- <Option output="..\bin\lib\libtextscreen-dbg.dll" prefix_auto="0" extension_auto="0" />
+ <Option output="..\lib\libtextscreen-dbg.dll" prefix_auto="0" extension_auto="0" />
<Option working_dir="..\bin" />
- <Option object_output="..\obj\dbg-dyn" />
+ <Option object_output="..\obj\libtextscreen\dbg-dyn" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
@@ -20,9 +20,9 @@
</Compiler>
</Target>
<Target title="Release-dyn">
- <Option output="..\bin\lib\libtextscreen.dll" prefix_auto="0" extension_auto="0" />
+ <Option output="..\lib\libtextscreen.dll" prefix_auto="0" extension_auto="0" />
<Option working_dir="..\bin" />
- <Option object_output="..\obj\rel-dyn" />
+ <Option object_output="..\obj\libtextscreen\rel-dyn" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
@@ -35,9 +35,9 @@
</Linker>
</Target>
<Target title="Debug-stc">
- <Option output="..\bin\lib\libtextscreen-dbg.a" prefix_auto="0" extension_auto="0" />
+ <Option output="..\lib\libtextscreen-dbg.a" prefix_auto="0" extension_auto="0" />
<Option working_dir="" />
- <Option object_output="..\obj\dbg-stc" />
+ <Option object_output="..\obj\libtextscreen\dbg-stc" />
<Option type="2" />
<Option compiler="gcc" />
<Option createDefFile="1" />
@@ -47,9 +47,9 @@
</Compiler>
</Target>
<Target title="Release-stc">
- <Option output="..\bin\lib\libtextscreen.a" prefix_auto="0" extension_auto="0" />
+ <Option output="..\lib\libtextscreen.a" prefix_auto="0" extension_auto="0" />
<Option working_dir="" />
- <Option object_output="..\obj\rel-stc" />
+ <Option object_output="..\obj\libtextscreen\rel-stc" />
<Option type="2" />
<Option compiler="gcc" />
<Option createDefFile="1" />
--- a/src/d_iwad.c
+++ b/src/d_iwad.c
@@ -190,7 +190,7 @@
static void CheckUninstallStrings(void)
{
- int i;
+ unsigned int i;
for (i=0; i<sizeof(uninstall_values) / sizeof(*uninstall_values); ++i)
{
@@ -226,7 +226,7 @@
{
char *install_path;
char *subpath;
- int i;
+ unsigned int i;
install_path = GetRegistryString(&collectors_edition_value);
@@ -783,7 +783,7 @@
void D_FindInstalledIWADs(void)
{
- int i;
+ unsigned int i;
int result;
BuildIWADDirList();
--- a/src/i_pcsound.c
+++ b/src/i_pcsound.c
@@ -84,7 +84,7 @@
// for a full discussion of this.
// Check we don't overflow the frequency table.
- if (tone < NUM_FREQUENCIES)
+ if (tone < (int)NUM_FREQUENCIES)
{
*freq = (int) frequencies[tone];
}
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -189,7 +189,7 @@
static boolean CacheSFX(int sound)
{
int lumpnum;
- int lumplen;
+ unsigned int lumplen;
int samplerate;
unsigned int length;
unsigned int expanded_length;
--- a/src/net_gui.c
+++ b/src/net_gui.c
@@ -155,7 +155,7 @@
static void PrintMD5Digest(char *s, byte *digest)
{
- int i;
+ unsigned int i;
printf("%s: ", s);