First commit

This commit is contained in:
vladislav.khorev committed 2017-01-10 07:08:49 +03:00
commit 3b8e4ed9c9
1169 files changed
+411320

No files matched your search

+253
View File
@@ -0,0 +1,253 @@
<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_project_file>
<CodeBlocks_project_file>
<FileVersion major="1" minor="1"/>
<Project>
<Option title="DXSquirrel"/>
<Option makefile="Makefile"/>
<Option makefile_is_custom="0"/>
<Option compiler="0"/>
<Build>
<Target title="Debug">
<Option output="Debug\DXSquirrelD.exe"/>
<Option working_dir="."/>
<Option object_output="Debug"/>
<Option deps_output=".deps"/>
<Option external_deps="..\lib\libsquirrelD.a;..\lib\libsqstdlibD.a;..\lib\libsqplusD.a;"/>
<Option type="0"/>
<Option compiler="0"/>
<Option projectResourceIncludeDirsRelation="0"/>
<Compiler>
<Add option="-W"/>
<Add option="-O0"/>
<Add option="-DWIN32"/>
<Add option="-D_DEBUG"/>
<Add option="-D_WINDOWS"/>
<Add option="-D_CRT_SECURE_NO_DEPRECATE"/>
<Add directory="..\include"/>
<Add directory="..\sqplus"/>
</Compiler>
<Linker>
<Add library="..\lib\libsqplusD.a"/>
<Add library="D:\DX9\Lib\x86\d3dx9.lib"/>
<Add library="D:\DX9\Lib\x86\d3d9.lib"/>
<Add library="..\lib\libsquirrelD.a"/>
<Add library="..\lib\libsqstdlibD.a"/>
<Add library="D:\DX9\Lib\x86\dxguid.lib"/>
<Add directory="..\lib"/>
<Add directory="D:\DX9\Lib\x86"/>
</Linker>
</Target>
<Target title="Release">
<Option output="Release\DXSquirrel.exe"/>
<Option working_dir="."/>
<Option object_output="Release"/>
<Option deps_output=".deps"/>
<Option external_deps="..\lib\libsquirrel.a;..\lib\libsqstdlib.a;..\lib\libsqplus.a;"/>
<Option type="0"/>
<Option compiler="0"/>
<Option projectResourceIncludeDirsRelation="0"/>
<Compiler>
<Add option="-W"/>
<Add option="-g"/>
<Add option="-DWIN32"/>
<Add option="-DNDEBUG"/>
<Add option="-D_WINDOWS"/>
<Add option="-D_CRT_SECURE_NO_DEPRECATE"/>
<Add directory="..\include"/>
<Add directory="..\sqplus"/>
</Compiler>
<Linker>
<Add library="D:\DX9\Lib\x86\d3d9.lib"/>
<Add library="D:\DX9\Lib\x86\d3dx9.lib"/>
<Add library="..\lib\libsqplus.a"/>
<Add library="..\lib\libsquirrel.a"/>
<Add library="..\lib\libsqstdlib.a"/>
<Add directory="..\lib"/>
<Add directory="D:\DX9\Lib\x86"/>
</Linker>
</Target>
<Target title="Debug - Unicode">
<Option output="Debug - Unicode\DXSquirrel.exe"/>
<Option working_dir="."/>
<Option object_output="Debug - Unicode"/>
<Option deps_output=".deps"/>
<Option external_deps="..\lib\libsquirrelDU.a;..\lib\libsqstdlibDU.a;..\lib\libsqplusDU.a;"/>
<Option type="0"/>
<Option compiler="0"/>
<Option projectResourceIncludeDirsRelation="0"/>
<Compiler>
<Add option="-W"/>
<Add option="-O0"/>
<Add option="-DWIN32"/>
<Add option="-D_DEBUG"/>
<Add option="-D_WINDOWS"/>
<Add option="-D_CRT_SECURE_NO_DEPRECATE"/>
<Add directory="..\include"/>
<Add directory="..\sqplus"/>
</Compiler>
<Linker>
<Add library="D:\DX9\Lib\x86\d3d9.lib"/>
<Add library="D:\DX9\Lib\x86\d3dx9.lib"/>
<Add library="..\lib\libsqplusDU.a"/>
<Add library="..\lib\libsquirrelDU.a"/>
<Add library="..\lib\libsqstdlibDU.a"/>
<Add directory="..\lib"/>
<Add directory="D:\DX9\Lib\x86"/>
</Linker>
</Target>
<Target title="Release - Unicode">
<Option output="Release - Unicode\DXSquirrel.exe"/>
<Option working_dir="."/>
<Option object_output="Release - Unicode"/>
<Option deps_output=".deps"/>
<Option external_deps="..\lib\libsquirrelU.a;..\lib\libsqstdlibU.a;..\lib\libsqplusU.a;"/>
<Option type="0"/>
<Option compiler="0"/>
<Option projectResourceIncludeDirsRelation="0"/>
<Compiler>
<Add option="-W"/>
<Add option="-g"/>
<Add option="-DWIN32"/>
<Add option="-DNDEBUG"/>
<Add option="-D_WINDOWS"/>
<Add option="-D_CRT_SECURE_NO_DEPRECATE"/>
<Add directory="..\include"/>
<Add directory="..\sqplus"/>
</Compiler>
<Linker>
<Add library="D:\DX9\Lib\x86\d3d9.lib"/>
<Add library="D:\DX9\Lib\x86\d3dx9.lib"/>
<Add library="..\lib\libsqplusU.a"/>
<Add library="..\lib\libsquirrelU.a"/>
<Add library="..\lib\libsqstdlibU.a"/>
<Add directory="..\lib"/>
<Add directory="D:\DX9\Lib\x86"/>
</Linker>
</Target>
</Build>
<Compiler>
<Add directory="D:\DX9\Include"/>
</Compiler>
<Unit filename="DXSquirrel.cpp">
<Option compilerVar="CPP"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="DXSquirrel.h">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="DXSquirrel.ico">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="DXSquirrel.rc">
<Option compilerVar="WINDRES"/>
<Option objectName="DXSquirrel.res"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="DXSquirrel_Binds.cpp">
<Option compilerVar="CPP"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="DXSquirrel_Binds.h">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="DXSquirrel_DX.cpp">
<Option compilerVar="CPP"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="DXSquirrel_Device.cpp">
<Option compilerVar="CPP"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="DXSquirrel_Math.cpp">
<Option compilerVar="CPP"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="DXSquirrel_Mesh.cpp">
<Option compilerVar="CPP"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="Resource.h">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="dxsquirrel.nut">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="small.ico">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="stdafx.cpp">
<Option compilerVar="CPP"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
<Unit filename="stdafx.h">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="Debug"/>
<Option target="Release"/>
<Option target="Debug - Unicode"/>
<Option target="Release - Unicode"/>
</Unit>
</Project>
</CodeBlocks_project_file>
+41
View File
@@ -0,0 +1,41 @@
#include "stdafx.h"
#include <Windows.h>
#include <mmsystem.h>
#include <strsafe.h>
#pragma comment(lib,"d3d9.lib")
#pragma comment(lib,"d3dx9.lib")
#include "sqplus.h"
LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) {
switch( msg ) {
case WM_CLOSE:
PostQuitMessage( 0 );
return 0;
}
return DefWindowProc( hWnd, msg, wParam, lParam );
}
BOOL DXSquirrel_Initialize();
void DXSquirrel_Shutdown();
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT ) {
if(!DXSquirrel_Initialize()) {
MessageBox(NULL,_SC("Error initilizing the app"),_SC("DXSquirrel"),MB_OK);
return -1;
}
try {
SquirrelObject main = SquirrelVM::CompileScript(_SC("dxsquirrel.nut"));
SquirrelVM::RunScript(main);
}
catch(SquirrelError &e) {
MessageBox(NULL,e.desc,_SC("DXSquirrel"),MB_OK);
return -2;
}
DXSquirrel_Shutdown();
return 0;
}
+3
View File
@@ -0,0 +1,3 @@
#pragma once
#include "resource.h"
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

+128
View File
@@ -0,0 +1,128 @@
//Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE 9, 1
#pragma code_page(1252)
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_DXSQUIRREL ICON "DXSquirrel.ico"
IDI_SMALL ICON "small.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDC_DXSQUIRREL MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Help"
BEGIN
MENUITEM "&About ...", IDM_ABOUT
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
//
IDC_DXSQUIRREL ACCELERATORS
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
END
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOG 22, 17, 230, 75
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8, "System"
BEGIN
ICON IDI_DXSQUIRREL,IDC_MYICON,14,9,16,16
LTEXT "DXSquirrel Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
LTEXT "Copyright (C) 2005",IDC_STATIC,49,20,119,8
DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDC_DXSQUIRREL "DXSQUIRREL"
IDS_APP_TITLE "DXSquirrel"
END
#endif
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
+24
View File
@@ -0,0 +1,24 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DXSquirrel", "DXSquirrel.vcproj", "{63D317C8-DF36-49A8-BA6A-EE52C752685E}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{63D317C8-DF36-49A8-BA6A-EE52C752685E}.Debug.ActiveCfg = Debug|Win32
{63D317C8-DF36-49A8-BA6A-EE52C752685E}.Debug.Build.0 = Debug|Win32
{63D317C8-DF36-49A8-BA6A-EE52C752685E}.Release.ActiveCfg = Release|Win32
{63D317C8-DF36-49A8-BA6A-EE52C752685E}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal
+452
View File
@@ -0,0 +1,452 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="DXSquirrel"
ProjectGUID="{63D317C8-DF36-49A8-BA6A-EE52C752685E}"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../include;../sqplus"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/DXSquirrelD.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="../lib"
IgnoreDefaultLibraryNames="LIBC"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/DXSquirrel.pdb"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../include;../sqplus"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/DXSquirrel.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../lib"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - Unicode|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../include;../sqplus"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/DXSquirrel.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="../lib"
IgnoreDefaultLibraryNames="LIBC"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/DXSquirrel.pdb"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release - Unicode|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../include;../sqplus"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/DXSquirrel.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../lib"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\DXSquirrel.cpp"
>
</File>
<File
RelativePath=".\DXSquirrel_Binds.cpp"
>
</File>
<File
RelativePath=".\DXSquirrel_Device.cpp"
>
</File>
<File
RelativePath=".\DXSquirrel_DX.cpp"
>
</File>
<File
RelativePath=".\DXSquirrel_Math.cpp"
>
</File>
<File
RelativePath=".\DXSquirrel_Mesh.cpp"
>
</File>
<File
RelativePath=".\stdafx.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug - Unicode|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release - Unicode|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\DXSquirrel.h"
>
</File>
<File
RelativePath=".\DXSquirrel_Binds.h"
>
</File>
<File
RelativePath=".\Resource.h"
>
</File>
<File
RelativePath=".\stdafx.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\DXSquirrel.ico"
>
</File>
<File
RelativePath=".\DXSquirrel.rc"
>
</File>
<File
RelativePath=".\small.ico"
>
</File>
</Filter>
<File
RelativePath=".\dxsquirrel.nut"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
+208
View File
@@ -0,0 +1,208 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{63D317C8-DF36-49A8-BA6A-EE52C752685E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../include;../sqplus;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)DXSquirrelD.exe</OutputFile>
<AdditionalLibraryDirectories>../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)DXSquirrel.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../include;../sqplus;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)DXSquirrel.exe</OutputFile>
<AdditionalLibraryDirectories>../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../include;../sqplus;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)DXSquirrel.exe</OutputFile>
<AdditionalLibraryDirectories>../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)DXSquirrel.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../include;../sqplus;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)DXSquirrel.exe</OutputFile>
<AdditionalLibraryDirectories>../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="DXSquirrel.cpp" />
<ClCompile Include="DXSquirrel_Binds.cpp" />
<ClCompile Include="DXSquirrel_Device.cpp" />
<ClCompile Include="DXSquirrel_DX.cpp" />
<ClCompile Include="DXSquirrel_Math.cpp" />
<ClCompile Include="DXSquirrel_Mesh.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="DXSquirrel.h" />
<ClInclude Include="DXSquirrel_Binds.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<None Include="DXSquirrel.ico" />
<None Include="small.ico" />
<None Include="dxsquirrel.nut" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="DXSquirrel.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\sqplus\sqplus.vcxproj">
<Project>{f9811314-c694-49a4-bd87-ba2e7f30d358}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\sqstdlib\sqstdlib.vcxproj">
<Project>{b6da293c-f1bb-4800-8134-70cbe80f70a0}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\squirrel\squirrel.vcxproj">
<Project>{a79653f2-73f4-4f57-ae86-4aebde795232}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+68
View File
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="DXSquirrel.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="DXSquirrel_Binds.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="DXSquirrel_Device.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="DXSquirrel_DX.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="DXSquirrel_Math.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="DXSquirrel_Mesh.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="DXSquirrel.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="DXSquirrel_Binds.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="DXSquirrel.ico">
<Filter>Resource Files</Filter>
</None>
<None Include="small.ico">
<Filter>Resource Files</Filter>
</None>
<None Include="dxsquirrel.nut" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="DXSquirrel.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
+24
View File
@@ -0,0 +1,24 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DXSquirrel", "DXSquirrel71.vcproj", "{63D317C8-DF36-49A8-BA6A-EE52C752685E}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{63D317C8-DF36-49A8-BA6A-EE52C752685E}.Debug.ActiveCfg = Debug|Win32
{63D317C8-DF36-49A8-BA6A-EE52C752685E}.Debug.Build.0 = Debug|Win32
{63D317C8-DF36-49A8-BA6A-EE52C752685E}.Release.ActiveCfg = Release|Win32
{63D317C8-DF36-49A8-BA6A-EE52C752685E}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal
+302
View File
@@ -0,0 +1,302 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="DXSquirrel"
ProjectGUID="{63D317C8-DF36-49A8-BA6A-EE52C752685E}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../include;../sqplus"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/DXSquirrelD.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="../lib"
IgnoreDefaultLibraryNames="LIBC"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/DXSquirrel.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../include;../sqplus"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/DXSquirrel.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../lib"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug - Unicode|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../include;../sqplus"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/DXSquirrel.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="../lib"
IgnoreDefaultLibraryNames="LIBC"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/DXSquirrel.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release - Unicode|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../include;../sqplus"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/DXSquirrel.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../lib"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath=".\DXSquirrel.cpp">
</File>
<File
RelativePath=".\DXSquirrel_Binds.cpp">
</File>
<File
RelativePath=".\DXSquirrel_Device.cpp">
</File>
<File
RelativePath=".\DXSquirrel_DX.cpp">
</File>
<File
RelativePath=".\DXSquirrel_Math.cpp">
</File>
<File
RelativePath=".\DXSquirrel_Mesh.cpp">
</File>
<File
RelativePath=".\stdafx.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="Debug - Unicode|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release - Unicode|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<File
RelativePath=".\DXSquirrel.h">
</File>
<File
RelativePath=".\DXSquirrel_Binds.h">
</File>
<File
RelativePath=".\Resource.h">
</File>
<File
RelativePath=".\stdafx.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
<File
RelativePath=".\DXSquirrel.ico">
</File>
<File
RelativePath=".\DXSquirrel.rc">
</File>
<File
RelativePath=".\small.ico">
</File>
</Filter>
<File
RelativePath=".\dxsquirrel.nut">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
+35
View File
@@ -0,0 +1,35 @@
#include "stdafx.h"
#include "sqplus.h"
#include "DXSquirrel_Binds.h"
WNDCLASSEX gWC;
LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
IDirect3D9 * gpD3D = NULL;
BOOL DXSquirrel_Initialize()
{
WNDCLASSEX t = { sizeof(WNDCLASSEX), CS_CLASSDC, MsgProc, 0L, 0L,
GetModuleHandle(NULL), NULL, NULL, NULL, NULL,
_T("DXSquirrel"), NULL };
gWC = t;
RegisterClassEx( &gWC );
SquirrelVM::Init();
if( NULL == ( gpD3D = Direct3DCreate9( D3D_SDK_VERSION ) ) )
return FALSE;
//initializes classes
_INIT_STATIC_NAMESPACE(DX);
_INIT_CLASS(Device);
_INIT_CLASS(Vector3);
_INIT_CLASS(Matrix);
_INIT_CLASS(BaseMesh);
_INIT_CLASS(Mesh);
//
return TRUE;
}
void DXSquirrel_Shutdown()
{
if(gpD3D) {
gpD3D->Release();
}
}
+11
View File
@@ -0,0 +1,11 @@
#ifndef _DXSQUIRREL_BINDS_H_
#define _DXSQUIRREL_BINDS_H_
_DECL_STATIC_NAMESPACE(DX);
_DECL_CLASS(Device);
_DECL_CLASS(Vector3);
_DECL_CLASS(Matrix);
_DECL_CLASS(BaseMesh);
_DECL_CLASS(Mesh);
#endif //_DXSQUIRREL_BINDS_H_
+230
View File
@@ -0,0 +1,230 @@
#include "stdafx.h"
#include "sqplus.h"
#include "DXSquirrel_Binds.h"
//updates the message loop
_MEMBER_FUNCTION_IMPL(DX,Update)
{
StackHandler sa(v);
MSG msg;
ZeroMemory( &msg, sizeof(msg) );
while( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )
{
if(msg.message == WM_QUIT)
{
return sa.Return(false);
}
TranslateMessage( &msg );
DispatchMessage( &msg );
}
return sa.Return(true);
}
//
_BEGIN_NAMESPACE(DX)
_MEMBER_FUNCTION(DX,Update,0,0)
_BEGIN_NAMESPACE_CONSTANTS(DX)
//D3DDEVTYPE
_CONSTANT(D3DDEVTYPE_HAL,OT_INTEGER,D3DDEVTYPE_HAL)
_CONSTANT(D3DDEVTYPE_REF,OT_INTEGER,D3DDEVTYPE_REF)
_CONSTANT(D3DDEVTYPE_SW,OT_INTEGER,D3DDEVTYPE_SW)
//SWAPEFFECT
_CONSTANT(D3DSWAPEFFECT_DISCARD,OT_INTEGER,D3DSWAPEFFECT_DISCARD)
_CONSTANT(D3DSWAPEFFECT_FLIP,OT_INTEGER,D3DSWAPEFFECT_FLIP)
_CONSTANT(D3DSWAPEFFECT_COPY,OT_INTEGER,D3DSWAPEFFECT_COPY)
//D3DCREATE
_CONSTANT(D3DCREATE_ADAPTERGROUP_DEVICE,OT_INTEGER,D3DCREATE_ADAPTERGROUP_DEVICE)
_CONSTANT(D3DCREATE_DISABLE_DRIVER_MANAGEMENT,OT_INTEGER,D3DCREATE_DISABLE_DRIVER_MANAGEMENT)
_CONSTANT(D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX,OT_INTEGER,D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX)
_CONSTANT(D3DCREATE_FPU_PRESERVE,OT_INTEGER,D3DCREATE_FPU_PRESERVE)
_CONSTANT(D3DCREATE_HARDWARE_VERTEXPROCESSING,OT_INTEGER,D3DCREATE_HARDWARE_VERTEXPROCESSING)
_CONSTANT(D3DCREATE_MIXED_VERTEXPROCESSING,OT_INTEGER,D3DCREATE_MIXED_VERTEXPROCESSING)
_CONSTANT(D3DCREATE_MULTITHREADED,OT_INTEGER,D3DCREATE_MULTITHREADED)
_CONSTANT(D3DCREATE_NOWINDOWCHANGES,OT_INTEGER,D3DCREATE_NOWINDOWCHANGES)
_CONSTANT(D3DCREATE_PUREDEVICE,OT_INTEGER,D3DCREATE_PUREDEVICE)
_CONSTANT(D3DCREATE_SOFTWARE_VERTEXPROCESSING,OT_INTEGER,D3DCREATE_SOFTWARE_VERTEXPROCESSING)
//D3DFMT
_CONSTANT(D3DFMT_UNKNOWN,OT_INTEGER,D3DFMT_UNKNOWN)
_CONSTANT(D3DFMT_R8G8B8,OT_INTEGER,D3DFMT_R8G8B8)
_CONSTANT(D3DFMT_A8R8G8B8,OT_INTEGER,D3DFMT_A8R8G8B8)
_CONSTANT(D3DFMT_X8R8G8B8,OT_INTEGER,D3DFMT_X8R8G8B8)
_CONSTANT(D3DFMT_R5G6B5,OT_INTEGER,D3DFMT_R5G6B5)
_CONSTANT(D3DFMT_X1R5G5B5,OT_INTEGER,D3DFMT_X1R5G5B5)
_CONSTANT(D3DFMT_A1R5G5B5,OT_INTEGER,D3DFMT_A1R5G5B5)
_CONSTANT(D3DFMT_A4R4G4B4,OT_INTEGER,D3DFMT_A4R4G4B4)
_CONSTANT(D3DFMT_R3G3B2,OT_INTEGER,D3DFMT_R3G3B2)
_CONSTANT(D3DFMT_A8,OT_INTEGER,D3DFMT_A8)
_CONSTANT(D3DFMT_A8R3G3B2,OT_INTEGER,D3DFMT_A8R3G3B2)
_CONSTANT(D3DFMT_X4R4G4B4,OT_INTEGER,D3DFMT_X4R4G4B4)
_CONSTANT(D3DFMT_A2B10G10R10,OT_INTEGER,D3DFMT_A2B10G10R10)
_CONSTANT(D3DFMT_A8B8G8R8,OT_INTEGER,D3DFMT_A8B8G8R8)
_CONSTANT(D3DFMT_X8B8G8R8,OT_INTEGER,D3DFMT_X8B8G8R8)
_CONSTANT(D3DFMT_G16R16,OT_INTEGER,D3DFMT_G16R16)
_CONSTANT(D3DFMT_A2R10G10B10,OT_INTEGER,D3DFMT_A2R10G10B10)
_CONSTANT(D3DFMT_A16B16G16R16,OT_INTEGER,D3DFMT_A16B16G16R16)
_CONSTANT(D3DFMT_A8P8,OT_INTEGER,D3DFMT_A8P8)
_CONSTANT(D3DFMT_P8,OT_INTEGER,D3DFMT_P8)
_CONSTANT(D3DFMT_L8,OT_INTEGER,D3DFMT_L8)
_CONSTANT(D3DFMT_A8L8,OT_INTEGER,D3DFMT_A8L8)
_CONSTANT(D3DFMT_A4L4,OT_INTEGER,D3DFMT_A4L4)
_CONSTANT(D3DFMT_V8U8,OT_INTEGER,D3DFMT_V8U8)
_CONSTANT(D3DFMT_L6V5U5,OT_INTEGER,D3DFMT_L6V5U5)
_CONSTANT(D3DFMT_X8L8V8U8,OT_INTEGER,D3DFMT_X8L8V8U8)
_CONSTANT(D3DFMT_Q8W8V8U8,OT_INTEGER,D3DFMT_Q8W8V8U8)
_CONSTANT(D3DFMT_V16U16,OT_INTEGER,D3DFMT_V16U16)
_CONSTANT(D3DFMT_A2W10V10U10,OT_INTEGER,D3DFMT_A2W10V10U10)
_CONSTANT(D3DFMT_UYVY,OT_INTEGER,D3DFMT_UYVY)
_CONSTANT(D3DFMT_R8G8_B8G8,OT_INTEGER,D3DFMT_R8G8_B8G8)
_CONSTANT(D3DFMT_YUY2,OT_INTEGER,D3DFMT_YUY2)
_CONSTANT(D3DFMT_G8R8_G8B8,OT_INTEGER,D3DFMT_G8R8_G8B8)
_CONSTANT(D3DFMT_DXT1,OT_INTEGER,D3DFMT_DXT1)
_CONSTANT(D3DFMT_DXT2,OT_INTEGER,D3DFMT_DXT2)
_CONSTANT(D3DFMT_DXT3,OT_INTEGER,D3DFMT_DXT3)
_CONSTANT(D3DFMT_DXT4,OT_INTEGER,D3DFMT_DXT4)
_CONSTANT(D3DFMT_DXT5,OT_INTEGER,D3DFMT_DXT5)
_CONSTANT(D3DFMT_D16_LOCKABLE,OT_INTEGER,D3DFMT_D16_LOCKABLE)
_CONSTANT(D3DFMT_D32,OT_INTEGER,D3DFMT_D32)
_CONSTANT(D3DFMT_D15S1,OT_INTEGER,D3DFMT_D15S1)
_CONSTANT(D3DFMT_D24S8,OT_INTEGER,D3DFMT_D24S8)
_CONSTANT(D3DFMT_D24X8,OT_INTEGER,D3DFMT_D24X8)
_CONSTANT(D3DFMT_D24X4S4,OT_INTEGER,D3DFMT_D24X4S4)
_CONSTANT(D3DFMT_D16,OT_INTEGER,D3DFMT_D16)
_CONSTANT(D3DFMT_D32F_LOCKABLE,OT_INTEGER,D3DFMT_D32F_LOCKABLE)
_CONSTANT(D3DFMT_D24FS8,OT_INTEGER,D3DFMT_D24FS8)
_CONSTANT(D3DFMT_L16,OT_INTEGER,D3DFMT_L16)
_CONSTANT(D3DFMT_VERTEXDATA,OT_INTEGER,D3DFMT_VERTEXDATA)
_CONSTANT(D3DFMT_INDEX16,OT_INTEGER,D3DFMT_INDEX16)
_CONSTANT(D3DFMT_INDEX32,OT_INTEGER,D3DFMT_INDEX32)
_CONSTANT(D3DFMT_Q16W16V16U16,OT_INTEGER,D3DFMT_Q16W16V16U16)
_CONSTANT(D3DFMT_MULTI2_ARGB8,OT_INTEGER,D3DFMT_MULTI2_ARGB8)
_CONSTANT(D3DFMT_R16F,OT_INTEGER,D3DFMT_R16F)
_CONSTANT(D3DFMT_G16R16F,OT_INTEGER,D3DFMT_G16R16F)
_CONSTANT(D3DFMT_A16B16G16R16F,OT_INTEGER,D3DFMT_A16B16G16R16F)
_CONSTANT(D3DFMT_R32F,OT_INTEGER,D3DFMT_R32F)
_CONSTANT(D3DFMT_G32R32F,OT_INTEGER,D3DFMT_G32R32F)
_CONSTANT(D3DFMT_A32B32G32R32F,OT_INTEGER,D3DFMT_A32B32G32R32F)
_CONSTANT(D3DFMT_CxV8U8,OT_INTEGER,D3DFMT_CxV8U8)
//D3DCLEAR
_CONSTANT(D3DCLEAR_STENCIL,OT_INTEGER,D3DCLEAR_STENCIL)
_CONSTANT(D3DCLEAR_TARGET,OT_INTEGER,D3DCLEAR_TARGET)
_CONSTANT(D3DCLEAR_ZBUFFER,OT_INTEGER,D3DCLEAR_ZBUFFER)
//D3DTS
_CONSTANT(D3DTS_WORLD,OT_INTEGER,D3DTS_WORLD)
_CONSTANT(D3DTS_VIEW,OT_INTEGER,D3DTS_VIEW)
_CONSTANT(D3DTS_PROJECTION,OT_INTEGER,D3DTS_PROJECTION)
_CONSTANT(D3DTS_TEXTURE0,OT_INTEGER,D3DTS_TEXTURE0)
_CONSTANT(D3DTS_TEXTURE1,OT_INTEGER,D3DTS_TEXTURE1)
_CONSTANT(D3DTS_TEXTURE2,OT_INTEGER,D3DTS_TEXTURE2)
_CONSTANT(D3DTS_TEXTURE3,OT_INTEGER,D3DTS_TEXTURE3)
_CONSTANT(D3DTS_TEXTURE4,OT_INTEGER,D3DTS_TEXTURE4)
_CONSTANT(D3DTS_TEXTURE5,OT_INTEGER,D3DTS_TEXTURE5)
_CONSTANT(D3DTS_TEXTURE6,OT_INTEGER,D3DTS_TEXTURE6)
_CONSTANT(D3DTS_TEXTURE7,OT_INTEGER,D3DTS_TEXTURE7)
//
_CONSTANT(D3DX_PI,OT_INTEGER,D3DX_PI)
//RS
_CONSTANT(D3DRS_ZENABLE,OT_INTEGER,D3DRS_ZENABLE)
_CONSTANT(D3DRS_FILLMODE,OT_INTEGER,D3DRS_FILLMODE)
_CONSTANT(D3DRS_SHADEMODE,OT_INTEGER,D3DRS_SHADEMODE)
_CONSTANT(D3DRS_ZWRITEENABLE,OT_INTEGER,D3DRS_ZWRITEENABLE)
_CONSTANT(D3DRS_ALPHATESTENABLE,OT_INTEGER,D3DRS_ALPHATESTENABLE)
_CONSTANT(D3DRS_LASTPIXEL,OT_INTEGER,D3DRS_LASTPIXEL)
_CONSTANT(D3DRS_SRCBLEND,OT_INTEGER,D3DRS_SRCBLEND)
_CONSTANT(D3DRS_DESTBLEND,OT_INTEGER,D3DRS_DESTBLEND)
_CONSTANT(D3DRS_CULLMODE,OT_INTEGER,D3DRS_CULLMODE)
_CONSTANT(D3DRS_ZFUNC,OT_INTEGER,D3DRS_ZFUNC)
_CONSTANT(D3DRS_ALPHAREF,OT_INTEGER,D3DRS_ALPHAREF)
_CONSTANT(D3DRS_ALPHAFUNC,OT_INTEGER,D3DRS_ALPHAFUNC)
_CONSTANT(D3DRS_DITHERENABLE,OT_INTEGER,D3DRS_DITHERENABLE)
_CONSTANT(D3DRS_ALPHABLENDENABLE,OT_INTEGER,D3DRS_ALPHABLENDENABLE)
_CONSTANT(D3DRS_FOGENABLE,OT_INTEGER,D3DRS_FOGENABLE)
_CONSTANT(D3DRS_SPECULARENABLE,OT_INTEGER,D3DRS_SPECULARENABLE)
_CONSTANT(D3DRS_FOGCOLOR,OT_INTEGER,D3DRS_FOGCOLOR)
_CONSTANT(D3DRS_FOGTABLEMODE,OT_INTEGER,D3DRS_FOGTABLEMODE)
_CONSTANT(D3DRS_FOGSTART,OT_INTEGER,D3DRS_FOGSTART)
_CONSTANT(D3DRS_FOGEND,OT_INTEGER,D3DRS_FOGEND)
_CONSTANT(D3DRS_FOGDENSITY,OT_INTEGER,D3DRS_FOGDENSITY)
_CONSTANT(D3DRS_RANGEFOGENABLE,OT_INTEGER,D3DRS_RANGEFOGENABLE)
_CONSTANT(D3DRS_STENCILENABLE,OT_INTEGER,D3DRS_STENCILENABLE)
_CONSTANT(D3DRS_STENCILFAIL,OT_INTEGER,D3DRS_STENCILFAIL)
_CONSTANT(D3DRS_STENCILZFAIL,OT_INTEGER,D3DRS_STENCILZFAIL)
_CONSTANT(D3DRS_STENCILPASS,OT_INTEGER,D3DRS_STENCILPASS)
_CONSTANT(D3DRS_STENCILFUNC,OT_INTEGER,D3DRS_STENCILFUNC)
_CONSTANT(D3DRS_STENCILREF,OT_INTEGER,D3DRS_STENCILREF)
_CONSTANT(D3DRS_STENCILMASK,OT_INTEGER,D3DRS_STENCILMASK)
_CONSTANT(D3DRS_STENCILWRITEMASK,OT_INTEGER,D3DRS_STENCILWRITEMASK)
_CONSTANT(D3DRS_TEXTUREFACTOR,OT_INTEGER,D3DRS_TEXTUREFACTOR)
_CONSTANT(D3DRS_WRAP0,OT_INTEGER,D3DRS_WRAP0)
_CONSTANT(D3DRS_WRAP1,OT_INTEGER,D3DRS_WRAP1)
_CONSTANT(D3DRS_WRAP2,OT_INTEGER,D3DRS_WRAP2)
_CONSTANT(D3DRS_WRAP3,OT_INTEGER,D3DRS_WRAP3)
_CONSTANT(D3DRS_WRAP4,OT_INTEGER,D3DRS_WRAP4)
_CONSTANT(D3DRS_WRAP5,OT_INTEGER,D3DRS_WRAP5)
_CONSTANT(D3DRS_WRAP6,OT_INTEGER,D3DRS_WRAP6)
_CONSTANT(D3DRS_WRAP7,OT_INTEGER,D3DRS_WRAP7)
_CONSTANT(D3DRS_CLIPPING,OT_INTEGER,D3DRS_CLIPPING)
_CONSTANT(D3DRS_LIGHTING,OT_INTEGER,D3DRS_LIGHTING)
_CONSTANT(D3DRS_AMBIENT,OT_INTEGER,D3DRS_AMBIENT)
_CONSTANT(D3DRS_FOGVERTEXMODE,OT_INTEGER,D3DRS_FOGVERTEXMODE)
_CONSTANT(D3DRS_COLORVERTEX,OT_INTEGER,D3DRS_COLORVERTEX)
_CONSTANT(D3DRS_LOCALVIEWER,OT_INTEGER,D3DRS_LOCALVIEWER)
_CONSTANT(D3DRS_NORMALIZENORMALS,OT_INTEGER,D3DRS_NORMALIZENORMALS)
_CONSTANT(D3DRS_DIFFUSEMATERIALSOURCE,OT_INTEGER,D3DRS_DIFFUSEMATERIALSOURCE)
_CONSTANT(D3DRS_SPECULARMATERIALSOURCE,OT_INTEGER,D3DRS_SPECULARMATERIALSOURCE)
_CONSTANT(D3DRS_AMBIENTMATERIALSOURCE,OT_INTEGER,D3DRS_AMBIENTMATERIALSOURCE)
_CONSTANT(D3DRS_EMISSIVEMATERIALSOURCE,OT_INTEGER,D3DRS_EMISSIVEMATERIALSOURCE)
_CONSTANT(D3DRS_VERTEXBLEND,OT_INTEGER,D3DRS_VERTEXBLEND)
_CONSTANT(D3DRS_CLIPPLANEENABLE,OT_INTEGER,D3DRS_CLIPPLANEENABLE)
_CONSTANT(D3DRS_POINTSIZE,OT_INTEGER,D3DRS_POINTSIZE)
_CONSTANT(D3DRS_POINTSIZE_MIN,OT_INTEGER,D3DRS_POINTSIZE_MIN)
_CONSTANT(D3DRS_POINTSPRITEENABLE,OT_INTEGER,D3DRS_POINTSPRITEENABLE)
_CONSTANT(D3DRS_POINTSCALEENABLE,OT_INTEGER,D3DRS_POINTSCALEENABLE)
_CONSTANT(D3DRS_POINTSCALE_A,OT_INTEGER,D3DRS_POINTSCALE_A)
_CONSTANT(D3DRS_POINTSCALE_B,OT_INTEGER,D3DRS_POINTSCALE_B)
_CONSTANT(D3DRS_POINTSCALE_C,OT_INTEGER,D3DRS_POINTSCALE_C)
_CONSTANT(D3DRS_MULTISAMPLEANTIALIAS,OT_INTEGER,D3DRS_MULTISAMPLEANTIALIAS)
_CONSTANT(D3DRS_MULTISAMPLEMASK,OT_INTEGER,D3DRS_MULTISAMPLEMASK)
_CONSTANT(D3DRS_PATCHEDGESTYLE,OT_INTEGER,D3DRS_PATCHEDGESTYLE)
_CONSTANT(D3DRS_DEBUGMONITORTOKEN,OT_INTEGER,D3DRS_DEBUGMONITORTOKEN)
_CONSTANT(D3DRS_POINTSIZE_MAX,OT_INTEGER,D3DRS_POINTSIZE_MAX)
_CONSTANT(D3DRS_INDEXEDVERTEXBLENDENABLE,OT_INTEGER,D3DRS_INDEXEDVERTEXBLENDENABLE)
_CONSTANT(D3DRS_COLORWRITEENABLE,OT_INTEGER,D3DRS_COLORWRITEENABLE)
_CONSTANT(D3DRS_TWEENFACTOR,OT_INTEGER,D3DRS_TWEENFACTOR)
_CONSTANT(D3DRS_BLENDOP,OT_INTEGER,D3DRS_BLENDOP)
_CONSTANT(D3DRS_POSITIONDEGREE,OT_INTEGER,D3DRS_POSITIONDEGREE)
_CONSTANT(D3DRS_NORMALDEGREE,OT_INTEGER,D3DRS_NORMALDEGREE)
_CONSTANT(D3DRS_SCISSORTESTENABLE,OT_INTEGER,D3DRS_SCISSORTESTENABLE)
_CONSTANT(D3DRS_SLOPESCALEDEPTHBIAS,OT_INTEGER,D3DRS_SLOPESCALEDEPTHBIAS)
_CONSTANT(D3DRS_ANTIALIASEDLINEENABLE,OT_INTEGER,D3DRS_ANTIALIASEDLINEENABLE)
_CONSTANT(D3DRS_MINTESSELLATIONLEVEL,OT_INTEGER,D3DRS_MINTESSELLATIONLEVEL)
_CONSTANT(D3DRS_MAXTESSELLATIONLEVEL,OT_INTEGER,D3DRS_MAXTESSELLATIONLEVEL)
_CONSTANT(D3DRS_ADAPTIVETESS_X,OT_INTEGER,D3DRS_ADAPTIVETESS_X)
_CONSTANT(D3DRS_ADAPTIVETESS_Y,OT_INTEGER,D3DRS_ADAPTIVETESS_Y)
_CONSTANT(D3DRS_ADAPTIVETESS_Z,OT_INTEGER,D3DRS_ADAPTIVETESS_Z)
_CONSTANT(D3DRS_ADAPTIVETESS_W,OT_INTEGER,D3DRS_ADAPTIVETESS_W)
_CONSTANT(D3DRS_ENABLEADAPTIVETESSELLATION,OT_INTEGER,D3DRS_ENABLEADAPTIVETESSELLATION)
_CONSTANT(D3DRS_TWOSIDEDSTENCILMODE,OT_INTEGER,D3DRS_TWOSIDEDSTENCILMODE)
_CONSTANT(D3DRS_CCW_STENCILFAIL,OT_INTEGER,D3DRS_CCW_STENCILFAIL)
_CONSTANT(D3DRS_CCW_STENCILZFAIL,OT_INTEGER,D3DRS_CCW_STENCILZFAIL)
_CONSTANT(D3DRS_CCW_STENCILPASS,OT_INTEGER,D3DRS_CCW_STENCILPASS)
_CONSTANT(D3DRS_CCW_STENCILFUNC,OT_INTEGER,D3DRS_CCW_STENCILFUNC)
_CONSTANT(D3DRS_COLORWRITEENABLE1,OT_INTEGER,D3DRS_COLORWRITEENABLE1)
_CONSTANT(D3DRS_COLORWRITEENABLE2,OT_INTEGER,D3DRS_COLORWRITEENABLE2)
_CONSTANT(D3DRS_COLORWRITEENABLE3,OT_INTEGER,D3DRS_COLORWRITEENABLE3)
_CONSTANT(D3DRS_BLENDFACTOR,OT_INTEGER,D3DRS_BLENDFACTOR)
_CONSTANT(D3DRS_SRGBWRITEENABLE,OT_INTEGER,D3DRS_SRGBWRITEENABLE)
_CONSTANT(D3DRS_DEPTHBIAS,OT_INTEGER,D3DRS_DEPTHBIAS)
_CONSTANT(D3DRS_WRAP8,OT_INTEGER,D3DRS_WRAP8)
_CONSTANT(D3DRS_WRAP9,OT_INTEGER,D3DRS_WRAP9)
_CONSTANT(D3DRS_WRAP10,OT_INTEGER,D3DRS_WRAP10)
_CONSTANT(D3DRS_WRAP11,OT_INTEGER,D3DRS_WRAP11)
_CONSTANT(D3DRS_WRAP12,OT_INTEGER,D3DRS_WRAP12)
_CONSTANT(D3DRS_WRAP13,OT_INTEGER,D3DRS_WRAP13)
_CONSTANT(D3DRS_WRAP14,OT_INTEGER,D3DRS_WRAP14)
_CONSTANT(D3DRS_WRAP15,OT_INTEGER,D3DRS_WRAP15)
_CONSTANT(D3DRS_SEPARATEALPHABLENDENABLE,OT_INTEGER,D3DRS_SEPARATEALPHABLENDENABLE)
_CONSTANT(D3DRS_SRCBLENDALPHA,OT_INTEGER,D3DRS_SRCBLENDALPHA)
_CONSTANT(D3DRS_DESTBLENDALPHA,OT_INTEGER,D3DRS_DESTBLENDALPHA)
_CONSTANT(D3DRS_BLENDOPALPHA,OT_INTEGER,D3DRS_BLENDOPALPHA)
_CONSTANT(D3DRS_FORCE_DWORD,OT_INTEGER,D3DRS_FORCE_DWORD)
_END_NAMESPACE(DX,NULL)
+151
View File
@@ -0,0 +1,151 @@
#include "stdafx.h"
#include "sqplusWin32.h"
#include "DXSquirrel_Binds.h"
extern WNDCLASSEX gWC;
extern IDirect3D9 * gpD3D;
_MEMBER_FUNCTION_IMPL(Device,constructor)
{
StackHandler sa(v);
//PARSES the params
SquirrelObject params = sa.GetObjectHandle(2);
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
//defaults
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
d3dpp.BackBufferWidth = 640;
d3dpp.BackBufferHeight = 480;
//windowed
if(params.Exists(_T("Windowed"))) {
d3dpp.Windowed = params.GetBool(_T("Windowed"))? TRUE : FALSE;
}
if(params.Exists(_T("SwapEffect"))) {
d3dpp.SwapEffect = (D3DSWAPEFFECT)params.GetInt(_T("SwapEffect"));
}
if(params.Exists(_T("BackBufferFormat"))) {
d3dpp.BackBufferFormat = (D3DFORMAT)params.GetInt(_T("BackBufferFormat"));
}
if(params.Exists(_T("EnableAutoDepthStencil"))) {
d3dpp.EnableAutoDepthStencil = params.GetBool(_T("EnableAutoDepthStencil"))? TRUE : FALSE;
}
if(params.Exists(_T("AutoDepthStencilFormat"))) {
d3dpp.AutoDepthStencilFormat = (D3DFORMAT)params.GetInt(_T("AutoDepthStencilFormat"));
}
if(params.Exists(_T("BackBufferWidth"))) {
d3dpp.BackBufferWidth = params.GetInt(_T("BackBufferWidth"));
}
if(params.Exists(_T("BackBufferHeight"))) {
d3dpp.BackBufferHeight = params.GetInt(_T("BackBufferHeight"));
}
//create the window
HWND hWnd = CreateWindow( _T("DXSquirrel"), _T("DXSquirrel"),
0, CW_USEDEFAULT, CW_USEDEFAULT, d3dpp.BackBufferWidth, d3dpp.BackBufferHeight,
NULL, NULL, gWC.hInstance, NULL );
if(!hWnd) return sa.ThrowError(_T("Error creating the window"));
EnableWindow(hWnd,TRUE);
ShowWindow(hWnd,SW_SHOW);
//d3dpp.hDeviceWindow = hWnd;
//PARSES the params
IDirect3DDevice9 *pDev;
HRESULT hr;
if(FAILED(hr = gpD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp, &pDev))) {
return sa.ThrowError(_T("Error initializing the device"));
}
return construct_RefCounted(pDev);
}
_MEMBER_FUNCTION_IMPL(Device,BeginScene)
{
StackHandler sa(v);
_CHECK_SELF(IDirect3DDevice9,Device);
if(FAILED(self->BeginScene())) {
return sa.ThrowError(_T("BeginScene failed"));
}
return 0;
}
_MEMBER_FUNCTION_IMPL(Device,EndScene)
{
StackHandler sa(v);
_CHECK_SELF(IDirect3DDevice9,Device);
if(FAILED(self->EndScene())) {
return sa.ThrowError(_T("EndScene failed"));
}
return 0;
}
//params (this,flags,[color],[z],[stencil])
_MEMBER_FUNCTION_IMPL(Device,Clear)
{
StackHandler sa(v);
_CHECK_SELF(IDirect3DDevice9,Device);
FLOAT z = 1.0f;
DWORD color = 0xFF000000;
DWORD stencil = 0;
INT params = sa.GetParamCount();
if(params > 2) {
color = (DWORD)sa.GetInt(3);
}
if(params > 3) {
z = sa.GetFloat(4);
}
if(params > 4) {
stencil = (DWORD)sa.GetInt(4);
}
HRESULT hr;
if(FAILED(hr = self->Clear(0,NULL,(DWORD)sa.GetInt(2),color,z,stencil)))
{
return sa.ThrowError(_T("Clear failed"));
}
return 0;
}
_MEMBER_FUNCTION_IMPL(Device,Present)
{
StackHandler sa(v);
_CHECK_SELF(IDirect3DDevice9,Device);
self->Present(NULL,NULL,NULL,NULL);
return 0;
}
_MEMBER_FUNCTION_IMPL(Device,SetTransform)
{
StackHandler sa(v);
_CHECK_SELF(IDirect3DDevice9,Device);
_CHECK_INST_PARAM(mat,3,D3DXMATRIX,Matrix);
self->SetTransform((D3DTRANSFORMSTATETYPE)sa.GetInt(2),mat);
return 0;
}
_MEMBER_FUNCTION_IMPL(Device,SetRenderState)
{
StackHandler sa(v);
_CHECK_SELF(IDirect3DDevice9,Device);
self->SetRenderState((D3DRENDERSTATETYPE)sa.GetInt(2),(DWORD)sa.GetInt(3));
return 0;
}
_BEGIN_CLASS(Device)
_MEMBER_FUNCTION(Device,constructor,2,_T("xt"))
_MEMBER_FUNCTION(Device,BeginScene,0,NULL)
_MEMBER_FUNCTION(Device,EndScene,0,NULL)
_MEMBER_FUNCTION(Device,Present,0,NULL)
_MEMBER_FUNCTION(Device,Clear,-2,_T("xnnnn"))
_MEMBER_FUNCTION(Device,SetTransform,3,_T("xnx"))
_MEMBER_FUNCTION(Device,SetRenderState,3,_T("xnn|b"))
_END_CLASS(Device)
+532
View File
@@ -0,0 +1,532 @@
#include "stdafx.h"
#include "sqplus.h"
#include "DXSquirrel_Binds.h"
_IMPL_NATIVE_CONSTRUCTION(Vector3,D3DXVECTOR3);
_MEMBER_FUNCTION_IMPL(Vector3,constructor)
{
D3DXVECTOR3 temp;
D3DXVECTOR3 *newv = NULL;
StackHandler sa(v);
int nparams = sa.GetParamCount();
switch(nparams) {
case 1:
temp.x = 0;
temp.y = 0;
temp.z = 0;
break;
case 2:
if(sa.GetType(2) == OT_INSTANCE) {
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
if(vec) temp = *vec;
else return sa.ThrowError(_T("Vector3() invalid instance type"));
}
break;
case 4:
temp.x = sa.GetFloat(2);
temp.y = sa.GetFloat(3);
temp.z = sa.GetFloat(4);
break;
default:
return sa.ThrowError(_T("Vector3() wrong parameters"));
}
newv = new D3DXVECTOR3(temp);
return construct_Vector3(newv);
}
_MEMBER_FUNCTION_IMPL(Vector3,_set)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
const SQChar *s = sa.GetString(2);
int index = s?s[0]:sa.GetInt(2);
switch(index) {
case 0: case 'x': case 'r':
return sa.Return(self->x = sa.GetFloat(3));
break;
case 1: case 'y': case 'g':
return sa.Return(self->y = sa.GetFloat(3));
break;
case 2: case 'z': case 'b':
return sa.Return(self->z = sa.GetFloat(3));
break;
}
return SQ_ERROR;
}
_MEMBER_FUNCTION_IMPL(Vector3,_get)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
const SQChar *s = sa.GetString(2);
if(s && (s[1] != 0))
return SQ_ERROR;
int index = s && (s[1] == 0)?s[0]:sa.GetInt(2);
switch(index) {
case 0: case 'x': case 'r': return sa.Return(self->x); break;
case 1: case 'y': case 'g': return sa.Return(self->y); break;
case 2: case 'z': case 'b': return sa.Return(self->z); break;
}
return SQ_ERROR;
}
_MEMBER_FUNCTION_IMPL(Vector3,_nexti)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
int index = -1;
if(sa.GetType(2) == OT_NULL) {
index = -1;
}else {
const SQChar *s = sa.GetString(2);
if(s && (s[1] != 0))
return SQ_ERROR;
index = s && (s[1] == 0)?s[0]:sa.GetInt(2);
}
switch(index) {
case 0xFFFFFFFF: return sa.Return(_T("x"));
case 0: case 'x': case 'r': return sa.Return(_T("y"));
case 1: case 'y': case 'g': return sa.Return(_T("z"));
case 2: case 'z': case 'b': return sa.Return();
}
return sa.Return(_T("invalid index"));
}
_MEMBER_FUNCTION_IMPL(Vector3,_cmp)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
if((*self) == (*vec))
return sa.Return(0);
if((*self) < (*vec))
return sa.Return(-1);
return sa.Return(1);
}
_MEMBER_FUNCTION_IMPL(Vector3,_add)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXVECTOR3 tv = (*self)+(*vec);
SquirrelObject so = new_Vector3(tv);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Vector3,_sub)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXVECTOR3 tv = (*self)-(*vec);
SquirrelObject so = new_Vector3(tv);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Vector3,_mul)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
D3DXVECTOR3 tv = (*self)*sa.GetFloat(2);
SquirrelObject so = new_Vector3(tv);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Vector3,_div)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
D3DXVECTOR3 tv = (*self)/sa.GetFloat(2);
SquirrelObject so = new_Vector3(tv);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Vector3,DotProduct)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
return sa.Return(D3DXVec3Dot(self,vec));
}
_MEMBER_FUNCTION_IMPL(Vector3,CrossProduct)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXVECTOR3 ret;
D3DXVec3Cross(&ret,self,vec);
SquirrelObject so = new_Vector3(ret);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Vector3,SquareDistance)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXVECTOR3 tmp = *self - *vec;
return sa.Return(D3DXVec3LengthSq(&tmp));
}
_MEMBER_FUNCTION_IMPL(Vector3,Distance)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXVECTOR3 tmp = *self - *vec;
return sa.Return(D3DXVec3Length(&tmp));
}
_MEMBER_FUNCTION_IMPL(Vector3,Length)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
return sa.Return(D3DXVec3Length(self));
}
_MEMBER_FUNCTION_IMPL(Vector3,SquareLength)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
return sa.Return(D3DXVec3LengthSq(self));
}
_MEMBER_FUNCTION_IMPL(Vector3,Normalize)
{
_CHECK_SELF(D3DXVECTOR3,Vector3);
D3DXVec3Normalize(self,self);
return 0;
}
_MEMBER_FUNCTION_IMPL(Vector3,GetNormalized)
{
StackHandler sa(v);
_CHECK_SELF(D3DXVECTOR3,Vector3);
D3DXVECTOR3 tmp;
D3DXVec3Normalize(&tmp,self);
SquirrelObject so = new_Vector3(tmp);
return sa.Return(so);
}
_BEGIN_CLASS(Vector3)
_MEMBER_FUNCTION(Vector3,constructor,-1,_T(".n|xnn"))
_MEMBER_FUNCTION(Vector3,_set,3,_T("xs|n"))
_MEMBER_FUNCTION(Vector3,_get,2,_T("xs|n"))
_MEMBER_FUNCTION(Vector3,_add,2,_T("xx"))
_MEMBER_FUNCTION(Vector3,_sub,2,_T("xx"))
_MEMBER_FUNCTION(Vector3,_mul,2,_T("xn"))
_MEMBER_FUNCTION(Vector3,_div,2,_T("xn"))
_MEMBER_FUNCTION(Vector3,_nexti,2,_T("x"))
_MEMBER_FUNCTION(Vector3,_cmp,2,_T("xx"))
_MEMBER_FUNCTION(Vector3,DotProduct,2,_T("xx"))
_MEMBER_FUNCTION(Vector3,CrossProduct,2,_T("xx"))
_MEMBER_FUNCTION(Vector3,SquareDistance,2,_T("xx"))
_MEMBER_FUNCTION(Vector3,Distance,2,_T("xx"))
_MEMBER_FUNCTION(Vector3,Length,1,_T("x"))
_MEMBER_FUNCTION(Vector3,SquareLength,1,_T("x"))
_MEMBER_FUNCTION(Vector3,Normalize,1,_T("x"))
_MEMBER_FUNCTION(Vector3,GetNormalized,1,_T("x"))
_END_CLASS(Vector3)
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
_IMPL_NATIVE_CONSTRUCTION(Matrix,D3DXMATRIX);
_MEMBER_FUNCTION_IMPL(Matrix,constructor)
{
D3DXMATRIX temp;
D3DXMATRIX *newm = NULL;
StackHandler sa(v);
switch(sa.GetParamCount()) {
case 1:
D3DXMatrixIdentity(&temp);
break;
case 2:
if(sa.GetType(2) == OT_INSTANCE) {
_CHECK_INST_PARAM(mat,2,D3DXMATRIX,Matrix);
if(mat) temp = *mat;
else return sa.ThrowError(_T("Matrix() invalid instance type"));
}
else {
SquirrelObject arr = sa.GetObjectHandle(2);
if(arr.Len() != 16) {
return sa.ThrowError(_T("Matrix(array) need a 16 elements array"));
}
FLOAT *fp = (FLOAT*)&temp.m;
SquirrelObject idx,val;
if(arr.BeginIteration()) {
while(arr.Next(idx,val)) {
fp[idx.ToInteger()] = val.ToFloat();
}
arr.EndIteration();
}
}
break;
default:
return sa.ThrowError(_T("Matrix() wrong number of parameters"));
break;
}
newm = new D3DXMATRIX(temp);
return construct_Matrix(newm);
}
_MEMBER_FUNCTION_IMPL(Matrix,_set)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
int index = sa.GetInt(2);
if(index < 0 && index > 4*4)
return SQ_ERROR;
((FLOAT *)self->m)[index] = sa.GetFloat(2);
return SQ_OK;
}
_MEMBER_FUNCTION_IMPL(Matrix,_get)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
int index = sa.GetInt(2);
if(index < 0 && index > 4*4)
return SQ_ERROR;
return sa.Return(((FLOAT *)self->m)[index]);
}
_MEMBER_FUNCTION_IMPL(Matrix,_add)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(mat,2,D3DXMATRIX,Matrix);
D3DXMATRIX tm = (*self)+(*mat);
SquirrelObject so = new_Matrix(tm);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Matrix,_sub)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(mat,2,D3DXMATRIX,Matrix);
D3DXMATRIX tm = (*self)-(*mat);
SquirrelObject so = new_Matrix(tm);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Matrix,_mul)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
int t = sa.GetType(2);
if(t == OT_INSTANCE) {
_CHECK_INST_PARAM(mat,2,D3DXMATRIX,Matrix);
D3DXMATRIX tm = (*self)*(*mat);
SquirrelObject so = new_Matrix(tm);
return sa.Return(so);
}
D3DXMATRIX tm = (*self)*sa.GetFloat(2);
SquirrelObject so = new_Matrix(tm);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Matrix,_div)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
D3DXMATRIX tm = (*self)/sa.GetFloat(2);
SquirrelObject so = new_Matrix(tm);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Matrix,CreateIdentity)
{
_CHECK_SELF(D3DXMATRIX,Matrix);
D3DXMatrixIdentity(self);
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,CreateRotationAxis)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXMatrixRotationAxis(self,vec,sa.GetFloat(3));
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,CreateRotationAngles)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXMatrixRotationAxis(self,vec,sa.GetFloat(3));
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,CreateScalingMatrix)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
D3DXMatrixScaling(self,sa.GetFloat(2),sa.GetFloat(3),sa.GetFloat(4));
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,CreateTranslationMatrix)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
D3DXMatrixTranslation(self,sa.GetFloat(2),sa.GetFloat(3),sa.GetFloat(4));
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,CreateLookAtMatrix)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(eye,2,D3DXVECTOR3,Vector3);
_CHECK_INST_PARAM(at,3,D3DXVECTOR3,Vector3);
_CHECK_INST_PARAM(up,4,D3DXVECTOR3,Vector3);
D3DXMatrixLookAtLH(self,eye,at,up);
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,CreatePerspectiveFovMatrix)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
D3DXMatrixPerspectiveFovLH(self,sa.GetFloat(2),sa.GetFloat(3),sa.GetFloat(4),sa.GetFloat(5));
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,RotateAngles)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXMatrixRotationYawPitchRoll(self,vec->y,vec->x,vec->z);
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,RotateAxis)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXMatrixRotationAxis(self,vec,sa.GetFloat(3));
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,Translate)
{
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXMATRIX temp;
D3DXMatrixTranslation(&temp,vec->x,vec->y,vec->z);
D3DXMatrixMultiply(self,&temp,self);
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,Scale)
{
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXMATRIX temp;
D3DXMatrixScaling(&temp,vec->x,vec->y,vec->z);
D3DXMatrixMultiply(self,&temp,self);
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,GetInverse)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
D3DXMATRIX temp;
D3DXMatrixInverse(&temp,NULL,self);
SquirrelObject so = new_Matrix(temp);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Matrix,GetTransposed)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
D3DXMATRIX temp;
D3DXMatrixTranspose(&temp,self);
SquirrelObject so = new_Matrix(temp);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Matrix,GetInverseTransposed)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
D3DXMATRIX temp;
D3DXMatrixInverse(&temp,NULL,self);
D3DXMatrixTranspose(&temp,&temp);
SquirrelObject so = new_Matrix(temp);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Matrix,Invert)
{
_CHECK_SELF(D3DXMATRIX,Matrix);
D3DXMatrixInverse(self,NULL,self);
return 0;
}
_MEMBER_FUNCTION_IMPL(Matrix,TransformCoord)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXVECTOR3 ret;
D3DXVec3TransformCoord(&ret,vec,self);
SquirrelObject so = new_Vector3(ret);
return sa.Return(so);
}
_MEMBER_FUNCTION_IMPL(Matrix,TransformNormal)
{
StackHandler sa(v);
_CHECK_SELF(D3DXMATRIX,Matrix);
_CHECK_INST_PARAM(vec,2,D3DXVECTOR3,Vector3);
D3DXVECTOR3 ret;
D3DXVec3TransformNormal(&ret,vec,self);
SquirrelObject so = new_Vector3(ret);
return sa.Return(so);
}
_BEGIN_CLASS(Matrix)
_MEMBER_FUNCTION(Matrix,constructor,-1,_T(".a|x"))
_MEMBER_FUNCTION(Matrix,_set,2,_T("xn"))
_MEMBER_FUNCTION(Matrix,_get,2,_T("xn"))
_MEMBER_FUNCTION(Matrix,_add,2,_T("xx"))
_MEMBER_FUNCTION(Matrix,_sub,2,_T("xx"))
_MEMBER_FUNCTION(Matrix,_mul,2,_T("xx|n"))
_MEMBER_FUNCTION(Matrix,_div,2,_T("xn"))
_MEMBER_FUNCTION(Matrix,CreateIdentity,1,_T("x"))
_MEMBER_FUNCTION(Matrix,CreateRotationAxis,3,_T("xxn"))
_MEMBER_FUNCTION(Matrix,CreateRotationAngles,2,_T("xx"))
_MEMBER_FUNCTION(Matrix,CreateScalingMatrix,4,_T("xnnn"))
_MEMBER_FUNCTION(Matrix,CreateTranslationMatrix,4,_T("xnnn"))
_MEMBER_FUNCTION(Matrix,CreateLookAtMatrix,4,_T("xxxx"))
_MEMBER_FUNCTION(Matrix,CreatePerspectiveFovMatrix,5,_T("xnnnn"))
_MEMBER_FUNCTION(Matrix,RotateAngles,2,_T("xx"))
_MEMBER_FUNCTION(Matrix,RotateAxis,3,_T("xxn"))
_MEMBER_FUNCTION(Matrix,Translate,2,_T("xx"))
_MEMBER_FUNCTION(Matrix,Scale,2,_T("xx"))
_MEMBER_FUNCTION(Matrix,GetInverse,1,_T("x"))
_MEMBER_FUNCTION(Matrix,GetTransposed,1,_T("x"))
_MEMBER_FUNCTION(Matrix,GetInverseTransposed,1,_T("x"))
_MEMBER_FUNCTION(Matrix,Invert,1,_T("x"))
_MEMBER_FUNCTION(Matrix,TransformCoord,2,_T("xx"))
_MEMBER_FUNCTION(Matrix,TransformNormal,2,_T("xx"))
_END_CLASS(Matrix)
+37
View File
@@ -0,0 +1,37 @@
#include "stdafx.h"
#include "sqplusWin32.h"
#include "DXSquirrel_Binds.h"
_MEMBER_FUNCTION_IMPL(BaseMesh,constructor)
{
StackHandler sa(v);
return sa.ThrowError(_T("BaseMesh cannot be constructed directly"));
}
_MEMBER_FUNCTION_IMPL(BaseMesh,DrawSubset)
{
StackHandler sa(v);
_CHECK_SELF(ID3DXBaseMesh,BaseMesh)
self->DrawSubset(sa.GetInt(2));
return 0;
}
_BEGIN_CLASS(BaseMesh)
_MEMBER_FUNCTION(BaseMesh,constructor,NULL,NULL)
_MEMBER_FUNCTION(BaseMesh,DrawSubset,2,_T("xn"))
_END_CLASS(BaseMesh)
_MEMBER_FUNCTION_IMPL(Mesh,constructor)
{
_CHECK_INST_PARAM(dev,2,IDirect3DDevice9,Device);
ID3DXMesh *pMesh;
if( FAILED(D3DXCreateTeapot(dev,&pMesh,NULL))) {
MessageBox(NULL, _T("Could not create the mesh"), _T("Meshes.exe"), MB_OK);
return E_FAIL;
}
return construct_RefCounted(pMesh);
}
_BEGIN_CLASS(Mesh)
_MEMBER_FUNCTION(Mesh,constructor,2,_T("xx"))
_END_CLASS_INHERITANCE(Mesh,BaseMesh)
+2
View File
@@ -0,0 +1,2 @@
#v4.0:v100
Debug|Win32|C:\Workplace\libs\sqplus\|
View File
Whitespace-only changes.
Binary file not shown.
+53
View File
@@ -0,0 +1,53 @@
========================================================================
WIN32 APPLICATION : DXSquirrel Project Overview
========================================================================
AppWizard has created this DXSquirrel application for you.
This file contains a summary of what you will find in each of the files that
make up your DXSquirrel application.
DXSquirrel.vcproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.
DXSquirrel.cpp
This is the main application source file.
/////////////////////////////////////////////////////////////////////////////
AppWizard has created the following resources:
DXSquirrel.rc
This is a listing of all of the Microsoft Windows resources that the
program uses. It includes the icons, bitmaps, and cursors that are stored
in the RES subdirectory. This file can be directly edited in Microsoft
Visual C++.
Resource.h
This is the standard header file, which defines new resource IDs.
Microsoft Visual C++ reads and updates this file.
DXSquirrel.ico
This is an icon file, which is used as the application's icon (32x32).
This icon is included by the main resource file DXSquirrel.rc.
small.ico
This is an icon file, which contains a smaller version (16x16)
of the application's icon. This icon is included by the main resource
file DXSquirrel.rc.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named DXSquirrel.pch and a precompiled types file named StdAfx.obj.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" comments to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////
+2
View File
@@ -0,0 +1,2 @@
#v4.0:v100
Release|Win32|C:\Workplace\libs\sqplus\|
Whitespace-only changes.
+29
View File
@@ -0,0 +1,29 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by DXSquirrel.rc
//
#define IDS_APP_TITLE 103
#define IDR_MAINFRAME 128
#define IDD_DXSQUIRREL_DIALOG 102
#define IDD_ABOUTBOX 103
#define IDM_ABOUT 104
#define IDM_EXIT 105
#define IDI_DXSQUIRREL 107
#define IDI_SMALL 108
#define IDC_DXSQUIRREL 109
#define IDC_MYICON 2
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 130
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 110
#endif
#endif
+44
View File
@@ -0,0 +1,44 @@
local presentparams = {
Windowed = true,
SwapEffect = DX.D3DSWAPEFFECT_DISCARD,
BackBufferFormat = DX.D3DFMT_A8R8G8B8,
EnableAutoDepthStencil = true,
AutoDepthStencilFormat = DX.D3DFMT_D16,
BackBufferWidth = 800,
BackBufferHeight = 600
}
local dev = Device(presentparams);
//INIT the mesh
local mesh = Mesh(dev);
local perspective = Matrix();
local view = Matrix();
local world = Matrix();
local eye = Vector3( 0.0, 3.0,-5.0 );
local lookat = Vector3( 0.0, 0.0, 0.0 );
local upVec = Vector3( 0.0, 1.0, 0.0 );
view.CreateLookAtMatrix(eye,lookat,upVec);
perspective.CreatePerspectiveFovMatrix(DX.D3DX_PI/4, 640.0/480, 1.0, 100.0)
dev.SetTransform(DX.D3DTS_VIEW,view);
dev.SetTransform(DX.D3DTS_PROJECTION,perspective);
dev.SetRenderState(DX.D3DRS_ZENABLE,true);
dev.SetRenderState(DX.D3DRS_AMBIENT,0xFFFFFFFF);
//MAIN LOOP
local rot = Vector3(0,0,0);
while(DX.Update()) {
dev.Clear(DX.D3DCLEAR_TARGET|DX.D3DCLEAR_ZBUFFER,0xFF0000FF);
dev.BeginScene();
rot.y += 0.1;
world.RotateAngles(rot);
dev.SetTransform(DX.D3DTS_WORLD,world);
mesh.DrawSubset(0);
//
dev.EndScene();
dev.Present();
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

+8
View File
@@ -0,0 +1,8 @@
// stdafx.cpp : source file that includes just the standard includes
// DXSquirrel.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
+20
View File
@@ -0,0 +1,20 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
#include <d3dx9.h>
// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include "squirrel.h"