mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-21 09:21:02 +00:00
Remove MathUtil.{cpp,h}
This commit is contained in:
parent
a2748c074c
commit
08803c101e
@ -259,8 +259,6 @@ add_library(Common STATIC
|
||||
Common/KeyMap.h
|
||||
Common/LogManager.cpp
|
||||
Common/LogManager.h
|
||||
Common/MathUtil.cpp
|
||||
Common/MathUtil.h
|
||||
Common/MemArena.cpp
|
||||
Common/MemArena.h
|
||||
Common/MemoryUtil.cpp
|
||||
|
@ -183,12 +183,10 @@
|
||||
<ClInclude Include="KeyMap.h" />
|
||||
<ClInclude Include="Log.h" />
|
||||
<ClInclude Include="LogManager.h" />
|
||||
<ClInclude Include="MathUtil.h" />
|
||||
<ClInclude Include="MemArena.h" />
|
||||
<ClInclude Include="MemoryUtil.h" />
|
||||
<ClInclude Include="MsgHandler.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="StdConditionVariable.h" />
|
||||
<ClInclude Include="StdMutex.h" />
|
||||
<ClInclude Include="StringUtils.h" />
|
||||
<ClInclude Include="Swap.h" />
|
||||
@ -215,7 +213,6 @@
|
||||
<ClCompile Include="FileUtil.cpp" />
|
||||
<ClCompile Include="KeyMap.cpp" />
|
||||
<ClCompile Include="LogManager.cpp" />
|
||||
<ClCompile Include="MathUtil.cpp" />
|
||||
<ClCompile Include="MemArena.cpp" />
|
||||
<ClCompile Include="MemoryUtil.cpp" />
|
||||
<ClCompile Include="Misc.cpp" />
|
||||
@ -244,4 +241,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -16,11 +16,9 @@
|
||||
<ClInclude Include="FixedSizeQueue.h" />
|
||||
<ClInclude Include="Log.h" />
|
||||
<ClInclude Include="LogManager.h" />
|
||||
<ClInclude Include="MathUtil.h" />
|
||||
<ClInclude Include="MemArena.h" />
|
||||
<ClInclude Include="MemoryUtil.h" />
|
||||
<ClInclude Include="MsgHandler.h" />
|
||||
<ClInclude Include="StdConditionVariable.h" />
|
||||
<ClInclude Include="StdMutex.h" />
|
||||
<ClInclude Include="StringUtils.h" />
|
||||
<ClInclude Include="Thunk.h" />
|
||||
@ -46,7 +44,6 @@
|
||||
<ClCompile Include="CPUDetect.cpp" />
|
||||
<ClCompile Include="FileUtil.cpp" />
|
||||
<ClCompile Include="LogManager.cpp" />
|
||||
<ClCompile Include="MathUtil.cpp" />
|
||||
<ClCompile Include="MemArena.cpp" />
|
||||
<ClCompile Include="MemoryUtil.cpp" />
|
||||
<ClCompile Include="Misc.cpp" />
|
||||
@ -76,4 +73,4 @@
|
||||
<UniqueIdentifier>{1b593f03-7b28-4707-9228-4981796f5589}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -1,31 +0,0 @@
|
||||
// Copyright (C) 2003 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0 or later versions.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "MathUtil.h"
|
||||
|
||||
int GetPow2(int x)
|
||||
{
|
||||
int ret = 0;
|
||||
int val = 1;
|
||||
while(x > val)
|
||||
{
|
||||
ret++;
|
||||
val *= 2;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
// Copyright (C) 2003 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0 or later versions.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _MATH_UTIL_H_
|
||||
#define _MATH_UTIL_H_
|
||||
|
||||
int GetPow2(int x);
|
||||
|
||||
#endif // _MATH_UTIL_H_
|
@ -25,7 +25,6 @@
|
||||
#include "Core/MemMap.h"
|
||||
#include "image/zim_load.h"
|
||||
#include "util/text/utf8.h"
|
||||
#include "MathUtil.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
static u32 atlasPtr;
|
||||
@ -746,6 +745,20 @@ void PPGeDrawImage(float x, float y, float w, float h, float u1, float v1, float
|
||||
EndVertexDataAndDraw(GE_PRIM_RECTANGLES);
|
||||
}
|
||||
|
||||
// Return a value such that (1 << value) >= x
|
||||
int GetPow2(int x)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
int ret = 31 - __builtin_clz(x|1);
|
||||
if ((1 << ret) < x)
|
||||
#else
|
||||
int ret = 0;
|
||||
while ((1 << ret) < x)
|
||||
#endif
|
||||
ret++;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void PPGeSetDefaultTexture()
|
||||
{
|
||||
WriteCmd(GE_CMD_TEXTUREMAPENABLE, 1);
|
||||
|
@ -34,7 +34,6 @@ SOURCES += ../Common/ChunkFile.cpp \
|
||||
../Common/FileUtil.cpp \
|
||||
../Common/LogManager.cpp \
|
||||
../Common/KeyMap.cpp \
|
||||
../Common/MathUtil.cpp \
|
||||
../Common/MemArena.cpp \
|
||||
../Common/MemoryUtil.cpp \
|
||||
../Common/Misc.cpp \
|
||||
@ -48,7 +47,6 @@ HEADERS += ../Common/ChunkFile.h \
|
||||
../Common/FileUtil.h \
|
||||
../Common/LogManager.h \
|
||||
../Common/KeyMap.h \
|
||||
../Common/MathUtil.h \
|
||||
../Common/MemArena.h \
|
||||
../Common/MemoryUtil.h \
|
||||
../Common/MsgHandler.h \
|
||||
|
@ -122,7 +122,6 @@ EXEC_AND_LIB_FILES := \
|
||||
$(SRC)/Common/ThreadPools.cpp \
|
||||
$(SRC)/Common/Timer.cpp \
|
||||
$(SRC)/Common/Misc.cpp \
|
||||
$(SRC)/Common/MathUtil.cpp \
|
||||
$(SRC)/GPU/Math3D.cpp \
|
||||
$(SRC)/GPU/GPUCommon.cpp \
|
||||
$(SRC)/GPU/GPUState.cpp \
|
||||
|
Loading…
x
Reference in New Issue
Block a user