Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Editor: AGS.Native: build with JSS changes to the engine

  • Loading branch information...
commit 855fa26e4dfb0572c043ddfb4dd5de43c7b18eec 1 parent 93974ea
@ivan-mogilko ivan-mogilko authored
View
66 Editor/AGS.Native/NativeDLL.vcproj
@@ -55,8 +55,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..;..\..\common;..\scintilla\include;..\..\AlFont\freetype\include"
- PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;ALLEGRO_STATICLINK;ALLEGRO_NO_ASM;VS2005;_CRT_SECURE_NO_DEPRECATE;_MERGE_PROXYSTUB;STATIC_BUILD;SCI_LEXER;USE_ALFONT;_BIND_TO_CURRENT_VCLIBS_VERSION=1;ALLEGRO_NO_ASM"
+ AdditionalIncludeDirectories="..\..;..\..\common;..\..\common\libinclude;..\scintilla\include;..\..\Windows\include"
+ PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;ALLEGRO_STATICLINK;ALLEGRO_NO_ASM;VS2005;_CRT_SECURE_NO_DEPRECATE;_MERGE_PROXYSTUB;STATIC_BUILD;SCI_LEXER;USE_ALFONT;_BIND_TO_CURRENT_VCLIBS_VERSION=1"
MinimalRebuild="false"
BasicRuntimeChecks="0"
RuntimeLibrary="3"
@@ -81,7 +81,7 @@
Name="VCLinkerTool"
RegisterOutput="false"
IgnoreImportLibrary="true"
- AdditionalDependencies="winmm.lib imm32.lib ddraw.lib dsound.lib dinput.lib dxguid.lib ..\..\NativeLibs\alld_s.lib ..\..\NativeLibs\alfont_md_d.lib"
+ AdditionalDependencies="winmm.lib imm32.lib ddraw.lib dsound.lib dinput.lib dxguid.lib"
LinkIncremental="2"
ModuleDefinitionFile=""
GenerateDebugInformation="true"
@@ -432,6 +432,66 @@
>
</File>
</Filter>
+ <Filter
+ Name="Libraries"
+ >
+ <Filter
+ Name="Debug"
+ >
+ <File
+ RelativePath="..\..\Windows\lib.native\alfont_md_d.lib"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\Windows\lib.native\alld_s.lib"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Release"
+ >
+ <File
+ RelativePath="..\..\Windows\lib.native\alfont_md.lib"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\Windows\lib.native\alleg_s.lib"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
</Files>
<Globals>
</Globals>
View
26 Editor/AGS.Native/agsnative.cpp
@@ -1932,7 +1932,7 @@ void save_room(const char *files, roomstruct rstruc) {
for (f = 0; f < 11; f++)
rstruc.password[f] -= passwencstring[f];
- opty = ci_fopen(files, "wb");
+ opty = ci_fopen(const_cast<char*>(files), "wb");
if (opty == NULL)
quit("save_room: unable to open room file for writing.");
@@ -2054,7 +2054,7 @@ void save_room(const char *files, roomstruct rstruc) {
if (rfh.version >= 5) {
long lee;
- opty = ci_fopen(files,"r+b");
+ opty = ci_fopen(const_cast<char*>(files),"r+b");
lee = filelength(fileno(opty))-7;
fseek(opty, 3, SEEK_SET);
@@ -2131,7 +2131,7 @@ void save_room(const char *files, roomstruct rstruc) {
for (gg = 1; gg < rstruc.num_bscenes; gg++)
curoffs = save_lzw((char*)files, rstruc.ebscene[gg], rstruc.bpalettes[gg], curoffs);
- opty = ci_fopen(files, "r+b");
+ opty = ci_fopen(const_cast<char*>(files), "r+b");
lenis = (curoffs - lenpos) - 4;
fseek(opty, lenpos, SEEK_SET);
fwrite(&lenis, 4, 1, opty);
@@ -5196,3 +5196,23 @@ void load_graphical_scripts(FILE*iii,roomstruct*rst) {
}
}
+// [IKM] 2012-06-07
+// Had to copy this implementation from Engine/misc.cpp to evade including additional srcs & libs to AGS.Native.
+FILE *ci_fopen(char *file_name, const char *mode)
+{
+ // Don't pass a NULL pointer to newlib on the PSP.
+ if (file_name == NULL)
+ {
+ return NULL;
+ }
+ else
+ {
+ return fopen(file_name, mode);
+ }
+}
+
+// [IKM] 2012-06-07
+// Had to copy this variable definition from Engine/acc.cpp, since it is required in acgui.cpp // GUIInv::CalculateNumCells()
+// due JJS's compatiblity fix for 2.70.
+// This *must* be not less than 31, otherwise function will work in backward-compatibility mode.
+int loaded_game_file_version = 31;
View
BIN  Editor/References/AGS.Native.dll
Binary file not shown
View
BIN  Windows/lib.native/alfont_md.lib
Binary file not shown
View
BIN  Windows/lib.native/alfont_md_d.lib
Binary file not shown
View
BIN  Windows/lib.native/alld_s.lib
Binary file not shown
View
BIN  Windows/lib.native/alleg_s.lib
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.