0.7.0 rewrite dev

- remove everyting
- keep core
-rename bit_utils to bits
- add formatter for  color
- add float getters to color
- start with new drivers api
This commit is contained in:
2026-03-16 06:37:51 +01:00
parent ff1b574276
commit 41b612ec0a
131 changed files with 499 additions and 55336 deletions

View File

@@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include <pd/core/common.hpp>
#include <pd/common.hpp>
namespace PD {
/**
@@ -92,9 +92,7 @@ PD_API const std::string PathRemoveExtension(const std::string& path);
*/
template <typename T>
inline const std::string ToHex(const T& v) {
std::stringstream s;
s << "0x" << std::setfill('0') << std::setw(sizeof(v) * 2) << std::hex << v;
return s.str();
return std::format("{0:0{1}X}", v, sizeof(v) * 2);
}
/**
* Generate a Hash out of a string
@@ -107,24 +105,22 @@ PD_API u32 FastHash(const std::string& s);
* Based on their Macros
* @return CompilerName: Version
*/
inline const std::string GetCompilerVersion() {
/// As the function looks like this Project is meant to
/// Be ported to other systems as well
std::stringstream res;
inline const char* GetCompilerVersion() {
/// As the function looks like this Project is meant to
/// Be ported to other systems as well
#define __mks(x) #x
#define mkstring(x) __mks(x)
#ifdef __clang__ // Check clang first
res << "Clang: " << __clang_major__ << ".";
res << __clang_minor__ << ".";
res << __clang_patchlevel__;
return "Clang: " mkstring(__clang_major__) "." mkstring(
__clang_minor__) "." mkstring(__clang_patchlevel__);
#elif __GNUC__
res << "GCC: " << __GNUC__;
res << "." << __GNUC_MINOR__ << ".";
res << __GNUC_PATCHLEVEL__;
return "GCC: " mkstring(__GNUC__) "." mkstring(__GNUC_MINOR__) "." mkstring(
__GNUC_PATCHLEVEL__);
#elif _MSC_VER
res << "MSVC: " << _MSC_VER;
return "MSVC; " mkstring(_MSC_VER);
#else
res << "Unknown Compiler";
return "Unknown Compiler";
#endif
return res.str();
}
} // namespace Strings
class U8Iterator {