# Debug build
$ build.bat
or
$ build.bat debug
# Release build
$ build.bat release
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
| package main | |
| import "base:runtime" | |
| import "core:fmt" | |
| import "core:os" | |
| import win "core:sys/windows" | |
| center_window :: proc(hwnd: win.HWND, target_w, target_h: i32) { | |
| DWMWA_EXTENDED_FRAME_BOUNDS :: 9 | |
| // Get display resolution |
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
| # https://github.com/arnetheduck/nim-win32-abi | |
| import win32 / [winnt, winuser, libloaderapi] | |
| const | |
| windowWidth = 500 | |
| windowHeight = 400 | |
| template toPCSTR(s: string): PCSTR = | |
| cast[PCSTR](cstring(s)) |
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
| # https://github.com/arnetheduck/nim-win32-abi | |
| import win32 / [winnt, winuser] | |
| # let | |
| # title = newWideCString("タイトル") | |
| # msg = newWideCString("メッセージ❤!") | |
| # discard MessageBoxW(nil, cast[PCWSTR](msg[0].addr), cast[PCWSTR](title[0].addr), MB_YESNO.uint32) | |
| let | |
| title = newWideCString("Title") |
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
| // Zig 0.17 | |
| const std = @import("std"); | |
| const Io = std.Io; | |
| /// パースの結果を表す汎用構造体 | |
| pub fn ParserResult(comptime T: type) type { | |
| return struct { | |
| value: T, | |
| rest: []const u8, |
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 std / [strutils, sugar] | |
| type | |
| ParseError = enum | |
| PeMismatch | |
| PeUnexpectedEOF | |
| PeIntOverflow | |
| ParseState[I] = object | |
| input: I |
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
| # https://x.com/ociaccod/status/2109450500966162853 | |
| import std/syncio | |
| {.pragma: raylib, cdecl, dynlib: "./libraylib.so".} | |
| type | |
| Color* {.bycopy.} = object | |
| r*: uint8 | |
| g*: uint8 |
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
| @echo off | |
| setlocal | |
| set OUT_DIR=web | |
| if not exist %OUT_DIR% mkdir %OUT_DIR% | |
| set FILES="vendor\raylib\bin\wasm\libraylib.web.a" | |
| set "FLAGS=-DPLATFORM_WEB" | |
| set "FLAGS=%FLAGS% -I ./vendor/raylib/include" |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Net.Http; | |
| using System.Text.RegularExpressions; | |
| using System.Threading.Tasks; | |
| string[,] urlList = | |
| { | |
| { "nim-lang", "Nim" }, | |
| { "odin-lang", "Odin" }, |
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
| #!/bin/sh | |
| EXE=main | |
| SDL3=C:/Libs/SDL3/x86_64-w64-mingw32 | |
| if [ ! -e "SDL3.dll" ]; then | |
| cp ${SDL3}/bin/SDL3.dll . | |
| fi | |
| cc -I${SDL3}/include -L${SDL3}/bin -o ${EXE} main.c -lSDL3 |
NewerOlder