HCPP DEV | (uint8_t)0x539
71 subscribers
327 photos
43 videos
69 files
296 links
Разработка на С++
в Visual Studio 2026 Community
И немного хуйни
пиздатый сайт мой https://hcpp20334.github.io
пиздатый гитхаб https://github.com/hcpp20334

помочь проекту
https://donationalerts.com/r/hcpp
Download Telegram
рекорд
😁1
Обновил просмоторщик ассетов в игре)
новый модуль в PahomEngine

struct GameUI {
bool TextButton(ImVec4 colHovered, ImVec4 colDefault, std::string text,bool isCenterX = false) {
static bool isPresedButton = false,isHoveredButton = false;
ImGui::SetCursorPosX(isCenterX ? ((ImGui::GetWindowWidth() - ImGui::CalcTextSize(text.c_str()).x) / 2) : 0);
ImGui::TextColored((isPresedButton || isHoveredButton) ? colHovered : colDefault, text.c_str());
isPresedButton = ImGui::IsItemClicked();
isHoveredButton = ImGui::IsItemHovered();
return isPresedButton;
}
};
void loadResulutionUI() {
static const std::pair<int32_t, int32_t> i32WindowSizePresetsList[] = {
{640, 480}, {800, 600}, {1024, 768}, {1280, 720},
{1366, 768}, {1600, 900}, {1920, 1080}
};
constexpr int32_t i32PresetsCount = sizeof(i32WindowSizePresetsList) / sizeof(i32WindowSizePresetsList[0]);
static int32_t i32SelectedId = 1,i32HoveredId = 1;

for (int32_t i = 0; i < i32PresetsCount; ++i) {
std::string slabel = std::format("{}×{}", i32WindowSizePresetsList[i].first, i32WindowSizePresetsList[i].second);
static int32_t blk = 0;
(i32SelectedId == i) ? ImGui::Bullet() : ImGui::Text("%c", "*");
ImGui::SameLine();
ImGui::TextColored((i32SelectedId == i || i32HoveredId == i) ? PahomEngine->RGBA(0,255,130,255) : PahomEngine->RGBA(35,35,55,255), slabel.c_str());
if (ImGui::IsItemClicked()) {
i32SelectedId = i;
PahomEngine->i64WindowSizeGL[0] = i32WindowSizePresetsList[i].first;
PahomEngine->i64WindowSizeGL[1] = i32WindowSizePresetsList[i].second;
}
if (ImGui::IsItemHovered()) {
i32HoveredId = i;
blk++;
if (blk > 3) {
blk = 0;
}
}
ImGui::Separator();
}
}

селектор разрешения
сегодня в 10 часов по мск опубликуется новый видос
1
This media is not supported in the widget
VIEW IN TELEGRAM
#define double64_t_size  sizeof(double64_t);
typedef long double double64_t;
struct d64Vec2 {
double64_t x, y;
constexpr d64Vec2() : x(0.0L), y(0.0L) {}
constexpr d64Vec2(double64_t _x,double64_t _y) : x(_x), y(_y) {}
constexpr size_t size() const { return sizeof(this->x) + sizeof(this->y); }
static constexpr d64Vec2 P_(d64Vec2 a, d64Vec2 b) { return { a.x + b.x, a.y + b.y }; }
static constexpr d64Vec2 M_(d64Vec2 a, d64Vec2 b) { return { a.x - b.x, a.y - b.y }; }
static constexpr d64Vec2 D_(d64Vec2 a, d64Vec2 b) { return { a.x / b.x, a.y / b.y }; }
static constexpr d64Vec2 S_(double64_t s, d64Vec2 v) { return { s * v.x, s * v.y }; }
};

модуль точный вектор на основе расширенного double
typedef long double double64_t;
constexpr size_t double64_t_size = sizeof(double64_t);
struct d64Vec2 {
double64_t x, y;
constexpr d64Vec2() : x(0.0L), y(0.0L) {}
constexpr d64Vec2(double64_t _x,double64_t _y) : x(_x), y(_y) {}
constexpr size_t size() const { return sizeof(this->x) + sizeof(this->y); }
static constexpr d64Vec2 P_(d64Vec2 a, d64Vec2 b) { return { a.x + b.x, a.y + b.y }; }
static constexpr d64Vec2 M_(d64Vec2 a, d64Vec2 b) { return { a.x - b.x, a.y - b.y }; }
static constexpr d64Vec2 D_(d64Vec2 a, d64Vec2 b) noexcept { if (!b.x && !b.y) { std::runtime_error("[d64Vec2] divide zero!! return 0"); return { 0,0 }; } else { return { a.x / b.x, a.y / b.y }; }}
static constexpr d64Vec2 S_(double64_t s, d64Vec2 v) { return { s * v.x, s * v.y }; }
};
завтра ночью стрим будет) ждите
кто умеет работать в давинчи резолв? Мне надо как то видео вращать. Напиши те в лс
🥴1
CM3РТb
)
🥴2
Ебать тока проснулся