Commit 24334f19 authored by engineer_apple's avatar engineer_apple

added Initial Windows Mobile 6 Version.

- Windows Mobile 6 SDK
- Visual Studio 2005 only
Minor:
- Burningvideo: MipMap Selection repaired
- renamed private Driver function getTextureSizeFromImageSize to
  getTextureSizeFromSurfaceSize


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1146 dfc29bdd-3216-0410-991c-e03cc46cb475
parent a2d8e808
30.12.2006 TA
added Initial Windows Mobile 6 Version.
- Windows Mobile 6 SDK
- Visual Studio 2005
Minor:
- Burningvideo: MipMap Selection
- Burningvideo: MipMap Selection repaired
- renamed private Driver function getTextureSizeFromImageSize to getTextureSizeFromSurfaceSize
-------------------------------------------
Changes in version 1.5 (... 2008)
......

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloWorld_mobile", "HelloWorld_mobile.vcproj", "{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\..\source\Irrlicht\Irrlicht_mobile6.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I)
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)
{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="17.HelloWorld_mobile"
ProjectGUID="{AD95D5D7-91D2-4030-B28D-23A6FE5C0359}"
RootNamespace="17.HelloWorld_mobile"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Windows Mobile 6 Professional SDK (ARMV4I)"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
OutputDirectory="..\..\bin\WinCE-visualstudio\"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
Optimization="0"
AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
MinimalRebuild="true"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
EnableFloatingPointEmulation="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions=" /subsystem:windowsce,5.02"
OutputFile="$(OutDir)\17.HelloWorld_mobile.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\lib\WinCE-visualstudio\"
DelayLoadDLLs="$(NOINHERIT)"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/HelloWorld_mobile.pdb"
SubSystem="0"
StackReserveSize="65536"
StackCommitSize="4096"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
<DeploymentTool
ForceDirty="-1"
RemoteDirectory="%CSIDL_PROGRAM_FILES%\irrlicht\bin\wince"
RegisterOutput="0"
AdditionalFiles="sydney.md2|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;sydney.bmp|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht.dll|$(InputDir)$(OutDir)|%CSIDL_PROGRAM_FILES%\irrlicht\bin\wince|0"
/>
<DebuggerTool
/>
</Configuration>
<Configuration
Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
OutputDirectory="..\..\bin\WinCE-visualstudio\"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
Optimization="2"
AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
EnableFloatingPointEmulation="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions=" /subsystem:windowsce,5.02"
OutputFile="$(OutDir)\17.HelloWorld_mobile.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\lib\WinCE-visualstudio\"
DelayLoadDLLs="$(NOINHERIT)"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/HelloWorld_mobile.pdb"
SubSystem="0"
StackReserveSize="65536"
StackCommitSize="4096"
OptimizeReferences="2"
EnableCOMDATFolding="2"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
<DeploymentTool
ForceDirty="-1"
RemoteDirectory="%CSIDL_PROGRAM_FILES%\irrlicht\bin\wince"
RegisterOutput="0"
AdditionalFiles="sydney.md2|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;sydney.bmp|$(InputDir)..\..\media|%CSIDL_PROGRAM_FILES%\irrlicht\media|0;irrlicht.dll|$(InputDir)$(OutDir)|%CSIDL_PROGRAM_FILES%\irrlicht\bin\wince|0"
/>
<DebuggerTool
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\main.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
#include <irrlicht.h>
#ifdef _IRR_USE_WINDOWS_CE_DEVICE_
#include <windows.h>
#endif
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#pragma comment(lib, "Irrlicht.lib")
class MyEventReceiver : public IEventReceiver
{
private:
IrrlichtDevice *Device;
public:
MyEventReceiver ( IrrlichtDevice *device ): Device ( device ) {}
virtual bool OnEvent(const SEvent& event)
{
if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
switch(event.GUIEvent.EventType)
{
case EGET_BUTTON_CLICKED:
if (id == 2)
{
Device->closeDevice();
return true;
} break;
}
}
return false;
}
};
class CSampleSceneNode : public ISceneNode
{
aabbox3d<f32> Box;
S3DVertex Vertices[4];
SMaterial Material;
public:
CSampleSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id)
: ISceneNode(parent, mgr, id)
{
Material.Wireframe = false;
Material.Lighting = false;
Vertices[0] = S3DVertex(0,0,10, 1,1,0, SColor(255,0,255,255), 0, 1);
Vertices[1] = S3DVertex(10,0,-10, 1,0,0, SColor(255,255,0,255), 1, 1);
Vertices[2] = S3DVertex(0,20,0, 0,1,1, SColor(255,255,255,0), 1, 0);
Vertices[3] = S3DVertex(-10,0,-10, 0,0,1, SColor(255,0,255,0), 0, 0);
Box.reset(Vertices[0].Pos);
for (s32 i=1; i<4; ++i)
Box.addInternalPoint(Vertices[i].Pos);
}
virtual void OnRegisterSceneNode()
{
if (IsVisible)
SceneManager->registerNodeForRendering(this);
ISceneNode::OnRegisterSceneNode();
}
virtual void render()
{
u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 };
IVideoDriver* driver = SceneManager->getVideoDriver();
driver->setMaterial(Material);
driver->setTransform(ETS_WORLD, AbsoluteTransformation);
driver->drawIndexedTriangleList(&Vertices[0], 4, &indices[0], 4);
}
virtual const aabbox3d<f32>& getBoundingBox() const
{
return Box;
}
virtual u32 getMaterialCount()
{
return 1;
}
virtual SMaterial& getMaterial(u32 i)
{
return Material;
}
};
#if defined(_WIN32_WCE)
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine,
int nCmdShow )
#else
int main()
#endif
{
E_DRIVER_TYPE driverType = EDT_BURNINGSVIDEO;
// create device
IrrlichtDevice *device =
//createDevice(driverType, dimension2d<s32>(220, 240), 16, false );
createDevice(driverType, dimension2d<s32>(240, 320), 16, true );
if (device == 0)
return 1; // could not create selected driver.
// create engine and camera
MyEventReceiver receiver(device);
device->setEventReceiver(&receiver);
device->setWindowCaption(L"Irrlicht CE Demo");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
// set the filesystem relative to the executable
{
wchar_t buf[255];
GetModuleFileNameW ( 0, buf, 255 );
stringc base = buf;
base = base.subString ( 0, base.findLast ( '\\' ) );
device->getFileSystem()->addFolderFileArchive ( base.c_str() );
}
IGUIStaticText *text =
guienv->addStaticText(L"FPS: 25",
rect<s32>(60,5,200,20), false );
guienv->addButton(core::rect<int>(10,5,50,20), 0, 2, L"Quit");
smgr->addCameraSceneNode(0, vector3df(0,-40,0), vector3df(0,0,0));
CSampleSceneNode *myNode =
new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666);
ISceneNodeAnimator* anim =
smgr->createRotationAnimator(vector3df(0.8f, 0, 0.8f));
if(anim)
{
myNode->addAnimator(anim);
anim->drop();
anim = 0; // As I shouldn't refer to it again, ensure that I can't
}
myNode->drop();
myNode = 0; // As I shouldn't refer to it again, ensure that I can't
u32 frames=0;
while(device->run())
{
driver->beginScene(true, true, SColor(0,100,100,100));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
if (++frames==10)
{
stringw str = L"FPS: ";
str += (s32)driver->getFPS();
text->setText ( str.c_str() );
frames=0;
}
}
device->drop();
return 0;
}
......@@ -17,6 +17,7 @@
//! _IRR_POSIX_API_ for Posix compatible systems
//! _IRR_USE_SDL_DEVICE_ for platform independent SDL framework
//! _IRR_USE_WINDOWS_DEVICE_ for Windows API based device
//! _IRR_USE_WINDOWS_CE_DEVICE_ for Windows CE API based device
//! _IRR_USE_LINUX_DEVICE_ for X11 based device
//! MACOSX for Mac OS X
......@@ -24,7 +25,7 @@
//! WIN32 for Windows32
//! WIN64 for Windows64
#if defined(WIN32) || defined(WIN64)
#if defined(WIN32) || defined(WIN64) || defined(_WIN32_WCE)
#define _IRR_WINDOWS_
#define _IRR_WINDOWS_API_
#ifndef _IRR_USE_SDL_DEVICE_
......@@ -312,5 +313,17 @@ precision will be lower but speed higher. currently X86 only
#undef _IRR_COMPILE_WITH_DIRECT3D_9_
#endif
// WinCE does not have OpenGL or DirectX9
#if defined(_WIN32_WCE)
#undef _IRR_COMPILE_WITH_OPENGL_
#undef _IRR_COMPILE_WITH_DIRECT3D_8_
#undef _IRR_COMPILE_WITH_DIRECT3D_9_
#undef _IRR_COMPILE_WITH_SOFTWARE_
#undef BURNINGVIDEO_RENDERER_BEAUTIFUL
#undef _IRR_USE_WINDOWS_DEVICE_
#define _IRR_USE_WINDOWS_CE_DEVICE_
#define BURNINGVIDEO_RENDERER_CE
#endif
#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__
......@@ -9,7 +9,7 @@
#include "irrTypes.h"
#include <math.h>
#if defined(_IRR_SOLARIS_PLATFORM_) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
#if defined(_IRR_SOLARIS_PLATFORM_) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) || defined (_WIN32_WCE)
#define sqrtf(X) (f32)sqrt((f64)(X))
#define sinf(X) (f32)sin((f64)(X))
#define cosf(X) (f32)cos((f64)(X))
......
......@@ -70,7 +70,7 @@ typedef double f64;
//! standard on Windows platforms, but it does on all others.
//! These should be int snprintf(char *str, size_t size, const char *format, ...);
//! and int swprintf(wchar_t *wcs, size_t maxlen, const wchar_t *format, ...);
#if defined(_MSC_VER) && _MSC_VER > 1310
#if defined(_MSC_VER) && _MSC_VER > 1310 && !defined (_WIN32_WCE)
#define swprintf swprintf_s
#define snprintf sprintf_s
#else
......@@ -97,7 +97,7 @@ typedef unsigned short wchar_t;
//! define a break macro for debugging.
#if defined(_DEBUG)
#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER)
#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && !defined (_WIN32_WCE)
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3}
#else
#include "assert.h"
......@@ -122,7 +122,7 @@ Compiler version defines: VC6.0 : 1200, VC7.0 : 1300, VC7.1 : 1310, VC8.0 : 1400
// memory debugging
#if defined(_DEBUG) && defined(IRRLICHT_EXPORTS) && defined(_MSC_VER) && \
(_MSC_VER > 1299) && !defined(_IRR_DONT_DO_MEMORY_DEBUGGING_HERE)
(_MSC_VER > 1299) && !defined(_IRR_DONT_DO_MEMORY_DEBUGGING_HERE) && !defined(_WIN32_WCE)
#define CRTDBG_MAP_ALLOC
#define _CRTDBG_MAP_ALLOC
......
......@@ -483,7 +483,7 @@ inline void quaternion::toAngleAxis(f32 &angle, core::vector3df &axis) const
}
else
{
angle = 2.0f * acos(W);
angle = 2.0f * (f32) acos(W);
axis.X = X / scale;
axis.Y = Y / scale;
axis.Z = Z / scale;
......
......@@ -594,7 +594,7 @@ void CBurningShader_Raster_Reference::setMaterial ( const SBurningShaderMaterial
ShaderParam.ColorUnits = 0;
ShaderParam.TextureUnits = 0;
for ( i = 0; i != MATERIAL_MAX_TEXTURES; ++i )
for ( i = 0; i != BURNING_MATERIAL_MAX_TEXTURES; ++i )
{
if ( m.getTexture( i ) )
ShaderParam.TextureUnits = i;
......@@ -683,11 +683,13 @@ REALINLINE void CBurningShader_Raster_Reference::scanline2()
u32 i;
#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
line.c[i][1] = (line.c[i][1] - line.c[i][0]) * invDeltaX;
line.c[i][0] += line.c[i][1] * subPixel;
}
#endif
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
......@@ -708,10 +710,12 @@ REALINLINE void CBurningShader_Raster_Reference::scanline2()
// advance next pixel
line.w[0] += line.w[1];
#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
line.c[i][0] += line.c[i][1];
}
#endif
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
line.t[i][0] += line.t[i][1];
......@@ -780,11 +784,13 @@ REALINLINE void CBurningShader_Raster_Reference::scanline ()
a = (f32) pShader.i + subPixel;
#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
line.c[i][1] = (line.c[i][1] - line.c[i][0]) * invDeltaX;
line.c[i][0] += line.c[i][1] * a;
}
#endif
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
......@@ -803,11 +809,12 @@ REALINLINE void CBurningShader_Raster_Reference::scanline ()
line.w[0] += line.w[1];
#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
line.c[i][0] += line.c[i][1];
}
#endif
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
line.t[i][0] += line.t[i][1];
......@@ -856,11 +863,13 @@ void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4
scan.slopeW[0] = (c->Pos.w - a->Pos.w) * scan.invDeltaY[0];
scan.w[0] = a->Pos.w;
#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
scan.c[i][0] = a->Color[i];
scan.slopeC[i][0] = (c->Color[i] - a->Color[i]) * scan.invDeltaY[0];
}
#endif
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
......@@ -884,12 +893,13 @@ void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4
scan.slopeW[1] = (b->Pos.w - a->Pos.w) * scan.invDeltaY[1];
scan.w[1] = a->Pos.w;
#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
scan.c[i][1] = a->Color[i];
scan.slopeC[i][1] = (b->Color[i] - a->Color[i]) * scan.invDeltaY[1];
}
#endif
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
scan.t[i][1] = a->Tex[i];
......@@ -930,12 +940,13 @@ void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4
line.x[scan.right] = scan.x[1];
line.w[scan.right] = scan.w[1];
#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
line.c[i][scan.left] = scan.c[i][0];
line.c[i][scan.right] = scan.c[i][1];
}
#endif
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
line.t[i][scan.left] = scan.t[i][0];
......@@ -977,11 +988,12 @@ void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4
scan.x[0] = a->Pos.x + scan.slopeX[0] * temp[0];
scan.w[0] = a->Pos.w + scan.slopeW[0] * temp[0];
#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
scan.c[i][0] = a->Color[i] + scan.slopeC[i][0] * temp[0];
}
#endif
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
scan.t[i][0] = a->Tex[i] + scan.slopeT[i][0] * temp[0];
......@@ -995,12 +1007,13 @@ void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4
scan.slopeW[1] = (c->Pos.w - b->Pos.w) * scan.invDeltaY[2];
scan.w[1] = b->Pos.w;
#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
scan.c[i][1] = b->Color[i];
scan.slopeC[i][1] = (c->Color[i] - b->Color[i]) * scan.invDeltaY[2];
}
#endif
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
scan.t[i][1] = b->Tex[i];
......@@ -1042,12 +1055,13 @@ void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4
line.x[scan.right] = scan.x[1];
line.w[scan.right] = scan.w[1];
#ifdef SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
line.c[i][scan.left] = scan.c[i][0];
line.c[i][scan.right] = scan.c[i][1];
}
#endif
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
line.t[i][scan.left] = scan.t[i][0];
......
......@@ -24,8 +24,10 @@ namespace io
#endif
#ifdef _IRR_WINDOWS_API_
#include <io.h>
#include <direct.h>
#if !defined ( _WIN32_WCE )
#include <io.h>
#include <direct.h>
#endif
#endif
......@@ -38,7 +40,7 @@ CFileList::CFileList()
// --------------------------------------------
// Windows version
#ifdef _IRR_WINDOWS_API_
#if !defined ( _WIN32_WCE )
char tmp[_MAX_PATH];
_getcwd(tmp, _MAX_PATH);
Path = tmp;
......@@ -60,6 +62,7 @@ CFileList::CFileList()
_findclose( hFile );
}
#endif
//TODO add drives
//entry.Name = "E:\\";
......
......@@ -16,12 +16,14 @@
#include "CAttributes.h"
#include "CMemoryReadFile.h"
#ifdef _IRR_WINDOWS_API_
#include <direct.h> // for _chdir
#if defined (_IRR_WINDOWS_API_)
#if !defined ( _WIN32_WCE )
#include <direct.h> // for _chdir
#endif
#else
#include <unistd.h>
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include <stdlib.h>
#endif
namespace irr
......@@ -184,7 +186,9 @@ bool CFileSystem::addPakFileArchive(const c8* filename, bool ignoreCase, bool ig
const c8* CFileSystem::getWorkingDirectory()
{
#ifdef _IRR_WINDOWS_API_
_getcwd(WorkingDirectory, FILE_SYSTEM_MAX_PATH);
#if !defined ( _WIN32_WCE )
_getcwd(WorkingDirectory, FILE_SYSTEM_MAX_PATH);
#endif
#endif
#if (defined(_IRR_POSIX_API_) || defined(MACOSX))
......@@ -202,7 +206,9 @@ bool CFileSystem::changeWorkingDirectoryTo(const c8* newDirectory)
{
bool success=false;
#ifdef _MSC_VER
success=(_chdir(newDirectory) == 0);
#if !defined ( _WIN32_WCE )
success=(_chdir(newDirectory) == 0);
#endif
#else
success=(chdir(newDirectory) == 0);
#endif
......@@ -215,10 +221,11 @@ core::stringc CFileSystem::getAbsolutePath(const core::stringc& filename) const
core::stringc ret;
#ifdef _IRR_WINDOWS_API_
c8 fpath[_MAX_PATH];
p = _fullpath( fpath, filename.c_str(), _MAX_PATH);
ret = p;
#if !defined ( _WIN32_WCE )
c8 fpath[_MAX_PATH];
p = _fullpath( fpath, filename.c_str(), _MAX_PATH);
ret = p;
#endif
#elif (defined(_IRR_POSIX_API_) || defined(MACOSX))
......
This diff is collapsed.
// Copyright (C) 2002-2007 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_IRR_DEVICE_WINCE_H_INCLUDED__
#define __C_IRR_DEVICE_WINCE_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_USE_WINDOWS_CE_DEVICE_
#include "CIrrDeviceStub.h"
#include "IrrlichtDevice.h"
#include "IImagePresenter.h"
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
#include <aygshell.h>
#include <sipapi.h>
#include <gx.h>
namespace irr
{
class CIrrDeviceWinCE : public CIrrDeviceStub, video::IImagePresenter
{
public:
//! constructor
CIrrDeviceWinCE(video::E_DRIVER_TYPE deviceType,
core::dimension2d<s32> windowSize, u32 bits,
bool fullscreen, bool stencilbuffer, bool vsync,
bool antiAlias, bool highPrecisionFPU,
IEventReceiver* receiver,
HWND window,
const char* version);
//! destructor
virtual ~CIrrDeviceWinCE();
//! runs the device. Returns false if device wants to be deleted
virtual bool run();
//! Cause the device to temporarily pause execution and let other processes to run
// This should bring down processor usage without major performance loss for Irrlicht
virtual void yield();
//! Pause execution and let other processes to run for a specified amount of time.
virtual void sleep(u32 timeMs, bool pauseTimer);
//! sets the caption of the window
virtual void setWindowCaption(const wchar_t* text);
//! returns if window is active. if not, nothing need to be drawn
virtual bool isWindowActive() const;
//! presents a surface in the client area
virtual void present(video::IImage* surface, s32 windowId = 0, core::rect<s32>* src=0 );
//! notifies the device that it should close itself
virtual void closeDevice();
//! \return Returns a pointer to a list with all video modes
//! supported by the gfx adapter.
video::IVideoModeList* getVideoModeList();
//! Notifies the device, that it has been resized
void OnResized();
//! Sets if the window should be resizeable in windowed mode.
virtual void setResizeAble(bool resize=false);
//! Implementation of the win32 cursor control
class CCursorControl : public gui::ICursorControl
{
public:
CCursorControl(const core::dimension2d<s32>& wsize, HWND hwnd, bool fullscreen)
: WindowSize(wsize), InvWindowSize(0.0f, 0.0f), IsVisible(true),
HWnd(hwnd), BorderX(0), BorderY(0), UseReferenceRect(false)
{
if (WindowSize.Width!=0)
InvWindowSize.Width = 1.0f / WindowSize.Width;
if (WindowSize.Height!=0)
InvWindowSize.Height = 1.0f / WindowSize.Height;
if (!fullscreen)
{
BorderX = GetSystemMetrics(SM_CXDLGFRAME);
BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYDLGFRAME);
}
}
//! Changes the visible state of the mouse cursor.
virtual void setVisible(bool visible)
{
IsVisible = visible;
}
//! Returns if the cursor is currently visible.
virtual bool isVisible() const
{
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
return IsVisible;
}
//! Sets the new position of the cursor.
virtual void setPosition(const core::position2d<f32> &pos)
{
setPosition(pos.X, pos.Y);
}
//! Sets the new position of the cursor.
virtual void setPosition(f32 x, f32 y)
{
if (!UseReferenceRect)
setPosition((s32)(x*WindowSize.Width), (s32)(y*WindowSize.Height));
else
setPosition((s32)(x*ReferenceRect.getWidth()), (s32)(y*ReferenceRect.getHeight()));
}
//! Sets the new position of the cursor.
virtual void setPosition(const core::position2d<s32> &pos)
{
setPosition(pos.X, pos.Y);
}
//! Sets the new position of the cursor.
virtual void setPosition(s32 x, s32 y)
{
RECT rect;
if (UseReferenceRect)
{
SetCursorPos(ReferenceRect.UpperLeftCorner.X + x,
ReferenceRect.UpperLeftCorner.Y + y);
}
else
{
if (GetWindowRect(HWnd, &rect))
SetCursorPos(x + rect.left + BorderX, y + rect.top + BorderY);
}
CursorPos.X = x;
CursorPos.Y = y;
}
//! Returns the current position of the mouse cursor.
virtual core::position2d<s32> getPosition()
{
updateInternalCursorPosition();
return CursorPos;
}
//! Returns the current position of the mouse cursor.
virtual core::position2d<f32> getRelativePosition()
{
updateInternalCursorPosition();
if (!UseReferenceRect)
{
return core::position2d<f32>(CursorPos.X * InvWindowSize.Width,
CursorPos.Y * InvWindowSize.Height);
}
return core::position2d<f32>(CursorPos.X / (f32)ReferenceRect.getWidth(),
CursorPos.Y / (f32)ReferenceRect.getHeight());
}
//! Sets an absolute reference rect for calculating the cursor position.
virtual void setReferenceRect(core::rect<s32>* rect=0)
{
if (rect)
{
ReferenceRect = *rect;
UseReferenceRect = true;
// prevent division through zero and uneven sizes
if (!ReferenceRect.getHeight() || ReferenceRect.getHeight()%2)
ReferenceRect.LowerRightCorner.Y += 1;
if (!ReferenceRect.getWidth() || ReferenceRect.getWidth()%2)
ReferenceRect.LowerRightCorner.X += 1;
}
else
UseReferenceRect = false;
}
private:
//! Updates the internal cursor position
void updateInternalCursorPosition()
{
POINT p;
GetCursorPos(&p);
RECT rect;
if (UseReferenceRect)
{
CursorPos.X = p.x - ReferenceRect.UpperLeftCorner.X;
CursorPos.Y = p.y - ReferenceRect.UpperLeftCorner.Y;
}
else
{
if (GetWindowRect(HWnd, &rect))
{
CursorPos.X = p.x-rect.left-BorderX;
CursorPos.Y = p.y-rect.top-BorderY;
}
else
{
// window seems not to be existent, so set cursor to
// a negative value
CursorPos.X = -1;
CursorPos.Y = -1;
}
}
}
core::position2d<s32> CursorPos;
core::dimension2d<s32> WindowSize;
core::dimension2d<f32> InvWindowSize;
bool IsVisible;
HWND HWnd;
s32 BorderX, BorderY;
bool UseReferenceRect;
core::rect<s32> ReferenceRect;
};
//! returns the win32 cursor control
CCursorControl* getWin32CursorControl();
private:
//! create the driver
void createDriver(video::E_DRIVER_TYPE driverType,
const core::dimension2d<s32>& windowSize, u32 bits, bool fullscreen,
bool stencilbuffer, bool vsync, bool antiAlias, bool highPrecisionFPU);
//! switchs to fullscreen
bool switchToFullScreen(s32 width, s32 height, s32 bits);
void getWindowsVersion(core::stringc& version);
void resizeIfNecessary();
HWND HWnd;
bool ChangedToFullScreen;
bool FullScreen;
bool Resized;
bool ExternalWindow;
CCursorControl* Win32CursorControl;
};
} // end namespace irr
#endif
#endif
......@@ -97,7 +97,7 @@ c8* COSOperator::getTextFromClipboard() const
bool COSOperator::getProcessorSpeedMHz(u32* MHz) const
{
#if defined(_IRR_WINDOWS_API_)
#if defined(_IRR_WINDOWS_API_) && !defined(_WIN32_WCE )
LONG Error;
HKEY Key;
......
......@@ -5,6 +5,9 @@
#ifndef __C_OPEN_GL_FEATURE_MAP_H_INCLUDED__
#define __C_OPEN_GL_FEATURE_MAP_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "EDriverFeatures.h"
#include "irrTypes.h"
#include "os.h"
......@@ -1493,3 +1496,4 @@ inline void COpenGLExtensionHandler::extGlGetBufferPointerv (GLenum target, GLen
#endif
#endif
......@@ -1155,7 +1155,7 @@ void CBurningVideoDriver::drawVertexPrimitiveList(const void* vertices, u32 vert
// select mipmap
for ( g = 0; g != vSize[VertexCache.vType].TexSize; ++g )
//for ( g = 0; g != MATERIAL_MAX_TEXTURES; ++g )
//for ( g = 0; g != BURNING_MATERIAL_MAX_TEXTURES; ++g )
{
if ( 0 == MAT_TEXTURE ( g ) )
{
......@@ -1268,7 +1268,7 @@ void CBurningVideoDriver::drawVertexPrimitiveList(const void* vertices, u32 vert
continue;
// select mipmap
//for ( g = 0; g != MATERIAL_MAX_TEXTURES; ++g )
//for ( g = 0; g != BURNING_MATERIAL_MAX_TEXTURES; ++g )
for ( g = 0; g != vSize[VertexCache.vType].TexSize; ++g )
{
if ( 0 == MAT_TEXTURE ( g ) )
......
......@@ -44,7 +44,7 @@ CSoftwareTexture2::CSoftwareTexture2(IImage* image, const char* name, bool gener
}
else
{
os::Printer::log ( "Burningvideo: Warning Texture reformat", ELL_WARNING );
//os::Printer::log ( "Burningvideo: Warning Texture reformat", ELL_WARNING );
MipMap[0] = new CImage(BURNINGSHADER_COLOR_FORMAT, optSize);
// temporary CImage needed
......
......@@ -144,7 +144,7 @@ void CTRTextureBlend::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -134,7 +134,7 @@ void CTRTextureDetailMap2::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -133,7 +133,7 @@ void CTRTextureGouraud2::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......@@ -197,8 +197,9 @@ void CTRTextureGouraud2::scanline_bilinear ()
tFixPoint tx0;
tFixPoint ty0;
#ifdef IPOL_C0
tFixPoint r0, g0, b0;
#ifdef IPOL_C0
tFixPoint r1, g1, b1;
#endif
......
......@@ -133,7 +133,7 @@ void CTRTextureGouraudAdd2::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -133,7 +133,7 @@ void CTRTextureGouraudAddNoZ2::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -150,7 +150,7 @@ void CTRTextureGouraudAlpha2::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -150,7 +150,7 @@ void CTRTextureGouraudAlphaNoZ::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -138,7 +138,7 @@ void CTRTextureGouraudNoZ2::scanline_bilinear ( )
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -132,7 +132,7 @@ void CTRTextureVertexAlpha2::scanline_bilinear ( )
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -133,7 +133,7 @@ REALINLINE void CTRTextureLightMap2_Add::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -133,7 +133,7 @@ void CTRGTextureLightMap2_M4::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[MATERIAL_MAX_TEXTURES];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -29,7 +29,7 @@ namespace video
setDebugName("IBurningShader");
#endif
for ( u32 i = 0; i != MATERIAL_MAX_TEXTURES; ++i )
for ( u32 i = 0; i != BURNING_MATERIAL_MAX_TEXTURES; ++i )
{
IT[i].Texture = 0;
}
......@@ -48,7 +48,7 @@ namespace video
if (DepthBuffer)
DepthBuffer->drop();
for ( u32 i = 0; i != MATERIAL_MAX_TEXTURES; ++i )
for ( u32 i = 0; i != BURNING_MATERIAL_MAX_TEXTURES; ++i )
{
if ( IT[i].Texture )
IT[i].Texture->drop();
......
......@@ -125,7 +125,7 @@ namespace video
fp24* lockedDepthBuffer;
tVideoSample* lockedSurface;
sInternalTexture IT[ MATERIAL_MAX_TEXTURES ];
sInternalTexture IT[ BURNING_MATERIAL_MAX_TEXTURES ];
static const tFixPointu dithermask[ 4 * 4];
};
......
......@@ -8,7 +8,7 @@ static const char* const copyright = "Irrlicht Engine (c) 2002-2007 Nikolaus Geb
#ifdef _IRR_WINDOWS_
#include <windows.h>
#if defined(_DEBUG) && !defined(__GNUWIN32__)
#if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(_WIN32_WCE)
#include <crtdbg.h>
#endif // _DEBUG
#endif
......@@ -55,7 +55,7 @@ BOOL APIENTRY DllMain( HANDLE hModule,
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
#if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(__BORLANDC__)
#if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(__BORLANDC__) && !defined (_WIN32_WCE)
_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF);
#endif
break;
......

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht_mobile6.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I)
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
This diff is collapsed.
......@@ -277,7 +277,8 @@ enum e4DVertexFlag
};
const u32 MATERIAL_MAX_COLORS = 2;
const u32 MATERIAL_MAX_COLORS = 1;
const u32 BURNING_MATERIAL_MAX_TEXTURES = 2;
// dummy Vertex. used for calculation vertex memory size
struct __s4DVertex
......@@ -288,12 +289,12 @@ struct __s4DVertex
sVec4 Color[MATERIAL_MAX_COLORS];
#endif
sVec2 Tex[MATERIAL_MAX_TEXTURES];
sVec2 Tex[BURNING_MATERIAL_MAX_TEXTURES];
u32 flag;
};
#define SIZEOF_SVERTEX 128
#define SIZEOF_SVERTEX_LOG2 7
#define SIZEOF_SVERTEX 64
#define SIZEOF_SVERTEX_LOG2 6
struct s4DVertex
{
......@@ -303,7 +304,7 @@ struct s4DVertex
sVec4 Color[ MATERIAL_MAX_COLORS ];
#endif
sVec2 Tex[ MATERIAL_MAX_TEXTURES ];
sVec2 Tex[ BURNING_MATERIAL_MAX_TEXTURES ];
u32 flag;
......@@ -441,8 +442,8 @@ struct sScanConvertData
sVec4 c[MATERIAL_MAX_COLORS][2]; // color
sVec4 slopeC[MATERIAL_MAX_COLORS][2]; // color slope along edges
sVec2 t[MATERIAL_MAX_TEXTURES][2]; // texture
sVec2 slopeT[MATERIAL_MAX_TEXTURES][2]; // texture slope along edges
sVec2 t[BURNING_MATERIAL_MAX_TEXTURES][2]; // texture
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES][2]; // texture slope along edges
};
......@@ -462,7 +463,7 @@ struct sScanLineData
sVec4 c[MATERIAL_MAX_COLORS][2]; // color start, color end of scanline
#endif
sVec2 t[MATERIAL_MAX_TEXTURES][2]; // texture start, texture end of scanline
sVec2 t[BURNING_MATERIAL_MAX_TEXTURES][2]; // texture start, texture end of scanline
};
// passed to pixel Shader
......
......@@ -24,6 +24,18 @@
#define SOFTWARE_DRIVER_2_TEXTURE_TRANSFORM
#endif
#ifdef BURNINGVIDEO_RENDERER_CE
#define SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT
#define SOFTWARE_DRIVER_2_SUBTEXEL
#define SOFTWARE_DRIVER_2_BILINEAR
#define SOFTWARE_DRIVER_2_LIGHTING
#define SOFTWARE_DRIVER_2_USE_VERTEX_COLOR
#define SOFTWARE_DRIVER_2_16BIT
#define SOFTWARE_DRIVER_2_MIPMAPPING
#define SOFTWARE_DRIVER_2_USE_WBUFFER
#define SOFTWARE_DRIVER_2_TEXTURE_TRANSFORM
#endif
#ifdef BURNINGVIDEO_RENDERER_FAST
#define SOFTWARE_DRIVER_2_PERSPECTIVE_CORRECT
#define SOFTWARE_DRIVER_2_SUBTEXEL
......
......@@ -703,7 +703,24 @@ inline void getSample_texture ( tFixPoint &r, tFixPoint &g, tFixPoint &b,
(tFixPointu &) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE);
(tFixPointu &) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G );
(tFixPointu &) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B );
}
inline void getSample_texture ( tFixPointu &a, tFixPointu &r, tFixPointu &g, tFixPointu &b,
const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty
)
{
u32 ofs;
ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2;
ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY );
// texel
const tVideoSample t00 = *((tVideoSample*)( (u8*) t->data + ofs ));
(tFixPointu &)a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE);
(tFixPointu &)r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE);
(tFixPointu &)g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G );
(tFixPointu &)b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B );
}
......
......@@ -30,11 +30,11 @@ typedef unsigned char boolean;
#ifdef JPEG_CJPEG_DJPEG
#define BMP_SUPPORTED /* BMP image file format */
#define GIF_SUPPORTED /* GIF image file format */
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
#undef BMP_SUPPORTED /* BMP image file format */
#undef GIF_SUPPORTED /* GIF image file format */
#undef PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
#undef RLE_SUPPORTED /* Utah RLE image file format */
#define TARGA_SUPPORTED /* Targa image file format */
#undef TARGA_SUPPORTED /* Targa image file format */
#define TWO_FILE_COMMANDLINE /* optional */
#define USE_SETMODE /* Microsoft has setmode() */
......@@ -42,4 +42,8 @@ typedef unsigned char boolean;
#undef DONT_USE_B_MODE
#undef PROGRESS_REPORT /* optional */
#if defined(_WIN32_WCE)
#undef USE_SETMODE
#endif
#endif /* JPEG_CJPEG_DJPEG */
......@@ -158,7 +158,7 @@ typedef short INT16;
/* INT32 must hold at least signed 32-bit values. */
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
typedef long INT32;
typedef int INT32;
#endif
/* Datatype used for image dimensions. The JPEG standard only supports
......
......@@ -1394,7 +1394,11 @@ typedef z_stream FAR * png_zstreamp;
*/
#ifndef PNG_ABORT
# define PNG_ABORT() abort()
#if !defined(_WIN32_WCE )
#define PNG_ABORT() abort()
#else
#define PNG_ABORT()
#endif
#endif
#ifdef PNG_SETJMP_SUPPORTED
......
......@@ -17,7 +17,7 @@
#if defined(PNG_READ_SUPPORTED)
#ifdef PNG_FLOATING_POINT_SUPPORTED
# if defined(_WIN32_WCE)
# if defined(_WIN32_WCE) && 0
/* strtod() function is not supported on WindowsCE */
__inline double png_strtod(png_structp png_ptr, const char *nptr, char **endptr)
{
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment