Removed duplicate includes and renamed File class.

This commit is contained in:
leo 2012-03-21 01:54:03 +00:00
parent 778c92f80b
commit 4143fd0b82
42 changed files with 32 additions and 66 deletions

View file

@ -4,7 +4,6 @@
#include "lc_global.h" #include "lc_global.h"
#include <float.h> #include <float.h>
#include "defines.h"
#include "algebra.h" #include "algebra.h"
// ============================================================================ // ============================================================================

View file

@ -6,10 +6,9 @@
#include <math.h> #include <math.h>
#include "opengl.h" #include "opengl.h"
#include "globals.h" #include "globals.h"
#include "defines.h"
#include "vector.h" #include "vector.h"
#include "matrix.h" #include "matrix.h"
#include "file.h" #include "lc_file.h"
#include "camera.h" #include "camera.h"
#include "tr.h" #include "tr.h"

View file

@ -1,7 +1,6 @@
#ifndef _GLOBALS_H_ #ifndef _GLOBALS_H_
#define _GLOBALS_H_ #define _GLOBALS_H_
#include "defines.h"
#include "typedefs.h" #include "typedefs.h"
#include "console.h" #include "console.h"

View file

@ -4,7 +4,7 @@
#include "lc_global.h" #include "lc_global.h"
#include <stdlib.h> #include <stdlib.h>
#include "group.h" #include "group.h"
#include "file.h" #include "lc_file.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Group construction/destruction // Group construction/destruction

View file

@ -1,10 +1,9 @@
#include "lc_global.h" #include "lc_global.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "config.h"
#include "quant.h" #include "quant.h"
#include "image.h" #include "image.h"
#include "file.h" #include "lc_file.h"
// ======================================================== // ========================================================

View file

@ -3,8 +3,7 @@
#include <string.h> #include <string.h>
#include "image.h" #include "image.h"
#include "quant.h" #include "quant.h"
#include "file.h" #include "lc_file.h"
#include "config.h"
// ============================================================================= // =============================================================================

View file

@ -1,9 +1,8 @@
#include "lc_global.h" #include "lc_global.h"
#include <setjmp.h> #include <setjmp.h>
#include <stdlib.h> #include <stdlib.h>
#include "config.h"
#include "image.h" #include "image.h"
#include "file.h" #include "lc_file.h"
#ifdef LC_HAVE_JPEGLIB #ifdef LC_HAVE_JPEGLIB

View file

@ -1,8 +1,7 @@
#include "lc_global.h" #include "lc_global.h"
#include <stdlib.h> #include <stdlib.h>
#include "config.h"
#include "image.h" #include "image.h"
#include "file.h" #include "lc_file.h"
#ifdef LC_HAVE_PNGLIB #ifdef LC_HAVE_PNGLIB

View file

@ -13,9 +13,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "config.h"
#include "image.h" #include "image.h"
#include "file.h" #include "lc_file.h"
// ============================================================================= // =============================================================================
// Image functions // Image functions

View file

@ -6,7 +6,7 @@
#include <stdio.h> #include <stdio.h>
#include "system.h" #include "system.h"
#include "keyboard.h" #include "keyboard.h"
#include "file.h" #include "lc_file.h"
#include "str.h" #include "str.h"
// ============================================================================ // ============================================================================

View file

@ -4,7 +4,6 @@
#include "library.h" #include "library.h"
#include "system.h" #include "system.h"
#include "console.h" #include "console.h"
#include "config.h"
#include "opengl.h" #include "opengl.h"
#include "project.h" #include "project.h"
#include "image.h" #include "image.h"

View file

@ -7,9 +7,7 @@
#include <memory.h> #include <memory.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "file.h" #include "lc_file.h"
#include "defines.h"
#include "config.h"
#include "str.h" #include "str.h"
// ============================================================================= // =============================================================================

View file

@ -3,8 +3,6 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "defines.h"
#include "config.h"
class String; class String;

View file

@ -5,10 +5,9 @@
#include "lc_global.h" #include "lc_global.h"
#include <stdlib.h> #include <stdlib.h>
#include "library.h" #include "library.h"
#include "file.h" #include "lc_file.h"
#include "texture.h" #include "texture.h"
#include "pieceinf.h" #include "pieceinf.h"
#include "config.h"
#include "image.h" #include "image.h"
#include "system.h" #include "system.h"
#include "console.h" #include "console.h"

View file

@ -1,7 +1,6 @@
#ifndef _LIBRARY_H_ #ifndef _LIBRARY_H_
#define _LIBRARY_H_ #define _LIBRARY_H_
#include "defines.h"
#include "str.h" #include "str.h"
#include "array.h" #include "array.h"

View file

@ -6,7 +6,6 @@
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#include "light.h" #include "light.h"
#include "defines.h"
#include "globals.h" #include "globals.h"
#include "vector.h" #include "vector.h"
#include "matrix.h" #include "matrix.h"

View file

@ -7,7 +7,6 @@
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include "matrix.h" #include "matrix.h"
#include "defines.h"
// ============================================================================= // =============================================================================
// static functions // static functions

View file

@ -2,7 +2,6 @@
#define _MINIFIG_H_ #define _MINIFIG_H_
#include "glwindow.h" #include "glwindow.h"
#include "file.h"
#include "algebra.h" #include "algebra.h"
#include "array.h" #include "array.h"
@ -55,7 +54,7 @@ public:
bool LoadMinifig (const char* name); bool LoadMinifig (const char* name);
void DeleteMinifig (const char* name); void DeleteMinifig (const char* name);
void ParseSettings(File& Settings); void ParseSettings(class File& Settings);
ObjArray<lcMinifigPieceInfo> mSettings[LC_MFW_NUMITEMS]; ObjArray<lcMinifigPieceInfo> mSettings[LC_MFW_NUMITEMS];

View file

@ -10,7 +10,7 @@
#include "object.h" #include "object.h"
#include "matrix.h" #include "matrix.h"
#include "vector.h" #include "vector.h"
#include "file.h" #include "lc_file.h"
#include "lc_application.h" #include "lc_application.h"
#define LC_KEY_SAVE_VERSION 1 // LeoCAD 0.73 #define LC_KEY_SAVE_VERSION 1 // LeoCAD 0.73

View file

@ -9,7 +9,6 @@ class PieceInfo;
#include "object.h" #include "object.h"
#include "globals.h" #include "globals.h"
#include "typedefs.h" #include "typedefs.h"
#include "defines.h"
#define LC_PIECE_HIDDEN 0x01 #define LC_PIECE_HIDDEN 0x01
#define LC_PIECE_SELECTED 0x02 #define LC_PIECE_SELECTED 0x02

View file

@ -13,8 +13,6 @@
#include "globals.h" #include "globals.h"
#include "matrix.h" #include "matrix.h"
#include "vector.h" #include "vector.h"
#include "defines.h"
#include "config.h"
#include "library.h" #include "library.h"
#include "lc_application.h" #include "lc_application.h"

View file

@ -23,7 +23,6 @@
#include "system.h" #include "system.h"
#include "globals.h" #include "globals.h"
#include "minifig.h" #include "minifig.h"
#include "config.h"
#include "message.h" #include "message.h"
#include "curve.h" #include "curve.h"
#include "mainwnd.h" #include "mainwnd.h"

View file

@ -2,7 +2,6 @@
#define _PROJECT_H_ #define _PROJECT_H_
#include "object.h" #include "object.h"
#include "defines.h"
#include "typedefs.h" #include "typedefs.h"
#include "opengl.h" #include "opengl.h"
#include "array.h" #include "array.h"
@ -44,15 +43,15 @@ class TexFont;
// Undo support // Undo support
#include "file.h" #include "lc_file.h"
typedef struct LC_UNDOINFO struct LC_UNDOINFO
{ {
FileMem file; FileMem file;
char strText[21]; char strText[21];
LC_UNDOINFO* pNext; LC_UNDOINFO* pNext;
LC_UNDOINFO() { pNext = NULL; }; LC_UNDOINFO() { pNext = NULL; };
} LC_UNDOINFO; };
class Project class Project
{ {

View file

@ -1,7 +1,6 @@
#ifndef _SYSTEM_H_ #ifndef _SYSTEM_H_
#define _SYSTEM_H_ #define _SYSTEM_H_
#include "defines.h"
#include "typedefs.h" #include "typedefs.h"
// Assert macros. // Assert macros.

View file

@ -7,9 +7,8 @@
#include <time.h> #include <time.h>
#include <string.h> #include <string.h>
#include "opengl.h" #include "opengl.h"
#include "defines.h"
#include "terrain.h" #include "terrain.h"
#include "file.h" #include "lc_file.h"
#include "camera.h" #include "camera.h"
#include "matrix.h" #include "matrix.h"
#include "system.h" #include "system.h"

View file

@ -5,8 +5,6 @@
#ifndef _TERRAIN_H_ #ifndef _TERRAIN_H_
#define _TERRAIN_H_ #define _TERRAIN_H_
#include "defines.h"
class File; class File;
class Camera; class Camera;
class Texture; class Texture;

View file

@ -8,7 +8,7 @@
#include "texfont.h" #include "texfont.h"
#include "texture.h" #include "texture.h"
#include "library.h" #include "library.h"
#include "file.h" #include "lc_file.h"
#include "lc_application.h" #include "lc_application.h"
#define LC_TEXFONT_FILE_VERSION 1 // LeoCAD 0.74 #define LC_TEXFONT_FILE_VERSION 1 // LeoCAD 0.74

View file

@ -5,7 +5,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "opengl.h" #include "opengl.h"
#include "file.h" #include "lc_file.h"
#include "texture.h" #include "texture.h"
#include "project.h" #include "project.h"
#include "globals.h" #include "globals.h"

View file

@ -8,7 +8,6 @@
class File; class File;
#include "opengl.h" #include "opengl.h"
#include "config.h"
typedef enum { LC_INTENSITY, LC_RGB, LC_RGBA } LC_TEXTURE_TYPES; typedef enum { LC_INTENSITY, LC_RGB, LC_RGBA } LC_TEXTURE_TYPES;

View file

@ -9,7 +9,6 @@ class Piece;
class PieceInfo; class PieceInfo;
class Camera; class Camera;
#include "defines.h"
#include "str.h" #include "str.h"
#include "algebra.h" #include "algebra.h"

View file

@ -1,7 +1,6 @@
#include "lc_global.h" #include "lc_global.h"
#include <math.h> #include <math.h>
#include "vector.h" #include "vector.h"
#include "defines.h"
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Construction/Destruction // Construction/Destruction

View file

@ -24,6 +24,8 @@
!define MUI_ICON "setup.ico" !define MUI_ICON "setup.ico"
!define MUI_UNICON "setup.ico" !define MUI_UNICON "setup.ico"
SetCompressor /SOLID lzma
;-------------------------------- ;--------------------------------
;Interface Settings ;Interface Settings
@ -67,6 +69,9 @@ Section "LeoCAD" SecLeoCAD
;Store installation folder ;Store installation folder
WriteRegStr HKCU "Software\BT Software\LeoCAD" "InstallPath" $INSTDIR 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" CreateShortCut "$SMPROGRAMS\LeoCAD.lnk" "$INSTDIR\LeoCAD.exe"
;Create uninstaller ;Create uninstaller

View file

@ -10,7 +10,6 @@
#include "globals.h" #include "globals.h"
#include "system.h" #include "system.h"
#include "pieceinf.h" // TODO: remove #include "pieceinf.h" // TODO: remove
#include "config.h"
#include "mainwnd.h" #include "mainwnd.h"
#include "library.h" #include "library.h"
#include "keyboard.h" #include "keyboard.h"

View file

@ -3,7 +3,6 @@
#include "PrefPage.h" #include "PrefPage.h"
#include "Tools.h" #include "Tools.h"
#include "MainFrm.h" #include "MainFrm.h"
#include "defines.h"
#include "keyboard.h" #include "keyboard.h"
#ifdef _DEBUG #ifdef _DEBUG

View file

@ -1,7 +1,6 @@
#include "lc_global.h" #include "lc_global.h"
#include "resource.h" #include "resource.h"
#include "PrefSht.h" #include "PrefSht.h"
#include "defines.h"
#ifdef _DEBUG #ifdef _DEBUG
#undef THIS_FILE #undef THIS_FILE

View file

@ -1,7 +1,6 @@
#include "lc_global.h" #include "lc_global.h"
#include "resource.h" #include "resource.h"
#include "PropsPgs.h" #include "PropsPgs.h"
#include "defines.h"
#ifdef _DEBUG #ifdef _DEBUG
#undef THIS_FILE #undef THIS_FILE

View file

@ -4,8 +4,6 @@
#ifndef __PROPSPGS_H__ #ifndef __PROPSPGS_H__
#define __PROPSPGS_H__ #define __PROPSPGS_H__
#include "defines.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// CPropertiesGeneral dialog // CPropertiesGeneral dialog

View file

@ -3,10 +3,9 @@
#include <direct.h> #include <direct.h>
#include "leocad.h" #include "leocad.h"
#include "system.h" #include "system.h"
#include "defines.h"
#include "camera.h" #include "camera.h"
#include "tools.h" #include "tools.h"
#include "file.h" #include "lc_file.h"
#include "image.h" #include "image.h"
#include "PieceBar.h" #include "PieceBar.h"
#include "PropsSht.h" #include "PropsSht.h"

View file

@ -5,7 +5,6 @@
#include "lc_application.h" #include "lc_application.h"
#include <math.h> #include <math.h>
#include <shlobj.h> #include <shlobj.h>
#include "config.h"
#ifdef LC_HAVE_3DSFTK #ifdef LC_HAVE_3DSFTK
#pragma comment(lib, "3dsftk") #pragma comment(lib, "3dsftk")

View file

@ -1,7 +1,6 @@
#include "lc_global.h" #include "lc_global.h"
#include "leocad.h" #include "leocad.h"
#include "AboutDlg.h" #include "AboutDlg.h"
#include "config.h"
#ifdef _DEBUG #ifdef _DEBUG
#define new DEBUG_NEW #define new DEBUG_NEW

View file

@ -101,6 +101,7 @@
</ResourceCompile> </ResourceCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\common\lc_file.cpp" />
<ClCompile Include="Aboutdlg.cpp" /> <ClCompile Include="Aboutdlg.cpp" />
<ClCompile Include="..\common\array.cpp"> <ClCompile Include="..\common\array.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
@ -165,7 +166,6 @@
<ClCompile Include="..\common\console.cpp" /> <ClCompile Include="..\common\console.cpp" />
<ClCompile Include="..\common\curve.cpp" /> <ClCompile Include="..\common\curve.cpp" />
<ClCompile Include="..\common\debug.cpp" /> <ClCompile Include="..\common\debug.cpp" />
<ClCompile Include="..\Common\file.cpp" />
<ClCompile Include="..\Common\globals.cpp" /> <ClCompile Include="..\Common\globals.cpp" />
<ClCompile Include="..\Common\group.cpp" /> <ClCompile Include="..\Common\group.cpp" />
<ClCompile Include="..\common\im_bmp.cpp" /> <ClCompile Include="..\common\im_bmp.cpp" />
@ -311,6 +311,7 @@
<ResourceCompile Include="LeoCAD.rc" /> <ResourceCompile Include="LeoCAD.rc" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\common\lc_file.h" />
<ClInclude Include="..\common\lc_global.h" /> <ClInclude Include="..\common\lc_global.h" />
<ClInclude Include="AboutDlg.h" /> <ClInclude Include="AboutDlg.h" />
<ClInclude Include="ArrayDlg.h" /> <ClInclude Include="ArrayDlg.h" />
@ -367,7 +368,6 @@
<ClInclude Include="..\common\console.h" /> <ClInclude Include="..\common\console.h" />
<ClInclude Include="..\common\curve.h" /> <ClInclude Include="..\common\curve.h" />
<ClInclude Include="..\Common\defines.h" /> <ClInclude Include="..\Common\defines.h" />
<ClInclude Include="..\Common\file.h" />
<ClInclude Include="..\Common\globals.h" /> <ClInclude Include="..\Common\globals.h" />
<ClInclude Include="..\common\glwindow.h" /> <ClInclude Include="..\common\glwindow.h" />
<ClInclude Include="..\Common\group.h" /> <ClInclude Include="..\Common\group.h" />

View file

@ -185,9 +185,6 @@
<ClCompile Include="..\common\debug.cpp"> <ClCompile Include="..\common\debug.cpp">
<Filter>Common Source Files</Filter> <Filter>Common Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\Common\file.cpp">
<Filter>Common Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Common\globals.cpp"> <ClCompile Include="..\Common\globals.cpp">
<Filter>Common Source Files</Filter> <Filter>Common Source Files</Filter>
</ClCompile> </ClCompile>
@ -284,6 +281,9 @@
<ClCompile Include="propertiesgridctrl.cpp"> <ClCompile Include="propertiesgridctrl.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\common\lc_file.cpp">
<Filter>Common Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="res\Angle.cur"> <None Include="res\Angle.cur">
@ -729,9 +729,6 @@
<ClInclude Include="..\Common\defines.h"> <ClInclude Include="..\Common\defines.h">
<Filter>Common Header Files</Filter> <Filter>Common Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\Common\file.h">
<Filter>Common Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Common\globals.h"> <ClInclude Include="..\Common\globals.h">
<Filter>Common Header Files</Filter> <Filter>Common Header Files</Filter>
</ClInclude> </ClInclude>
@ -828,6 +825,9 @@
<ClInclude Include="propertiesgridctrl.h"> <ClInclude Include="propertiesgridctrl.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\common\lc_file.h">
<Filter>Common Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="hlp\LeoCAD.hpj"> <CustomBuild Include="hlp\LeoCAD.hpj">