From 4143fd0b82ac29a8ab0ee4359dd68075f3dffd53 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 21 Mar 2012 01:54:03 +0000 Subject: [PATCH] Removed duplicate includes and renamed File class. --- common/algebra.cpp | 1 - common/camera.cpp | 3 +-- common/globals.h | 1 - common/group.cpp | 2 +- common/im_bmp.cpp | 3 +-- common/im_gif.cpp | 3 +-- common/im_jpg.cpp | 3 +-- common/im_png.cpp | 3 +-- common/image.cpp | 3 +-- common/keyboard.cpp | 2 +- common/lc_application.cpp | 1 - common/{file.cpp => lc_file.cpp} | 4 +--- common/{file.h => lc_file.h} | 2 -- common/library.cpp | 3 +-- common/library.h | 1 - common/light.cpp | 1 - common/matrix.cpp | 1 - common/minifig.h | 3 +-- common/object.cpp | 2 +- common/piece.h | 1 - common/pieceinf.cpp | 2 -- common/project.cpp | 1 - common/project.h | 7 +++---- common/system.h | 1 - common/terrain.cpp | 3 +-- common/terrain.h | 2 -- common/texfont.cpp | 2 +- common/texture.cpp | 2 +- common/texture.h | 1 - common/typedefs.h | 1 - common/vector.cpp | 1 - tools/setup/leocad.nsi | 5 +++++ win/Leocad.cpp | 1 - win/Prefpage.cpp | 1 - win/Prefsht.cpp | 1 - win/Propspgs.cpp | 1 - win/Propspgs.h | 2 -- win/System.cpp | 3 +-- win/Tools.cpp | 1 - win/aboutdlg.cpp | 1 - win/leocad.vcxproj | 4 ++-- win/leocad.vcxproj.filters | 12 ++++++------ 42 files changed, 32 insertions(+), 66 deletions(-) rename common/{file.cpp => lc_file.cpp} (99%) rename common/{file.h => lc_file.h} (98%) diff --git a/common/algebra.cpp b/common/algebra.cpp index 03bb836d..ef351a9c 100644 --- a/common/algebra.cpp +++ b/common/algebra.cpp @@ -4,7 +4,6 @@ #include "lc_global.h" #include -#include "defines.h" #include "algebra.h" // ============================================================================ diff --git a/common/camera.cpp b/common/camera.cpp index 79d344ca..b9b02672 100644 --- a/common/camera.cpp +++ b/common/camera.cpp @@ -6,10 +6,9 @@ #include #include "opengl.h" #include "globals.h" -#include "defines.h" #include "vector.h" #include "matrix.h" -#include "file.h" +#include "lc_file.h" #include "camera.h" #include "tr.h" diff --git a/common/globals.h b/common/globals.h index 6f6daa16..45b64032 100644 --- a/common/globals.h +++ b/common/globals.h @@ -1,7 +1,6 @@ #ifndef _GLOBALS_H_ #define _GLOBALS_H_ -#include "defines.h" #include "typedefs.h" #include "console.h" diff --git a/common/group.cpp b/common/group.cpp index 46757d66..d55daa16 100644 --- a/common/group.cpp +++ b/common/group.cpp @@ -4,7 +4,7 @@ #include "lc_global.h" #include #include "group.h" -#include "file.h" +#include "lc_file.h" ///////////////////////////////////////////////////////////////////////////// // Group construction/destruction diff --git a/common/im_bmp.cpp b/common/im_bmp.cpp index a66c8361..e7df89c5 100755 --- a/common/im_bmp.cpp +++ b/common/im_bmp.cpp @@ -1,10 +1,9 @@ #include "lc_global.h" #include #include -#include "config.h" #include "quant.h" #include "image.h" -#include "file.h" +#include "lc_file.h" // ======================================================== diff --git a/common/im_gif.cpp b/common/im_gif.cpp index 16355a51..f133b7bf 100644 --- a/common/im_gif.cpp +++ b/common/im_gif.cpp @@ -3,8 +3,7 @@ #include #include "image.h" #include "quant.h" -#include "file.h" -#include "config.h" +#include "lc_file.h" // ============================================================================= diff --git a/common/im_jpg.cpp b/common/im_jpg.cpp index cb671296..f713ca9e 100644 --- a/common/im_jpg.cpp +++ b/common/im_jpg.cpp @@ -1,9 +1,8 @@ #include "lc_global.h" #include #include -#include "config.h" #include "image.h" -#include "file.h" +#include "lc_file.h" #ifdef LC_HAVE_JPEGLIB diff --git a/common/im_png.cpp b/common/im_png.cpp index 0b003fa7..566d4221 100755 --- a/common/im_png.cpp +++ b/common/im_png.cpp @@ -1,8 +1,7 @@ #include "lc_global.h" #include -#include "config.h" #include "image.h" -#include "file.h" +#include "lc_file.h" #ifdef LC_HAVE_PNGLIB diff --git a/common/image.cpp b/common/image.cpp index 60cf4258..6d8f3d06 100644 --- a/common/image.cpp +++ b/common/image.cpp @@ -13,9 +13,8 @@ #include #include #include -#include "config.h" #include "image.h" -#include "file.h" +#include "lc_file.h" // ============================================================================= // Image functions diff --git a/common/keyboard.cpp b/common/keyboard.cpp index fc816503..c5b0e20a 100644 --- a/common/keyboard.cpp +++ b/common/keyboard.cpp @@ -6,7 +6,7 @@ #include #include "system.h" #include "keyboard.h" -#include "file.h" +#include "lc_file.h" #include "str.h" // ============================================================================ diff --git a/common/lc_application.cpp b/common/lc_application.cpp index 7241f166..81f11b2b 100644 --- a/common/lc_application.cpp +++ b/common/lc_application.cpp @@ -4,7 +4,6 @@ #include "library.h" #include "system.h" #include "console.h" -#include "config.h" #include "opengl.h" #include "project.h" #include "image.h" diff --git a/common/file.cpp b/common/lc_file.cpp similarity index 99% rename from common/file.cpp rename to common/lc_file.cpp index 4ac6803f..e1bb1cca 100644 --- a/common/file.cpp +++ b/common/lc_file.cpp @@ -7,9 +7,7 @@ #include #include #include -#include "file.h" -#include "defines.h" -#include "config.h" +#include "lc_file.h" #include "str.h" // ============================================================================= diff --git a/common/file.h b/common/lc_file.h similarity index 98% rename from common/file.h rename to common/lc_file.h index a6495d85..23ab2254 100644 --- a/common/file.h +++ b/common/lc_file.h @@ -3,8 +3,6 @@ #include #include -#include "defines.h" -#include "config.h" class String; diff --git a/common/library.cpp b/common/library.cpp index d674156c..60923910 100755 --- a/common/library.cpp +++ b/common/library.cpp @@ -5,10 +5,9 @@ #include "lc_global.h" #include #include "library.h" -#include "file.h" +#include "lc_file.h" #include "texture.h" #include "pieceinf.h" -#include "config.h" #include "image.h" #include "system.h" #include "console.h" diff --git a/common/library.h b/common/library.h index 3bff9a49..8df81233 100755 --- a/common/library.h +++ b/common/library.h @@ -1,7 +1,6 @@ #ifndef _LIBRARY_H_ #define _LIBRARY_H_ -#include "defines.h" #include "str.h" #include "array.h" diff --git a/common/light.cpp b/common/light.cpp index f0ea2d70..7d276447 100644 --- a/common/light.cpp +++ b/common/light.cpp @@ -6,7 +6,6 @@ #include #include #include "light.h" -#include "defines.h" #include "globals.h" #include "vector.h" #include "matrix.h" diff --git a/common/matrix.cpp b/common/matrix.cpp index 78bd4f07..da98a7a3 100644 --- a/common/matrix.cpp +++ b/common/matrix.cpp @@ -7,7 +7,6 @@ #include #include #include "matrix.h" -#include "defines.h" // ============================================================================= // static functions diff --git a/common/minifig.h b/common/minifig.h index 73357ddb..d5423a41 100644 --- a/common/minifig.h +++ b/common/minifig.h @@ -2,7 +2,6 @@ #define _MINIFIG_H_ #include "glwindow.h" -#include "file.h" #include "algebra.h" #include "array.h" @@ -55,7 +54,7 @@ public: bool LoadMinifig (const char* name); void DeleteMinifig (const char* name); - void ParseSettings(File& Settings); + void ParseSettings(class File& Settings); ObjArray mSettings[LC_MFW_NUMITEMS]; diff --git a/common/object.cpp b/common/object.cpp index db1fd670..d48ab6dc 100755 --- a/common/object.cpp +++ b/common/object.cpp @@ -10,7 +10,7 @@ #include "object.h" #include "matrix.h" #include "vector.h" -#include "file.h" +#include "lc_file.h" #include "lc_application.h" #define LC_KEY_SAVE_VERSION 1 // LeoCAD 0.73 diff --git a/common/piece.h b/common/piece.h index 1bfa7a94..2e8bf21b 100644 --- a/common/piece.h +++ b/common/piece.h @@ -9,7 +9,6 @@ class PieceInfo; #include "object.h" #include "globals.h" #include "typedefs.h" -#include "defines.h" #define LC_PIECE_HIDDEN 0x01 #define LC_PIECE_SELECTED 0x02 diff --git a/common/pieceinf.cpp b/common/pieceinf.cpp index 6d4a09eb..a88b6941 100644 --- a/common/pieceinf.cpp +++ b/common/pieceinf.cpp @@ -13,8 +13,6 @@ #include "globals.h" #include "matrix.h" #include "vector.h" -#include "defines.h" -#include "config.h" #include "library.h" #include "lc_application.h" diff --git a/common/project.cpp b/common/project.cpp index 896ee209..4edbcf2c 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -23,7 +23,6 @@ #include "system.h" #include "globals.h" #include "minifig.h" -#include "config.h" #include "message.h" #include "curve.h" #include "mainwnd.h" diff --git a/common/project.h b/common/project.h index f77e36d5..8eb9bf7f 100644 --- a/common/project.h +++ b/common/project.h @@ -2,7 +2,6 @@ #define _PROJECT_H_ #include "object.h" -#include "defines.h" #include "typedefs.h" #include "opengl.h" #include "array.h" @@ -44,15 +43,15 @@ class TexFont; // Undo support -#include "file.h" +#include "lc_file.h" -typedef struct LC_UNDOINFO +struct LC_UNDOINFO { FileMem file; char strText[21]; LC_UNDOINFO* pNext; LC_UNDOINFO() { pNext = NULL; }; -} LC_UNDOINFO; +}; class Project { diff --git a/common/system.h b/common/system.h index d567b20a..16b38830 100755 --- a/common/system.h +++ b/common/system.h @@ -1,7 +1,6 @@ #ifndef _SYSTEM_H_ #define _SYSTEM_H_ -#include "defines.h" #include "typedefs.h" // Assert macros. diff --git a/common/terrain.cpp b/common/terrain.cpp index 30d76995..a26afb5d 100644 --- a/common/terrain.cpp +++ b/common/terrain.cpp @@ -7,9 +7,8 @@ #include #include #include "opengl.h" -#include "defines.h" #include "terrain.h" -#include "file.h" +#include "lc_file.h" #include "camera.h" #include "matrix.h" #include "system.h" diff --git a/common/terrain.h b/common/terrain.h index fabedefe..be088f74 100644 --- a/common/terrain.h +++ b/common/terrain.h @@ -5,8 +5,6 @@ #ifndef _TERRAIN_H_ #define _TERRAIN_H_ -#include "defines.h" - class File; class Camera; class Texture; diff --git a/common/texfont.cpp b/common/texfont.cpp index 5d432c41..9e619a68 100644 --- a/common/texfont.cpp +++ b/common/texfont.cpp @@ -8,7 +8,7 @@ #include "texfont.h" #include "texture.h" #include "library.h" -#include "file.h" +#include "lc_file.h" #include "lc_application.h" #define LC_TEXFONT_FILE_VERSION 1 // LeoCAD 0.74 diff --git a/common/texture.cpp b/common/texture.cpp index e6df49c9..e79a9613 100644 --- a/common/texture.cpp +++ b/common/texture.cpp @@ -5,7 +5,7 @@ #include #include #include "opengl.h" -#include "file.h" +#include "lc_file.h" #include "texture.h" #include "project.h" #include "globals.h" diff --git a/common/texture.h b/common/texture.h index fe19555a..0544375e 100644 --- a/common/texture.h +++ b/common/texture.h @@ -8,7 +8,6 @@ class File; #include "opengl.h" -#include "config.h" typedef enum { LC_INTENSITY, LC_RGB, LC_RGBA } LC_TEXTURE_TYPES; diff --git a/common/typedefs.h b/common/typedefs.h index 2814926e..247c99cb 100644 --- a/common/typedefs.h +++ b/common/typedefs.h @@ -9,7 +9,6 @@ class Piece; class PieceInfo; class Camera; -#include "defines.h" #include "str.h" #include "algebra.h" diff --git a/common/vector.cpp b/common/vector.cpp index cf1801f9..b992322e 100644 --- a/common/vector.cpp +++ b/common/vector.cpp @@ -1,7 +1,6 @@ #include "lc_global.h" #include #include "vector.h" -#include "defines.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction diff --git a/tools/setup/leocad.nsi b/tools/setup/leocad.nsi index 9c3a0f1d..8f7c0249 100644 --- a/tools/setup/leocad.nsi +++ b/tools/setup/leocad.nsi @@ -24,6 +24,8 @@ !define MUI_ICON "setup.ico" !define MUI_UNICON "setup.ico" + SetCompressor /SOLID lzma + ;-------------------------------- ;Interface Settings @@ -67,6 +69,9 @@ Section "LeoCAD" SecLeoCAD ;Store installation folder WriteRegStr HKCU "Software\BT Software\LeoCAD" "InstallPath" $INSTDIR + ; Overwrite old Pieces Library path. + WriteRegStr HKCU "Software\BT Software\LeoCAD\Settings" "PiecesLibrary" $INSTDIR + CreateShortCut "$SMPROGRAMS\LeoCAD.lnk" "$INSTDIR\LeoCAD.exe" ;Create uninstaller diff --git a/win/Leocad.cpp b/win/Leocad.cpp index a0b1aa19..6561983a 100644 --- a/win/Leocad.cpp +++ b/win/Leocad.cpp @@ -10,7 +10,6 @@ #include "globals.h" #include "system.h" #include "pieceinf.h" // TODO: remove -#include "config.h" #include "mainwnd.h" #include "library.h" #include "keyboard.h" diff --git a/win/Prefpage.cpp b/win/Prefpage.cpp index cb611cdb..77a14600 100644 --- a/win/Prefpage.cpp +++ b/win/Prefpage.cpp @@ -3,7 +3,6 @@ #include "PrefPage.h" #include "Tools.h" #include "MainFrm.h" -#include "defines.h" #include "keyboard.h" #ifdef _DEBUG diff --git a/win/Prefsht.cpp b/win/Prefsht.cpp index 0f028782..342ce5ed 100644 --- a/win/Prefsht.cpp +++ b/win/Prefsht.cpp @@ -1,7 +1,6 @@ #include "lc_global.h" #include "resource.h" #include "PrefSht.h" -#include "defines.h" #ifdef _DEBUG #undef THIS_FILE diff --git a/win/Propspgs.cpp b/win/Propspgs.cpp index d13bc1c1..af1e61d3 100644 --- a/win/Propspgs.cpp +++ b/win/Propspgs.cpp @@ -1,7 +1,6 @@ #include "lc_global.h" #include "resource.h" #include "PropsPgs.h" -#include "defines.h" #ifdef _DEBUG #undef THIS_FILE diff --git a/win/Propspgs.h b/win/Propspgs.h index a6b475e1..c1e91bcc 100644 --- a/win/Propspgs.h +++ b/win/Propspgs.h @@ -4,8 +4,6 @@ #ifndef __PROPSPGS_H__ #define __PROPSPGS_H__ -#include "defines.h" - ///////////////////////////////////////////////////////////////////////////// // CPropertiesGeneral dialog diff --git a/win/System.cpp b/win/System.cpp index 39cdd30e..c48ea957 100644 --- a/win/System.cpp +++ b/win/System.cpp @@ -3,10 +3,9 @@ #include #include "leocad.h" #include "system.h" -#include "defines.h" #include "camera.h" #include "tools.h" -#include "file.h" +#include "lc_file.h" #include "image.h" #include "PieceBar.h" #include "PropsSht.h" diff --git a/win/Tools.cpp b/win/Tools.cpp index 26b394c0..a54aa6ab 100644 --- a/win/Tools.cpp +++ b/win/Tools.cpp @@ -5,7 +5,6 @@ #include "lc_application.h" #include #include -#include "config.h" #ifdef LC_HAVE_3DSFTK #pragma comment(lib, "3dsftk") diff --git a/win/aboutdlg.cpp b/win/aboutdlg.cpp index 0a9c6629..0a647ef4 100644 --- a/win/aboutdlg.cpp +++ b/win/aboutdlg.cpp @@ -1,7 +1,6 @@ #include "lc_global.h" #include "leocad.h" #include "AboutDlg.h" -#include "config.h" #ifdef _DEBUG #define new DEBUG_NEW diff --git a/win/leocad.vcxproj b/win/leocad.vcxproj index b833055c..02fcacdc 100644 --- a/win/leocad.vcxproj +++ b/win/leocad.vcxproj @@ -101,6 +101,7 @@ + true @@ -165,7 +166,6 @@ - @@ -311,6 +311,7 @@ + @@ -367,7 +368,6 @@ - diff --git a/win/leocad.vcxproj.filters b/win/leocad.vcxproj.filters index 49840b38..e980517a 100644 --- a/win/leocad.vcxproj.filters +++ b/win/leocad.vcxproj.filters @@ -185,9 +185,6 @@ Common Source Files - - Common Source Files - Common Source Files @@ -284,6 +281,9 @@ Source Files + + Common Source Files + @@ -729,9 +729,6 @@ Common Header Files - - Common Header Files - Common Header Files @@ -828,6 +825,9 @@ Header Files + + Common Header Files +