.

守矢諏訪子 <suwako@076.moe>、2026-07-18 12:04
コミット 789b1f2077c08a73065e8a073bf32bef9f8a71fc ・親 dcd5d36 ・ファイルを見る

3個のファイル、+13 -5

変更 README.md
@@ -1,7 +1,14 @@
11 # テトリス
22
33 ## ビルド
4+### Windows
45 ```sh
56 $ cmake -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release
7+$ cmake --build build --config Release
8+```
9+
10+### Unix
11+```sh
12+$ cmake -B build -DCMAKE_BUILD_TYPE=Release
613 $ cmake --build build --config Release
714 ```
変更 main.cc
@@ -39,15 +39,15 @@
3939
4040 #include <tetris/ass/icon.hh>
4141
42-constexpr i32 screenWidth = 900;
43-constexpr i32 screenHeight = 700;
42+constexpr i32 ScreenWidth = 900;
43+constexpr i32 ScreenHeight = 700;
4444
4545 int main() {
4646 #if PRODUCTION_BUILD == 1
4747 SetTraceLogLevel(LOG_NONE);
4848 #endif
49- SetConfigFlags(FLAG_WINDOW_RESIZABLE);
50- InitWindow(screenWidth, screenHeight, "テトリス");
49+ SetConfigFlags(FLAG_WINDOW_HIGHDPI);
50+ InitWindow(ScreenWidth, ScreenHeight, "テトリス");
5151
5252 Image icon = LoadImageFromMemory(".png", __ass_icon_png, __ass_icon_png_len);
5353 SetWindowIcon(icon);
@@ -44,6 +44,7 @@
4444
4545 #include <cassert>
4646 #include <iostream>
47+#include <cmath>
4748
4849 namespace tetris::scene {
4950 constexpr f32 MinTimePassed = 5.f;
@@ -102,7 +103,7 @@
102103 constexpr f32 spacing = 40.f;
103104
104105 auto DrawButton = [&](Font font, cstr text, Vector2 pos, bool selected) {
105- f32 scale = selected ? 1.05f + 0.03f * sinf(GetTime() * 8.f) : 1.f;
106+ f32 scale = selected ? 1.05f + 0.03f * std::sinf(GetTime() * 8.f) : 1.f;
106107 Color canColor = m_InputTimer > MinTimePassed ? RED : GRAY;
107108 Color color = selected ? canColor : Fade(canColor, 0.5f);
108109 f32 sizePx = 20.f * scale;