> mkdir c:\llvm20
> cd c:\llvm20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/linux/src/Engine.cpp b/linux/src/Engine.cpp | |
| index 41481be07..9a413e412 100644 | |
| --- a/linux/src/Engine.cpp | |
| +++ b/linux/src/Engine.cpp | |
| @@ -117,6 +117,24 @@ namespace | |
| std::vector<std::string> slugs; | |
| } global_personal_call_url; | |
| + | |
| + // defines conversion functions between the "opaque types" used by zig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const win32 = @import("win32").everything; | |
| const root = @import("root"); | |
| const audio = @import("audio.zig"); | |
| fn u32FromHr(hr: i32) u32 { | |
| return @bitCast(hr); | |
| } | |
| pub fn processWarmup() !void { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include <cstdint> | |
| #include <optional> | |
| enum class ReleaseMouseButtons { No, Yes }; | |
| struct SendMousePos { int32_t x; int32_t y; }; | |
| void send_mouse_move(std::optional<SendMousePos> pos, ReleaseMouseButtons); | |
| void send_mouse_button(uint32_t button_flags); | |
| void send_mouse_scrolls(bool precise, float delta_x, float delta_y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import datetime | |
| import hashlib | |
| import filecmp | |
| import glob | |
| import json | |
| import os | |
| import pathlib | |
| import re | |
| import shutil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static LRESULT CALLBACK LoggingWndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) | |
| { | |
| MsgNode msg_node; | |
| WndProcEnter(&msg_node, hwnd, msg, wparam, lparam); | |
| if (false) { | |
| char buf[1000]; | |
| FormatMessages(buf, 0, sizeof(buf), &msg_node); | |
| TRACELOG(LOG_INFO, "WndProc: %s", buf); | |
| } | |
| LRESULT result = ActualWndProc(hwnd, msg, wparam, lparam); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| pub const Params = struct { | |
| Return: type, | |
| Args: type, | |
| }; | |
| pub fn with( | |
| comptime T: type, | |
| comptime params: Params, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // perftest.zig | |
| // | |
| // build with | zig build-exe -O ReleaseFast perftest.zig | |
| // linux test | poop "./perftest std" "./perftest custom" | |
| // | |
| const std = @import("std"); | |
| const tokens = @embedFile("tokens.zig"); | |
| pub fn main() void { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const builtin = @import("builtin"); | |
| pub fn build(b: *std.Build) void { | |
| const target = b.standardTargetOptions(.{}); | |
| const win32_dep = b.dependency("win32", .{}); | |
| const win32_mod = win32_dep.module("zigwin32"); | |
| const exe = b.addExecutable(.{ | |
| .name = "example", | |
| .root_source_file = b.path("example.zig"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn hns_from_filetime(filetime: win32.FILETIME) u64 { | |
| return @as(u64, filetime.dwLowDateTime) | | |
| (@as(u64, filetime.dwHighDateTime) << 32); | |
| } | |
| const TimeFmt = struct { | |
| hns: u64, | |
| pub fn format( | |
| self: TimeFmt, | |
| comptime fmt: []const u8, | |
| options: std.fmt.FormatOptions, |
NewerOlder