# split pd-maths into pd-core and pd-image (0.2.3)

This commit is contained in:
2025-02-28 21:14:20 +01:00
parent debedf59c6
commit af3d3e0b5b
32 changed files with 81 additions and 113 deletions

View File

@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include <pd/maths/bit_util.hpp>
#include <pd/core/bit_util.hpp>
namespace PD::BitUtil {
bool IsSingleBit(u32 v) { return v && !(v & (v - 1)); }

View File

@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include <pd/maths/color.hpp>
#include <pd/core/color.hpp>
namespace PD {
// The Solution of the biggest performance issue

View File

@ -24,8 +24,8 @@ SOFTWARE.
#include <cstring>
#include <memory>
#include <pd/maths/img_blur.hpp>
#include <pd/maths/img_convert.hpp>
#include <pd/image/img_blur.hpp>
#include <pd/image/img_convert.hpp>
namespace PD {
namespace ImgBlur {

View File

@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include <pd/maths/img.hpp>
#include <pd/maths/img_convert.hpp>
#include <pd/image/img_convert.hpp>
namespace PD::ImgConvert {
void RGB24toRGBA32(std::vector<u8> &out, const std::vector<u8> &in,
@ -42,7 +41,7 @@ void RGB24toRGBA32(std::vector<u8> &out, const std::vector<u8> &in,
void Reverse32(std::vector<u8> &buf, const int &w, const int &h) {
for (int x = 0; x < w; x++) {
for (int y = 0; y < h; y++) {
int i = Img::IndexDefault(x, y, w);
int i = y * w + x;
u8 t0 = buf[i + 0];
u8 t1 = buf[i + 1];
buf[i + 0] = buf[i + 3];

View File

@ -30,8 +30,8 @@ SOFTWARE.
#include <pd/core/io.hpp>
#include <pd/core/timetrace.hpp>
#include <pd/lithium/texture.hpp>
#include <pd/maths/bit_util.hpp>
#include <pd/maths/img_convert.hpp>
#include <pd/core/bit_util.hpp>
#include <pd/image/img_convert.hpp>
namespace PD {
GPU_TEXCOLOR GetTexFmt(Texture::Type type) {

View File

@ -22,7 +22,7 @@ SOFTWARE.
*/
#include <pd/external/json.hpp>
#include <pd/maths/color.hpp>
#include <pd/core/color.hpp>
#include <pd/overlays/keyboard.hpp>
#include <pd/lib3ds/gamepad_icons.hpp>

View File

@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include <pd/maths/color.hpp>
#include <pd/core/color.hpp>
#include <pd/ui7/theme.hpp>
namespace PD {