UserEvent now usize size_t for UserData fields to avoid cutting number on some platforms.
Fix some warnings. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5417 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
4f56eecd61
commit
278dc39029
|
@ -1,6 +1,7 @@
|
||||||
--------------------------
|
--------------------------
|
||||||
Changes in 1.9 (not yet released)
|
Changes in 1.9 (not yet released)
|
||||||
|
|
||||||
|
- change SEvent::SUserEvent.UserData1 and SEvent::SUserEvent.UserData1 from s32 to size_t to avoid cutting numbers on some 64-bit platforms (SDL and Windows)
|
||||||
- Improve speed of draw3DBox (OpenGL and D3D9). Thanks @zerochen for patch (https://sourceforge.net/p/irrlicht/patches/256)
|
- Improve speed of draw3DBox (OpenGL and D3D9). Thanks @zerochen for patch (https://sourceforge.net/p/irrlicht/patches/256)
|
||||||
- Support more keys on OSX "[]\". Thanks @neoascetic for patch (#313).
|
- Support more keys on OSX "[]\". Thanks @neoascetic for patch (#313).
|
||||||
- Fix IBillboardTextSceneNode::setTextColor which did nothing in the past. It now maps to setColor instead.
|
- Fix IBillboardTextSceneNode::setTextColor which did nothing in the past. It now maps to setColor instead.
|
||||||
|
|
|
@ -405,10 +405,10 @@ struct SEvent
|
||||||
struct SUserEvent
|
struct SUserEvent
|
||||||
{
|
{
|
||||||
//! Some user specified data as int
|
//! Some user specified data as int
|
||||||
s32 UserData1;
|
size_t UserData1;
|
||||||
|
|
||||||
//! Another user specified data as int
|
//! Another user specified data as int
|
||||||
s32 UserData2;
|
size_t UserData2;
|
||||||
};
|
};
|
||||||
|
|
||||||
EEVENT_TYPE EventType;
|
EEVENT_TYPE EventType;
|
||||||
|
|
|
@ -1007,8 +1007,8 @@ bool CIrrDeviceLinux::run()
|
||||||
{
|
{
|
||||||
// we assume it's a user message
|
// we assume it's a user message
|
||||||
irrevent.EventType = irr::EET_USER_EVENT;
|
irrevent.EventType = irr::EET_USER_EVENT;
|
||||||
irrevent.UserEvent.UserData1 = (s32)event.xclient.data.l[0];
|
irrevent.UserEvent.UserData1 = static_cast<size_t>(event.xclient.data.l[0]);
|
||||||
irrevent.UserEvent.UserData2 = (s32)event.xclient.data.l[1];
|
irrevent.UserEvent.UserData2 = static_cast<size_t>(event.xclient.data.l[1]);
|
||||||
postEventFromUser(irrevent);
|
postEventFromUser(irrevent);
|
||||||
}
|
}
|
||||||
XFree(atom);
|
XFree(atom);
|
||||||
|
|
|
@ -428,8 +428,8 @@ bool CIrrDeviceSDL::run()
|
||||||
|
|
||||||
case SDL_USEREVENT:
|
case SDL_USEREVENT:
|
||||||
irrevent.EventType = irr::EET_USER_EVENT;
|
irrevent.EventType = irr::EET_USER_EVENT;
|
||||||
irrevent.UserEvent.UserData1 = *(reinterpret_cast<s32*>(&SDL_event.user.data1));
|
irrevent.UserEvent.UserData1 = reinterpret_cast<uintptr_t>(SDL_event.user.data1);
|
||||||
irrevent.UserEvent.UserData2 = *(reinterpret_cast<s32*>(&SDL_event.user.data2));
|
irrevent.UserEvent.UserData2 = reinterpret_cast<uintptr_t>(SDL_event.user.data2);
|
||||||
|
|
||||||
postEventFromUser(irrevent);
|
postEventFromUser(irrevent);
|
||||||
break;
|
break;
|
||||||
|
@ -601,7 +601,7 @@ void CIrrDeviceSDL::setWindowCaption(const wchar_t* text)
|
||||||
bool CIrrDeviceSDL::present(video::IImage* surface, void* windowId, core::rect<s32>* srcClip)
|
bool CIrrDeviceSDL::present(video::IImage* surface, void* windowId, core::rect<s32>* srcClip)
|
||||||
{
|
{
|
||||||
SDL_Surface *sdlSurface = SDL_CreateRGBSurfaceFrom(
|
SDL_Surface *sdlSurface = SDL_CreateRGBSurfaceFrom(
|
||||||
surface->lock(), surface->getDimension().Width, surface->getDimension().Height,
|
surface->getData(), surface->getDimension().Width, surface->getDimension().Height,
|
||||||
surface->getBitsPerPixel(), surface->getPitch(),
|
surface->getBitsPerPixel(), surface->getPitch(),
|
||||||
surface->getRedMask(), surface->getGreenMask(), surface->getBlueMask(), surface->getAlphaMask());
|
surface->getRedMask(), surface->getGreenMask(), surface->getBlueMask(), surface->getAlphaMask());
|
||||||
if (!sdlSurface)
|
if (!sdlSurface)
|
||||||
|
@ -673,7 +673,6 @@ bool CIrrDeviceSDL::present(video::IImage* surface, void* windowId, core::rect<s
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_FreeSurface(sdlSurface);
|
SDL_FreeSurface(sdlSurface);
|
||||||
surface->unlock();
|
|
||||||
return (scr != 0);
|
return (scr != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -954,8 +954,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
case WM_USER:
|
case WM_USER:
|
||||||
event.EventType = irr::EET_USER_EVENT;
|
event.EventType = irr::EET_USER_EVENT;
|
||||||
event.UserEvent.UserData1 = (irr::s32)wParam;
|
event.UserEvent.UserData1 = static_cast<size_t>(wParam);
|
||||||
event.UserEvent.UserData2 = (irr::s32)lParam;
|
event.UserEvent.UserData2 = static_cast<size_t>(lParam);
|
||||||
dev = getDeviceFromHWnd(hWnd);
|
dev = getDeviceFromHWnd(hWnd);
|
||||||
|
|
||||||
if (dev)
|
if (dev)
|
||||||
|
|
|
@ -190,10 +190,8 @@ REALINLINE void CTRTextureLightMap2_Add::scanline_bilinear ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
f32 inversew = FIX_POINT_F32_MUL;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef BURNINGVIDEO_RENDERER_FAST
|
#ifdef BURNINGVIDEO_RENDERER_FAST
|
||||||
|
f32 inversew = FIX_POINT_F32_MUL;
|
||||||
u32 dIndex = ( line.y & 3 ) << 2;
|
u32 dIndex = ( line.y & 3 ) << 2;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue