* fix filestream read
* fix transparent minimap
This commit is contained in:
Eduardo Bart 2012-04-27 19:17:51 -03:00
parent 220701e90f
commit b75483e9bf
4 changed files with 18 additions and 19 deletions

View File

@ -100,7 +100,7 @@ locale = {
["Message to %s"] = "Mandar mensagem para %s", ["Message to %s"] = "Mandar mensagem para %s",
["Minimap"] = "Minimapa", ["Minimap"] = "Minimapa",
["Module Manager"] = "Gerenciador de Módulos", ["Module Manager"] = "Gerenciador de Módulos",
["Module name"] = "Nomo do módulo", ["Module name"] = "Nome do módulo",
["Money:"] = "Dinheiro:", ["Money:"] = "Dinheiro:",
["Move Stackable Item"] = "Mover item contável", ["Move Stackable Item"] = "Mover item contável",
["Move up"] = "Mover para cima", ["Move up"] = "Mover para cima",

View File

@ -158,7 +158,7 @@ uint8 FileStream::getU8()
if(PHYSFS_read(m_fileHandle, &v, 1, 1) != 1) if(PHYSFS_read(m_fileHandle, &v, 1, 1) != 1)
logTraceError("operation failed on '", m_name, "': ", PHYSFS_getLastError()); logTraceError("operation failed on '", m_name, "': ", PHYSFS_getLastError());
} else { } else {
if(m_cacheReadPos+1 >= m_cacheBuffer.size()) { if(m_cacheReadPos+1 > m_cacheBuffer.size()) {
logTraceError("operation failed on '", m_name, "': reached file eof"); logTraceError("operation failed on '", m_name, "': reached file eof");
return 0; return 0;
} }
@ -176,7 +176,7 @@ uint16 FileStream::getU16()
if(PHYSFS_readULE16(m_fileHandle, &v) == 0) if(PHYSFS_readULE16(m_fileHandle, &v) == 0)
logTraceError("operation failed on '", m_name, "': ", PHYSFS_getLastError()); logTraceError("operation failed on '", m_name, "': ", PHYSFS_getLastError());
} else { } else {
if(m_cacheReadPos+2 >= m_cacheBuffer.size()) { if(m_cacheReadPos+2 > m_cacheBuffer.size()) {
logTraceError("operation failed on '", m_name, "': reached file eof"); logTraceError("operation failed on '", m_name, "': reached file eof");
return 0; return 0;
} }
@ -194,7 +194,7 @@ uint32 FileStream::getU32()
if(PHYSFS_readULE32(m_fileHandle, &v) == 0) if(PHYSFS_readULE32(m_fileHandle, &v) == 0)
logTraceError("operation failed on '", m_name, "': ", PHYSFS_getLastError()); logTraceError("operation failed on '", m_name, "': ", PHYSFS_getLastError());
} else { } else {
if(m_cacheReadPos+4 >= m_cacheBuffer.size()) { if(m_cacheReadPos+4 > m_cacheBuffer.size()) {
logTraceError("operation failed on '", m_name, "': reached file eof"); logTraceError("operation failed on '", m_name, "': reached file eof");
return 0; return 0;
} }
@ -212,7 +212,7 @@ uint64 FileStream::getU64()
if(PHYSFS_readULE64(m_fileHandle, (PHYSFS_uint64*)&v) == 0) if(PHYSFS_readULE64(m_fileHandle, (PHYSFS_uint64*)&v) == 0)
logTraceError("operation failed on '", m_name, "': ", PHYSFS_getLastError()); logTraceError("operation failed on '", m_name, "': ", PHYSFS_getLastError());
} else { } else {
if(m_cacheReadPos+8 >= m_cacheBuffer.size()) { if(m_cacheReadPos+8 > m_cacheBuffer.size()) {
logTraceError("operation failed on '", m_name, "': reached file eof"); logTraceError("operation failed on '", m_name, "': reached file eof");
return 0; return 0;
} }

View File

@ -131,6 +131,8 @@ void MapView::draw(const Rect& rect)
drawOffset.y += (srcVisible.height() - srcSize.height()) / 2; drawOffset.y += (srcVisible.height() - srcSize.height()) / 2;
Rect srcRect = Rect(drawOffset, srcSize); Rect srcRect = Rect(drawOffset, srcSize);
g_painter->setColor(Color::white);
g_painter->setCompositionMode(Painter::CompositionMode_Replace);
#if 0 #if 0
// debug source area // debug source area
g_painter->saveAndResetState(); g_painter->saveAndResetState();
@ -144,6 +146,7 @@ void MapView::draw(const Rect& rect)
m_framebuffer->draw(rect, srcRect); m_framebuffer->draw(rect, srcRect);
#endif #endif
g_painter->resetCompositionMode();
g_painter->resetShaderProgram(); g_painter->resetShaderProgram();
// this could happen if the player position is not known yet // this could happen if the player position is not known yet

View File

@ -36,11 +36,8 @@ fi
gitdir=`pwd` gitdir=`pwd`
revision=`git describe --dirty --always` revision=`git describe --dirty --always`
#rm -rf build rm -rf build
if [ -d build ]; then mkdir build
cd build
else
mkdir -p build
cd build cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$gitdir/src/framework/cmake/${platform}_toolchain.cmake \ cmake -DCMAKE_TOOLCHAIN_FILE=$gitdir/src/framework/cmake/${platform}_toolchain.cmake \
@ -49,7 +46,6 @@ else
-DBOT_PROTECTION=OFF \ -DBOT_PROTECTION=OFF \
-DPROTOCOL=$protocol \ -DPROTOCOL=$protocol \
.. || exit .. || exit
fi
make "-j${make_jobs}" || exit make "-j${make_jobs}" || exit