Commit 2f2f23c2 authored by hybrid's avatar hybrid

Fix some warnings under Linux.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2149 dfc29bdd-3216-0410-991c-e03cc46cb475
parent dfa2d627
# Makefile for Irrlicht Examples # Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list # It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler # and be sure that CXX is set to a valid compiler
Target = 16.Quake3MapShader Target = 21.Quake3Explorer
Sources = main.cpp Sources = main.cpp sound.cpp q3factory.cpp
# general compiler settings # general compiler settings
CPPFLAGS = -I../../include -I/usr/X11R6/include CPPFLAGS = -I../../include -I/usr/X11R6/include
CXXFLAGS = -O3 -ffast-math #CXXFLAGS = -O3 -ffast-math
#CXXFLAGS = -g -Wall CXXFLAGS = -g -Wall
#default target is Linux #default target is Linux
all: all_linux all: all_linux
......
...@@ -48,12 +48,12 @@ struct GameData ...@@ -48,12 +48,12 @@ struct GameData
GammaValue = 1.f; GammaValue = 1.f;
// default deviceParam; // default deviceParam;
deviceParam.DriverType = EDT_DIRECT3D9; deviceParam.DriverType = EDT_OPENGL;
deviceParam.WindowSize.Width = 800; deviceParam.WindowSize.Width = 800;
deviceParam.WindowSize.Height = 600; deviceParam.WindowSize.Height = 600;
deviceParam.Fullscreen = false; deviceParam.Fullscreen = false;
deviceParam.Bits = 32; deviceParam.Bits = 32;
deviceParam.ZBufferBits = 32; deviceParam.ZBufferBits = 24;
deviceParam.Vsync = false; deviceParam.Vsync = false;
deviceParam.AntiAlias = false; deviceParam.AntiAlias = false;
...@@ -544,8 +544,8 @@ void CQuake3EventHandler::CreateGUI() ...@@ -544,8 +544,8 @@ void CQuake3EventHandler::CreateGUI()
env->getSkin()->setColor ( EGDC_WINDOW, video::SColor(240,0x66,0x66,0x66) ); env->getSkin()->setColor ( EGDC_WINDOW, video::SColor(240,0x66,0x66,0x66) );
// minimal gui size 800x600 // minimal gui size 800x600
dimension2d<s32> dim ( 800, 600 ); dimension2d<u32> dim ( 800, 600 );
dimension2d<s32> vdim ( Game->Device->getVideoDriver()->getScreenSize() ); dimension2d<u32> vdim ( Game->Device->getVideoDriver()->getScreenSize() );
if ( vdim.Height >= dim.Height && vdim.Width >= dim.Width ) if ( vdim.Height >= dim.Height && vdim.Width >= dim.Width )
{ {
...@@ -691,8 +691,8 @@ void CQuake3EventHandler::CreateGUI() ...@@ -691,8 +691,8 @@ void CQuake3EventHandler::CreateGUI()
addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() ); addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
IGUIImageList* imageList = env->createImageList( driver->getTexture ( "iconlist.png" ), IGUIImageList* imageList = env->createImageList( driver->getTexture ( "iconlist.png" ),
dimension2d<irr::s32>( 32, 32 ), true ); dimension2di( 32, 32 ), true );
if ( imageList ) if ( imageList )
{ {
...@@ -1031,7 +1031,7 @@ void CQuake3EventHandler::addSceneTreeItem( ISceneNode * parent, IGUITreeViewNod ...@@ -1031,7 +1031,7 @@ void CQuake3EventHandler::addSceneTreeItem( ISceneNode * parent, IGUITreeViewNod
} }
node = nodeParent->addChildBack( msg, 0, imageIndex ); node = nodeParent->addChildBack( msg, 0, imageIndex );
addSceneTreeItem ( *it, node ); addSceneTreeItem ( *it, node );
} }
...@@ -1880,9 +1880,10 @@ void runGame ( GameData *game ) ...@@ -1880,9 +1880,10 @@ void runGame ( GameData *game )
/*! /*!
*/ */
s32 IRRCALLCONV main(int argc, char* argv[]) int IRRCALLCONV main(int argc, char* argv[])
{ {
GameData game ( deletePathFromPath ( core::string<c16> (argv[0]), 1 ) ); core::string<c16> prgname(argv[0]);
GameData game ( deletePathFromPath ( prgname, 1 ) );
// dynamically load irrlicht // dynamically load irrlicht
const c8 * dllName = argc > 1 ? argv[1] : "irrlicht.dll"; const c8 * dllName = argc > 1 ? argv[1] : "irrlicht.dll";
......
...@@ -682,7 +682,9 @@ funcptr_createDeviceEx load_createDeviceEx ( const c8 * filename) ...@@ -682,7 +682,9 @@ funcptr_createDeviceEx load_createDeviceEx ( const c8 * filename)
#else #else
// TODO: Dynamic Loading for other os // TODO: Dynamic Loading for other os
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib") #pragma comment(lib, "Irrlicht.lib")
#endif
funcptr_createDevice load_createDevice ( const c8 * filename) funcptr_createDevice load_createDevice ( const c8 * filename)
{ {
......
DIRS = $(wildcard [01]* Demo) DIRS = $(wildcard [012]* Demo)
all: $(DIRS) all: $(DIRS)
......
...@@ -46,8 +46,8 @@ namespace quake3 ...@@ -46,8 +46,8 @@ namespace quake3
cleanUnResolvedMeshes ( 1 ), cleanUnResolvedMeshes ( 1 ),
loadAllShaders ( 0 ), loadAllShaders ( 0 ),
loadSkyShader ( 0 ), loadSkyShader ( 0 ),
swapLump ( 0 ),
alpharef ( 1 ), alpharef ( 1 ),
swapLump ( 0 ),
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
swapHeader ( 1 ) swapHeader ( 1 )
#else #else
...@@ -65,11 +65,11 @@ namespace quake3 ...@@ -65,11 +65,11 @@ namespace quake3
u32 endTime; u32 endTime;
s32 mergeShaderBuffer; s32 mergeShaderBuffer;
s32 cleanUnResolvedMeshes; s32 cleanUnResolvedMeshes;
s32 loadAllShaders;
s32 loadSkyShader;
s32 alpharef; s32 alpharef;
s32 swapLump; s32 swapLump;
s32 swapHeader; s32 swapHeader;
s32 loadAllShaders;
s32 loadSkyShader;
c8 scriptDir [ 64 ]; c8 scriptDir [ 64 ];
}; };
...@@ -493,6 +493,8 @@ namespace quake3 ...@@ -493,6 +493,8 @@ namespace quake3
case NOISE: case NOISE:
y = Noiser::get(); y = Noiser::get();
break; break;
default:
break;
} }
return base + ( y * amp ); return base + ( y * amp );
......
...@@ -47,6 +47,7 @@ static inline u32 locale_lower ( u32 x ) ...@@ -47,6 +47,7 @@ static inline u32 locale_lower ( u32 x )
switch ( locale_current ) switch ( locale_current )
{ {
case IRR_LOCALE_GERMAN: case IRR_LOCALE_GERMAN:
case IRR_LOCALE_ANSI:
break; break;
} }
// ansi // ansi
......
...@@ -329,7 +329,7 @@ namespace irr ...@@ -329,7 +329,7 @@ namespace irr
//! typedef for Function Pointer //! typedef for Function Pointer
typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDevice )( typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDevice )(
video::E_DRIVER_TYPE deviceType, video::E_DRIVER_TYPE deviceType,
const core::dimension2d<s32>& windowSize, const core::dimension2d<u32>& windowSize,
u32 bits, u32 bits,
bool fullscreen, bool fullscreen,
bool stencilbuffer, bool stencilbuffer,
......
...@@ -36,8 +36,8 @@ CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh, ...@@ -36,8 +36,8 @@ CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh,
CurrentFrameNr(0.f), CurrentFrameNr(0.f),
JointMode(EJUOR_NONE), JointsUsed(false), JointMode(EJUOR_NONE), JointsUsed(false),
TransitionTime(0), Transiting(0.f), TransitingBlend(0.f), TransitionTime(0), Transiting(0.f), TransitingBlend(0.f),
Looping(true), ReadOnlyMaterials(false), Looping(true), ReadOnlyMaterials(false), RenderFromIdentity(0),
LoopCallBack(0), PassCount(0), Shadow(0), RenderFromIdentity(0), LoopCallBack(0), PassCount(0), Shadow(0),
MD3Special ( 0 ) MD3Special ( 0 )
{ {
#ifdef _DEBUG #ifdef _DEBUG
......
...@@ -580,7 +580,7 @@ void CGUIFont::draw(const wchar_t* text, const core::rect<s32>& position, ...@@ -580,7 +580,7 @@ void CGUIFont::draw(const wchar_t* text, const core::rect<s32>& position,
} }
wchar_t c; wchar_t c;
while( c = *text++) while (( c = *text++))
{ {
bool lineBreak=false; bool lineBreak=false;
if ( c == L'\r') // Mac or Windows breaks if ( c == L'\r') // Mac or Windows breaks
......
...@@ -176,6 +176,8 @@ bool CGUISpinBox::OnEvent(const SEvent& event) ...@@ -176,6 +176,8 @@ bool CGUISpinBox::OnEvent(const SEvent& event)
changeEvent = true; changeEvent = true;
} }
break; break;
default:
break;
} }
break; break;
......
...@@ -16,13 +16,8 @@ namespace gui ...@@ -16,13 +16,8 @@ namespace gui
{ {
CGUITreeViewNode::CGUITreeViewNode( CGUITreeView* owner, CGUITreeViewNode* parent ) CGUITreeViewNode::CGUITreeViewNode( CGUITreeView* owner, CGUITreeViewNode* parent )
: Owner( owner ), : Owner(owner), Parent(parent), ImageIndex(-1), SelectedImageIndex(-1),
Parent( parent ), Data(0), Data2(0), Expanded(false)
ImageIndex( -1 ),
SelectedImageIndex( -1 ),
Data( 0 ),
Data2( 0 ),
Expanded( false )
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName( "CGUITreeView" ); setDebugName( "CGUITreeView" );
...@@ -427,22 +422,22 @@ CGUITreeView::CGUITreeView(IGUIEnvironment* environment, IGUIElement* parent, ...@@ -427,22 +422,22 @@ CGUITreeView::CGUITreeView(IGUIEnvironment* environment, IGUIElement* parent,
s32 id, core::rect<s32> rectangle, bool clip, s32 id, core::rect<s32> rectangle, bool clip,
bool drawBack,bool scrollBarVertical, bool scrollBarHorizontal) bool drawBack,bool scrollBarVertical, bool scrollBarHorizontal)
: IGUITreeView( environment, parent, id, rectangle ), : IGUITreeView( environment, parent, id, rectangle ),
Selected( 0 ), Root(0), Selected(0),
ScrollBarH( 0 ),
ScrollBarV( 0 ),
LinesVisible( true ),
ItemHeight( 0 ), ItemHeight( 0 ),
IndentWidth( 0 ), IndentWidth( 0 ),
TotalItemHeight( 0 ), TotalItemHeight( 0 ),
TotalItemWidth ( 0 ), TotalItemWidth ( 0 ),
Selecting( false ),
Font( 0 ), Font( 0 ),
IconFont( 0 ), IconFont( 0 ),
ScrollBarH( 0 ),
ScrollBarV( 0 ),
ImageList( 0 ), ImageList( 0 ),
ImageLeftOfIcon( true ),
LastEventNode( 0 ), LastEventNode( 0 ),
LinesVisible( true ),
Selecting( false ),
Clip( clip ), Clip( clip ),
DrawBack( drawBack ) DrawBack( drawBack ),
ImageLeftOfIcon( true )
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName( "CGUITreeView" ); setDebugName( "CGUITreeView" );
...@@ -520,8 +515,8 @@ CGUITreeView::~CGUITreeView() ...@@ -520,8 +515,8 @@ CGUITreeView::~CGUITreeView()
void CGUITreeView::recalculateItemHeight() void CGUITreeView::recalculateItemHeight()
{ {
IGUISkin* skin = Environment->getSkin(); IGUISkin* skin = Environment->getSkin();
IGUITreeViewNode* node; IGUITreeViewNode* node;
if( Font != skin->getFont() ) if( Font != skin->getFont() )
{ {
...@@ -611,6 +606,8 @@ bool CGUITreeView::OnEvent( const SEvent &event ) ...@@ -611,6 +606,8 @@ bool CGUITreeView::OnEvent( const SEvent &event )
return false; return false;
} }
break; break;
default:
break;
} }
break; break;
case EET_MOUSE_INPUT_EVENT: case EET_MOUSE_INPUT_EVENT:
...@@ -672,9 +669,14 @@ bool CGUITreeView::OnEvent( const SEvent &event ) ...@@ -672,9 +669,14 @@ bool CGUITreeView::OnEvent( const SEvent &event )
return true; return true;
} }
} }
break;
default:
break;
} }
} }
break; break;
default:
break;
} }
......
...@@ -112,12 +112,12 @@ namespace gui ...@@ -112,12 +112,12 @@ namespace gui
//! \return //! \return
//! returns the new node //! returns the new node
virtual IGUITreeViewNode* addChildBack( virtual IGUITreeViewNode* addChildBack(
const wchar_t* text, const wchar_t* text,
const wchar_t* icon = 0, const wchar_t* icon = 0,
s32 imageIndex = -1, s32 imageIndex = -1,
s32 selectedImageIndex = -1, s32 selectedImageIndex = -1,
void* data = 0, void* data = 0,
IReferenceCounted* data2 = 0 ); IReferenceCounted* data2 = 0);
//! Adds a new node before the first child node. //! Adds a new node before the first child node.
//! \param text text of the new node //! \param text text of the new node
...@@ -129,12 +129,12 @@ namespace gui ...@@ -129,12 +129,12 @@ namespace gui
//! \return //! \return
//! returns the new node //! returns the new node
virtual IGUITreeViewNode* addChildFront( virtual IGUITreeViewNode* addChildFront(
const wchar_t* text, const wchar_t* text,
const wchar_t* icon = 0, const wchar_t* icon = 0,
s32 imageIndex = -1, s32 imageIndex = -1,
s32 selectedImageIndex = -1, s32 selectedImageIndex = -1,
void* data = 0, void* data = 0,
IReferenceCounted* data2 = 0 ); IReferenceCounted* data2 = 0 );
//! Adds a new node behind the other node. //! Adds a new node behind the other node.
//! The other node has also te be a child node from this node. //! The other node has also te be a child node from this node.
...@@ -147,13 +147,13 @@ namespace gui ...@@ -147,13 +147,13 @@ namespace gui
//! \return //! \return
//! returns the new node or 0 if other is no child node from this //! returns the new node or 0 if other is no child node from this
virtual IGUITreeViewNode* insertChildAfter( virtual IGUITreeViewNode* insertChildAfter(
IGUITreeViewNode* other, IGUITreeViewNode* other,
const wchar_t* text, const wchar_t* text,
const wchar_t* icon = 0, const wchar_t* icon = 0,
s32 imageIndex = -1, s32 imageIndex = -1,
s32 selectedImageIndex = -1, s32 selectedImageIndex = -1,
void* data = 0, void* data = 0,
IReferenceCounted* data2 = 0 ); IReferenceCounted* data2 = 0 );
//! Adds a new node before the other node. //! Adds a new node before the other node.
//! The other node has also te be a child node from this node. //! The other node has also te be a child node from this node.
...@@ -166,13 +166,13 @@ namespace gui ...@@ -166,13 +166,13 @@ namespace gui
//! \return //! \return
//! returns the new node or 0 if other is no child node from this //! returns the new node or 0 if other is no child node from this
virtual IGUITreeViewNode* insertChildBefore( virtual IGUITreeViewNode* insertChildBefore(
IGUITreeViewNode* other, IGUITreeViewNode* other,
const wchar_t* text, const wchar_t* text,
const wchar_t* icon = 0, const wchar_t* icon = 0,
s32 imageIndex = -1, s32 imageIndex = -1,
s32 selectedImageIndex = -1, s32 selectedImageIndex = -1,
void* data = 0, void* data = 0,
IReferenceCounted* data2 = 0 ); IReferenceCounted* data2 = 0 );
//! Return the first child note from this node. //! Return the first child note from this node.
virtual IGUITreeViewNode* getFirstChild() const; virtual IGUITreeViewNode* getFirstChild() const;
...@@ -222,15 +222,15 @@ namespace gui ...@@ -222,15 +222,15 @@ namespace gui
private: private:
CGUITreeView* Owner; CGUITreeView* Owner;
CGUITreeViewNode* Parent; CGUITreeViewNode* Parent;
core::stringw Text; core::stringw Text;
core::stringw Icon; core::stringw Icon;
s32 ImageIndex; s32 ImageIndex;
s32 SelectedImageIndex; s32 SelectedImageIndex;
void* Data; void* Data;
IReferenceCounted* Data2; IReferenceCounted* Data2;
bool Expanded; bool Expanded;
core::list<CGUITreeViewNode*> Childs; core::list<CGUITreeViewNode*> Childs;
}; };
...@@ -306,21 +306,21 @@ namespace gui ...@@ -306,21 +306,21 @@ namespace gui
CGUITreeViewNode* Root; CGUITreeViewNode* Root;
IGUITreeViewNode* Selected; IGUITreeViewNode* Selected;
bool LinesVisible; s32 ItemHeight;
s32 ItemHeight; s32 IndentWidth;
s32 IndentWidth; s32 TotalItemHeight;
s32 TotalItemHeight; s32 TotalItemWidth;
s32 TotalItemWidth; IGUIFont* Font;
IGUIFont* Font; IGUIFont* IconFont;
IGUIFont* IconFont;
bool Selecting;
IGUIScrollBar* ScrollBarH; IGUIScrollBar* ScrollBarH;
IGUIScrollBar* ScrollBarV; IGUIScrollBar* ScrollBarV;
bool Clip;
bool DrawBack;
IGUIImageList* ImageList; IGUIImageList* ImageList;
bool ImageLeftOfIcon;
IGUITreeViewNode* LastEventNode; IGUITreeViewNode* LastEventNode;
bool LinesVisible;
bool Selecting;
bool Clip;
bool DrawBack;
bool ImageLeftOfIcon;
}; };
......
...@@ -1452,10 +1452,10 @@ void CImage::copyToScalingBoxFilter(IImage* target, s32 bias) ...@@ -1452,10 +1452,10 @@ void CImage::copyToScalingBoxFilter(IImage* target, s32 bias)
f32 sy; f32 sy;
sy = 0.f; sy = 0.f;
for ( s32 y = 0; y != destSize.Height; ++y ) for ( u32 y = 0; y != destSize.Height; ++y )
{ {
sx = 0.f; sx = 0.f;
for ( s32 x = 0; x != destSize.Width; ++x ) for ( u32 x = 0; x != destSize.Width; ++x )
{ {
target->setPixel( x, y, getPixelBox( core::floor32(sx), core::floor32(sy), fx, fy, bias ) ); target->setPixel( x, y, getPixelBox( core::floor32(sx), core::floor32(sy), fx, fy, bias ) );
sx += sourceXStep; sx += sourceXStep;
......
...@@ -722,7 +722,7 @@ bool CIrrDeviceLinux::run() ...@@ -722,7 +722,7 @@ bool CIrrDeviceLinux::run()
if ((CreationParams.DriverType != video::EDT_NULL) && display) if ((CreationParams.DriverType != video::EDT_NULL) && display)
{ {
SEvent irrevent; SEvent irrevent;
irrevent.MouseInput.ButtonStates = -1; irrevent.MouseInput.ButtonStates = 0xffffffff;
while (XPending(display) > 0 && !Close) while (XPending(display) > 0 && !Close)
{ {
...@@ -1461,7 +1461,7 @@ void CIrrDeviceLinux::pollJoysticks() ...@@ -1461,7 +1461,7 @@ void CIrrDeviceLinux::pollJoysticks()
} }
IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(const SIrrlichtCreationParameters& param) extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(const SIrrlichtCreationParameters& param)
{ {
CIrrDeviceLinux* dev = new CIrrDeviceLinux(param); CIrrDeviceLinux* dev = new CIrrDeviceLinux(param);
......
...@@ -13,7 +13,7 @@ namespace io ...@@ -13,7 +13,7 @@ namespace io
CLimitReadFile::CLimitReadFile(IReadFile* alreadyOpenedFile, long pos, long areaSize, CLimitReadFile::CLimitReadFile(IReadFile* alreadyOpenedFile, long pos, long areaSize,
const core::string<c16>& name) const core::string<c16>& name)
: Filename(name), AreaStart(0), AreaEnd(0), File(alreadyOpenedFile), Pos ( 0 ) : Filename(name), AreaStart(0), AreaEnd(0), Pos(0), File(alreadyOpenedFile)
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("CLimitReadFile"); setDebugName("CLimitReadFile");
......
...@@ -80,7 +80,7 @@ bool CArchiveLoaderPAK::isALoadableFileFormat(io::IReadFile* file) const ...@@ -80,7 +80,7 @@ bool CArchiveLoaderPAK::isALoadableFileFormat(io::IReadFile* file) const
PAK Reader PAK Reader
*/ */
CPakReader::CPakReader(IReadFile* file, bool ignoreCase, bool ignorePaths) CPakReader::CPakReader(IReadFile* file, bool ignoreCase, bool ignorePaths)
: File(file), IgnoreCase(ignoreCase), IgnorePaths(ignorePaths), Type ( "pak" ) : Type("pak"), File(file), IgnoreCase(ignoreCase), IgnorePaths(ignorePaths)
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("CPakReader"); setDebugName("CPakReader");
......
...@@ -25,12 +25,11 @@ namespace scene ...@@ -25,12 +25,11 @@ namespace scene
using namespace quake3; using namespace quake3;
//! constructor //! constructor
CQ3LevelMesh::CQ3LevelMesh( io::IFileSystem* fs, CQ3LevelMesh::CQ3LevelMesh(io::IFileSystem* fs, scene::ISceneManager* smgr,
scene::ISceneManager* smgr, const Q3LevelLoadParameter &loadParam)
const Q3LevelLoadParameter &loadParam) : LoadParam(loadParam), Textures(0), LightMaps(0),
: Textures(0), LightMaps(0), Vertices(0), Faces(0), Planes(0), Nodes(0), Leafs(0), LeafFaces(0),
Vertices(0), Faces(0), Planes(0), Nodes(0), Leafs(0), LeafFaces(0), MeshVerts(0), Brushes(0), FileSystem(fs), SceneManager(smgr)
MeshVerts(0), Brushes(0), FileSystem(fs), SceneManager(smgr),LoadParam (loadParam)
{ {
#ifdef _DEBUG #ifdef _DEBUG
IReferenceCounted::setDebugName("CQ3LevelMesh"); IReferenceCounted::setDebugName("CQ3LevelMesh");
......
...@@ -28,11 +28,10 @@ CQuake3ShaderSceneNode::CQuake3ShaderSceneNode( ...@@ -28,11 +28,10 @@ CQuake3ShaderSceneNode::CQuake3ShaderSceneNode(
io::IFileSystem *fileSystem, scene::IMeshBuffer *original, io::IFileSystem *fileSystem, scene::IMeshBuffer *original,
const IShader * shader) const IShader * shader)
: scene::IMeshSceneNode(parent, mgr, id, : scene::IMeshSceneNode(parent, mgr, id,
core::vector3df ( 0.f, 0.f, 0.f ), core::vector3df(0.f, 0.f, 0.f),
core::vector3df ( 0.f, 0.f, 0.f ), core::vector3df(0.f, 0.f, 0.f),
core::vector3df ( 1.f, 1.f, 1.f )), core::vector3df(1.f, 1.f, 1.f)),
Mesh ( 0 ), MeshBuffer(0), Original(0), Shader(shader), Mesh(0), Original(0), MeshBuffer(0), TimeAbs(0.f)
Shader(shader), TimeAbs(0.f)
{ {
#ifdef _DEBUG #ifdef _DEBUG
core::stringc dName = "CQuake3ShaderSceneNode "; core::stringc dName = "CQuake3ShaderSceneNode ";
...@@ -904,13 +903,15 @@ void CQuake3ShaderSceneNode::vertextransform_rgbgen( f32 dt, SModifierFunction & ...@@ -904,13 +903,15 @@ void CQuake3ShaderSceneNode::vertextransform_rgbgen( f32 dt, SModifierFunction &
MeshBuffer->Vertices[i].Color.color = value; MeshBuffer->Vertices[i].Color.color = value;
} break; } break;
case CONSTANT: case CONSTANT:
{
//rgbgen const ( x y z ) //rgbgen const ( x y z )
video::SColorf cf( function.x, function.y, function.z ); video::SColorf cf( function.x, function.y, function.z );
u32 col = cf.toSColor ().color; u32 col = cf.toSColor ().color;
for ( i = 0; i != vsize; ++i ) for ( i = 0; i != vsize; ++i )
MeshBuffer->Vertices[i].Color.color = col; MeshBuffer->Vertices[i].Color.color = col;
} break;
default:
break; break;
} }
} }
...@@ -971,6 +972,8 @@ void CQuake3ShaderSceneNode::vertextransform_alphagen( f32 dt, SModifierFunction ...@@ -971,6 +972,8 @@ void CQuake3ShaderSceneNode::vertextransform_alphagen( f32 dt, SModifierFunction
for ( i = 0; i != vsize; ++i ) for ( i = 0; i != vsize; ++i )
MeshBuffer->Vertices[i].Color.setAlpha ( value ); MeshBuffer->Vertices[i].Color.setAlpha ( value );
} break; } break;
default:
break;
} }
} }
...@@ -1071,7 +1074,8 @@ void CQuake3ShaderSceneNode::vertextransform_tcgen( f32 dt, SModifierFunction &f ...@@ -1071,7 +1074,8 @@ void CQuake3ShaderSceneNode::vertextransform_tcgen( f32 dt, SModifierFunction &f
} }
#endif #endif
} break; } break;
default:
break;
} }
} }
...@@ -1170,6 +1174,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) ...@@ -1170,6 +1174,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture )
case TCMOD: case TCMOD:
m2.makeIdentity(); m2.makeIdentity();
break; break;
default:
break;
} }
// get the modifier function // get the modifier function
...@@ -1250,6 +1256,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) ...@@ -1250,6 +1256,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture )
function.z = getAsFloat( v.content, pos ); function.z = getAsFloat( v.content, pos );
function.y = getAsFloat( v.content, pos ); function.y = getAsFloat( v.content, pos );
break; break;
default:
break;
} }
} }
...@@ -1261,6 +1269,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) ...@@ -1261,6 +1269,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture )
case MOVE: case MOVE:
getModifierFunc( function, v.content, pos ); getModifierFunc( function, v.content, pos );
break; break;
default:
break;
} }
switch ( function.masterfunc1 ) switch ( function.masterfunc1 )
...@@ -1297,6 +1307,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) ...@@ -1297,6 +1307,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture )
case MOVE: case MOVE:
deformvertexes_move( TimeAbs, function ); deformvertexes_move( TimeAbs, function );
break; break;
default:
break;
} }
break; break;
case RGBGEN: case RGBGEN:
...@@ -1319,8 +1331,12 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) ...@@ -1319,8 +1331,12 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture )
//vertextransform_alphagen( TimeAbs, function ); //vertextransform_alphagen( TimeAbs, function );
break; break;
default:
break;
} }
break; break;
default:
break;
} }
} break; } break;
...@@ -1360,8 +1376,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) ...@@ -1360,8 +1376,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture )
// deformvertexes autosprite2 // deformvertexes autosprite2
deformvertexes_autosprite2(TimeAbs, function); deformvertexes_autosprite2(TimeAbs, function);
break; break;
default:
break;
} // func } // func
switch ( function.masterfunc0 ) switch ( function.masterfunc0 )
...@@ -1369,6 +1385,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) ...@@ -1369,6 +1385,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture )
case TCMOD: case TCMOD:
texture *= m2; texture *= m2;
break; break;
default:
break;
} }
} // group } // group
......
...@@ -23,10 +23,9 @@ CSceneNodeAnimatorCollisionResponse::CSceneNodeAnimatorCollisionResponse( ...@@ -23,10 +23,9 @@ CSceneNodeAnimatorCollisionResponse::CSceneNodeAnimatorCollisionResponse(
f32 slidingSpeed) f32 slidingSpeed)
: Radius(ellipsoidRadius), Gravity(gravityPerSecond), Translation(ellipsoidTranslation), : Radius(ellipsoidRadius), Gravity(gravityPerSecond), Translation(ellipsoidTranslation),
World(world), Object(object), SceneManager(scenemanager), LastTime(0), World(world), Object(object), SceneManager(scenemanager), LastTime(0),
SlidingSpeed(slidingSpeed), Falling(false), IsCamera(false), SlidingSpeed(slidingSpeed), CollisionCallback(0),
AnimateCameraTarget(true), CollisionOccurred(false), Falling(false), IsCamera(false), AnimateCameraTarget(true), CollisionOccurred(false),
CollisionCallback(0), FirstUpdate(true)
FirstUpdate ( true )
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("CSceneNodeAnimatorCollisionResponse"); setDebugName("CSceneNodeAnimatorCollisionResponse");
...@@ -66,7 +65,7 @@ void CSceneNodeAnimatorCollisionResponse::setEllipsoidRadius( ...@@ -66,7 +65,7 @@ void CSceneNodeAnimatorCollisionResponse::setEllipsoidRadius(
const core::vector3df& radius) const core::vector3df& radius)
{ {
Radius = radius; Radius = radius;
FirstUpdate = true; FirstUpdate = true;
} }
......
...@@ -136,18 +136,18 @@ namespace scene ...@@ -136,18 +136,18 @@ namespace scene
ISceneManager* SceneManager; ISceneManager* SceneManager;
u32 LastTime; u32 LastTime;
f32 SlidingSpeed; f32 SlidingSpeed;
bool Falling;
bool IsCamera;
bool AnimateCameraTarget;
bool FirstUpdate;
bool CollisionOccurred;
core::vector3df CollisionPoint; core::vector3df CollisionPoint;
core::triangle3df CollisionTriangle; core::triangle3df CollisionTriangle;
core::vector3df CollisionResultPosition; core::vector3df CollisionResultPosition;
const ISceneNode * CollisionNode; const ISceneNode * CollisionNode;
ICollisionCallback* CollisionCallback; ICollisionCallback* CollisionCallback;
bool Falling;
bool IsCamera;
bool AnimateCameraTarget;
bool CollisionOccurred;
bool FirstUpdate;
}; };
} // end namespace scene } // end namespace scene
......
...@@ -1660,8 +1660,8 @@ void CBurningVideoDriver::OnResize(const core::dimension2d<u32>& size) ...@@ -1660,8 +1660,8 @@ void CBurningVideoDriver::OnResize(const core::dimension2d<u32>& size)
if (ScreenSize != realSize) if (ScreenSize != realSize)
{ {
if (ViewPort.getWidth() == ScreenSize.Width && if (ViewPort.getWidth() == (s32)ScreenSize.Width &&
ViewPort.getHeight() == ScreenSize.Height) ViewPort.getHeight() == (s32)ScreenSize.Height)
{ {
ViewPort.UpperLeftCorner.X = 0; ViewPort.UpperLeftCorner.X = 0;
ViewPort.UpperLeftCorner.Y = 0; ViewPort.UpperLeftCorner.Y = 0;
......
...@@ -35,7 +35,7 @@ IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ) ...@@ -35,7 +35,7 @@ IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ)
IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o
IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CZipReader.o CPakReader.o irrXML.o CAttributes.o IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CZipReader.o CPakReader.o irrXML.o CAttributes.o
IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceStub.o CIrrDeviceWin32.o CLogger.o COSOperator.o Irrlicht.o os.o IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceStub.o CIrrDeviceWin32.o CLogger.o COSOperator.o Irrlicht.o os.o
IRRGUIOBJ = CGUIButton.o CGUICheckBox.o CGUIComboBox.o CGUIContextMenu.o CGUIEditBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIInOutFader.o CGUIListBox.o CGUIMenu.o CGUIMeshViewer.o CGUIMessageBox.o CGUIModalScreen.o CGUIScrollBar.o CGUISpinBox.o CGUISkin.o CGUIStaticText.o CGUITabControl.o CGUITable.o CGUIToolBar.o CGUIWindow.o CGUIColorSelectDialog.o CDefaultGUIElementFactory.o CGUISpriteBank.o IRRGUIOBJ = CGUIButton.o CGUICheckBox.o CGUIComboBox.o CGUIContextMenu.o CGUIEditBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIInOutFader.o CGUIListBox.o CGUIMenu.o CGUIMeshViewer.o CGUIMessageBox.o CGUIModalScreen.o CGUIScrollBar.o CGUISpinBox.o CGUISkin.o CGUIStaticText.o CGUITabControl.o CGUITable.o CGUIToolBar.o CGUIWindow.o CGUIColorSelectDialog.o CDefaultGUIElementFactory.o CGUISpriteBank.o CGUIImageList.o CGUITreeView.o
ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o
JPEGLIBOBJ = jpeglib/jcapimin.o jpeglib/jcapistd.o jpeglib/jccoefct.o jpeglib/jccolor.o jpeglib/jcdctmgr.o jpeglib/jchuff.o jpeglib/jcinit.o jpeglib/jcmainct.o jpeglib/jcmarker.o jpeglib/jcmaster.o jpeglib/jcomapi.o jpeglib/jcparam.o jpeglib/jcphuff.o jpeglib/jcprepct.o jpeglib/jcsample.o jpeglib/jctrans.o jpeglib/jdapimin.o jpeglib/jdapistd.o jpeglib/jdatadst.o jpeglib/jdatasrc.o jpeglib/jdcoefct.o jpeglib/jdcolor.o jpeglib/jddctmgr.o jpeglib/jdhuff.o jpeglib/jdinput.o jpeglib/jdmainct.o jpeglib/jdmarker.o jpeglib/jdmaster.o jpeglib/jdmerge.o jpeglib/jdphuff.o jpeglib/jdpostct.o jpeglib/jdsample.o jpeglib/jdtrans.o jpeglib/jerror.o jpeglib/jfdctflt.o jpeglib/jfdctfst.o jpeglib/jfdctint.o jpeglib/jidctflt.o jpeglib/jidctfst.o jpeglib/jidctint.o jpeglib/jidctred.o jpeglib/jmemmgr.o jpeglib/jmemnobs.o jpeglib/jquant1.o jpeglib/jquant2.o jpeglib/jutils.o JPEGLIBOBJ = jpeglib/jcapimin.o jpeglib/jcapistd.o jpeglib/jccoefct.o jpeglib/jccolor.o jpeglib/jcdctmgr.o jpeglib/jchuff.o jpeglib/jcinit.o jpeglib/jcmainct.o jpeglib/jcmarker.o jpeglib/jcmaster.o jpeglib/jcomapi.o jpeglib/jcparam.o jpeglib/jcphuff.o jpeglib/jcprepct.o jpeglib/jcsample.o jpeglib/jctrans.o jpeglib/jdapimin.o jpeglib/jdapistd.o jpeglib/jdatadst.o jpeglib/jdatasrc.o jpeglib/jdcoefct.o jpeglib/jdcolor.o jpeglib/jddctmgr.o jpeglib/jdhuff.o jpeglib/jdinput.o jpeglib/jdmainct.o jpeglib/jdmarker.o jpeglib/jdmaster.o jpeglib/jdmerge.o jpeglib/jdphuff.o jpeglib/jdpostct.o jpeglib/jdsample.o jpeglib/jdtrans.o jpeglib/jerror.o jpeglib/jfdctflt.o jpeglib/jfdctfst.o jpeglib/jfdctint.o jpeglib/jidctflt.o jpeglib/jidctfst.o jpeglib/jidctint.o jpeglib/jidctred.o jpeglib/jmemmgr.o jpeglib/jmemnobs.o jpeglib/jquant1.o jpeglib/jquant2.o jpeglib/jutils.o
LIBPNGOBJ = libpng/png.o libpng/pngerror.o libpng/pngget.o libpng/pngmem.o libpng/pngpread.o libpng/pngread.o libpng/pngrio.o libpng/pngrtran.o libpng/pngrutil.o libpng/pngset.o libpng/pngtrans.o libpng/pngwio.o libpng/pngwrite.o libpng/pngwtran.o libpng/pngwutil.o LIBPNGOBJ = libpng/png.o libpng/pngerror.o libpng/pngget.o libpng/pngmem.o libpng/pngpread.o libpng/pngread.o libpng/pngrio.o libpng/pngrtran.o libpng/pngrutil.o libpng/pngset.o libpng/pngtrans.o libpng/pngwio.o libpng/pngwrite.o libpng/pngwtran.o libpng/pngwutil.o
......
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