- devkitpro-pacman.amd64.deb をダウンロード
# install
$ cd ~/Downloads
$ sudo dpkg -i devkitpro-pacman.amd64.deb
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="anime.min.js"></script> | |
| <style> | |
| body {background-color: #ddd;} | |
| </style> | |
| </head> | |
| <body></body> |
# install
$ cd ~/Downloads
$ sudo dpkg -i devkitpro-pacman.amd64.deb
| import math, random, strformat, tables | |
| # Original Python version: https://github.com/DanaL/RLDungeonGenerator | |
| type | |
| DungeonSqr = object | |
| sqr: string | |
| Room = object | |
| row: int | |
| col: int |
$ zig version
0.7.1+ba2f2e139
$ zig build-lib math.zig -target wasm32-freestanding
$ python3 -m http.server 8000
# then open browser
| // Tutorial 1 : Opening a window | |
| // http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/#how-to-follow-these-tutorials | |
| // Ubuntu | |
| // gcc main.c -lGL -lGLEW -lglfw && ./a.out | |
| // Windows (MSYS2) | |
| // gcc main.c -lopengl32 -lglfw3 -lglew32 | |
| #include <stdio.h> |
| // http://codelabo.com/posts/20200228150223 | |
| // Ubuntu | |
| // sudo apt get install libglfw3-dev libglew-dev | |
| // Build | |
| // g++ main.cc -lGL -lglfw -lGLEW && ./a.out | |
| #include <fstream> | |
| #include <iostream> |
| // Build: zig build-exe -O ReleaseFast --strip src/main.zig | |
| // Run: zig build run -- -w 70 -h 40 -m "*" -s 0.07 -c 25 | |
| // Version: 0.10.0-dev.3475+b3d463c9e | |
| // Date: 2022/08/09 | |
| const std = @import("std"); | |
| const fmt = std.fmt; | |
| const mem = std.mem; | |
| const os = std.os; |
| #include "raylib.h" | |
| #include <stdlib.h> // Required for: calloc(), realloc(), free() | |
| #include <string.h> // Required for: memcpy() | |
| // Text to be displayed, must be UTF-8 (save this code file as UTF-8) | |
| // NOTE: It can contain all the required text for the game, | |
| // this text will be scanned to get all the required codepoints | |
| // static char *text = "いろはにほへと ちりぬるを\nわかよたれそ つねならむ\nうゐのおくやま けふこえて\nあさきゆめみし ゑひもせす"; |
| // gcc main.c -DUNICODE -mwindows; .\a | |
| #include <windows.h> | |
| int WINAPI WinMain(HINSTANCE ins, | |
| HINSTANCE previns, | |
| LPSTR cmdline, | |
| int cmd) { | |
| MessageBox(NULL, TEXT("Hello world."), TEXT("メッセージボックス"), MB_OK); |
| // Build (MSYS2) | |
| // gcc -Wall -pedantic main.c `sdl2-config --cflags --libs` | |
| #include <SDL.h> | |
| #include <stdbool.h> | |
| int main(int argc, char** argv) { | |
| SDL_Init(SDL_INIT_EVERYTHING); | |
| SDL_Window* window = SDL_CreateWindow( |