diff options
author | Russell Rice | 2007-03-10 02:11:18 +0000 |
---|---|---|
committer | Russell Rice | 2007-03-10 02:11:18 +0000 |
commit | 80746e7900d91688eba6c2a3f8bb1164bdb3de73 (patch) | |
tree | 9b2d0da14604829e9f5307593c53f4dfa57b0f9a | |
parent | eba59fdf4448693b73b19ba12a11bff265d4ddfc (diff) | |
download | chocolate-doom-80746e7900d91688eba6c2a3f8bb1164bdb3de73.tar.gz chocolate-doom-80746e7900d91688eba6c2a3f8bb1164bdb3de73.tar.bz2 chocolate-doom-80746e7900d91688eba6c2a3f8bb1164bdb3de73.zip |
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
-rw-r--r-- | codeblocks/chocolate-doom.cbp | 89 | ||||
-rw-r--r-- | codeblocks/chocolate-doom.workspace | 10 | ||||
-rw-r--r-- | codeblocks/chocolate-server.cbp | 6 | ||||
-rw-r--r-- | codeblocks/chocolate-setup.cbp | 78 | ||||
-rw-r--r-- | codeblocks/libpcsound.cbp | 60 | ||||
-rw-r--r-- | codeblocks/textscreen.cbp | 18 | ||||
-rw-r--r-- | src/d_iwad.c | 6 | ||||
-rw-r--r-- | src/i_pcsound.c | 2 | ||||
-rw-r--r-- | src/i_sound.c | 2 | ||||
-rw-r--r-- | src/net_gui.c | 2 |
10 files changed, 92 insertions, 181 deletions
diff --git a/codeblocks/chocolate-doom.cbp b/codeblocks/chocolate-doom.cbp index 414970de..25a964c6 100644 --- 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> diff --git a/codeblocks/chocolate-doom.workspace b/codeblocks/chocolate-doom.workspace index b183d89d..b602372e 100644 --- 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> diff --git a/codeblocks/chocolate-server.cbp b/codeblocks/chocolate-server.cbp index 003b7530..270f24d2 100644 --- 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> diff --git a/codeblocks/chocolate-setup.cbp b/codeblocks/chocolate-setup.cbp index 0a65407b..1200e839 100644 --- 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> diff --git a/codeblocks/libpcsound.cbp b/codeblocks/libpcsound.cbp new file mode 100644 index 00000000..36b78bc4 --- /dev/null +++ b/codeblocks/libpcsound.cbp @@ -0,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> diff --git a/codeblocks/textscreen.cbp b/codeblocks/textscreen.cbp index 2755800a..ce6d70c9 100644 --- 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" /> diff --git a/src/d_iwad.c b/src/d_iwad.c index 25d62ea0..ef68ced9 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -190,7 +190,7 @@ static char *GetRegistryString(registry_value_t *reg_val) static void CheckUninstallStrings(void) { - int i; + unsigned int i; for (i=0; i<sizeof(uninstall_values) / sizeof(*uninstall_values); ++i) { @@ -226,7 +226,7 @@ static void CheckCollectorsEdition(void) { char *install_path; char *subpath; - int i; + unsigned int i; install_path = GetRegistryString(&collectors_edition_value); @@ -783,7 +783,7 @@ void D_SetGameDescription(void) void D_FindInstalledIWADs(void) { - int i; + unsigned int i; int result; BuildIWADDirList(); diff --git a/src/i_pcsound.c b/src/i_pcsound.c index d9b76eec..0dced9c1 100644 --- a/src/i_pcsound.c +++ b/src/i_pcsound.c @@ -84,7 +84,7 @@ void PCSCallbackFunc(int *duration, int *freq) // 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]; } diff --git a/src/i_sound.c b/src/i_sound.c index 16d8ce7f..33a4cf1c 100644 --- a/src/i_sound.c +++ b/src/i_sound.c @@ -189,7 +189,7 @@ static void ExpandSoundData(byte *data, int samplerate, int length, static boolean CacheSFX(int sound) { int lumpnum; - int lumplen; + unsigned int lumplen; int samplerate; unsigned int length; unsigned int expanded_length; diff --git a/src/net_gui.c b/src/net_gui.c index 9ebec568..9816346b 100644 --- a/src/net_gui.c +++ b/src/net_gui.c @@ -155,7 +155,7 @@ static void UpdateGUI(void) static void PrintMD5Digest(char *s, byte *digest) { - int i; + unsigned int i; printf("%s: ", s); |