基于SDL的超级简单的飞机大战小游戏

This commit is contained in:
2025-05-27 19:46:49 +08:00
commit 752c53f36c
319 changed files with 95291 additions and 0 deletions

32
lib/spdlog/bench/utils.h Normal file
View File

@ -0,0 +1,32 @@
//
// Copyright(c) 2015 Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
//
#pragma once
#include <iomanip>
#include <locale>
#include <sstream>
namespace utils {
template <typename T>
inline std::string format(const T &value) {
static std::locale loc("");
std::stringstream ss;
ss.imbue(loc);
ss << value;
return ss.str();
}
template <>
inline std::string format(const double &value) {
static std::locale loc("");
std::stringstream ss;
ss.imbue(loc);
ss << std::fixed << std::setprecision(1) << value;
return ss.str();
}
} // namespace utils