mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-10 09:43:52 +01:00
COBJMeshFileLoader using a bit more exact color conversion for 0-1 to 0-255 range
Same now as SColorf::toSColor git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6214 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
e611f2c571
commit
9147d4ade8
@ -1,5 +1,6 @@
|
||||
--------------------------
|
||||
Changes in 1.9 (not yet released)
|
||||
- COBJMeshFileLoader using a bit more exact color conversion for 0-1 to 0-255 range (same now as SColorf::toSColor uses).
|
||||
- Speedup for COBJMeshWriter
|
||||
- Add blinkMode parameter to IGUIEnvironment::addModalScreen, so blinking can be suppressed
|
||||
- Speedup: Avoid string copy in CXMLReaderImpl::getAttributeByName
|
||||
|
@ -711,11 +711,11 @@ const c8* COBJMeshFileLoader::readColor(const c8* bufPtr, video::SColor& color,
|
||||
c8 colStr[COLOR_BUFFER_LENGTH];
|
||||
|
||||
bufPtr = goAndCopyNextWord(colStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd);
|
||||
color.setRed((s32)(core::fast_atof(colStr) * 255.0f));
|
||||
color.setRed((u32)core::round32(core::fast_atof(colStr)*255.f));
|
||||
bufPtr = goAndCopyNextWord(colStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd);
|
||||
color.setGreen((s32)(core::fast_atof(colStr) * 255.0f));
|
||||
color.setGreen((u32)core::round32(core::fast_atof(colStr)*255.f));
|
||||
bufPtr = goAndCopyNextWord(colStr, bufPtr, COLOR_BUFFER_LENGTH, bufEnd);
|
||||
color.setBlue((s32)(core::fast_atof(colStr) * 255.0f));
|
||||
color.setBlue((u32)core::round32(core::fast_atof(colStr)*255.f));
|
||||
return bufPtr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user