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 ( | |
| "bytes" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "os" | |
| "os/exec" |
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
| BasedOnStyle: Google | |
| ColumnLimit: 80 | |
| TabWidth: 4 | |
| IndentWidth: 4 | |
| UseTab: Always | |
| AllowShortIfStatementsOnASingleLine: false | |
| AlwaysBreakTemplateDeclarations: true | |
| BreakBeforeBraces: Linux |
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
| void SDL_RenderFillCircle(SDL_Renderer* rend, int x0, int y0, int radius) | |
| { | |
| // Uses the midpoint circle algorithm to draw a filled circle | |
| // https://en.wikipedia.org/wiki/Midpoint_circle_algorithm | |
| int x = radius; | |
| int y = 0; | |
| int radiusError = 1 - x; | |
| while (x >= y) { | |
| SDL_RenderDrawLine(rend, x + x0, y + y0, -x + x0, y + y0); | |
| SDL_RenderDrawLine(rend, y + x0, x + y0, -y + x0, x + y0); |
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
| // unixoid: | |
| // g++ -fno-ident -Wall -std=c++11 -s -O2 -o snake snake.cc $(sdl2-config --libs) | |
| // win: | |
| // windres snake.rc -O coff snake.res && g++ -fno-ident -Wall -std=c++11 -s -O2 -o snake snake.cc snake.res -static $(sdl2-config --static-libs) | |
| #include <SDL2/SDL.h> | |
| const auto WIDTH = 320, HEIGHT = 240, BLOCK = 16; | |
| constexpr auto MAX_SEGS = ((WIDTH / BLOCK) * (HEIGHT / BLOCK)); | |
| constexpr auto MAX_DOTS = (MAX_SEGS / 100); |
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 ( | |
| "flag" | |
| "fmt" | |
| "image" | |
| _ "image/gif" | |
| _ "image/jpeg" | |
| _ "image/png" | |
| "io" |
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
| === released === | |
| Gentee - https://github.com/gentee/gentee | |
| Rust - https://github.com/rust-lang/rust | |
| Myrddin - https://github.com/oridb/mc | |
| Free Pascal - http://www.freepascal.org/ | |
| Free Basic - https://github.com/freebasic/fbc | |
| Terra - https://github.com/zdevito/terra | |
| === in development === | |
| Zig - https://github.com/andrewrk/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
| package main | |
| import ( | |
| "compress/zlib" | |
| "flag" | |
| "io" | |
| "log" | |
| "os" | |
| ) |
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 ( | |
| "bytes" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "os" |
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
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | |
| <assemblyIdentity | |
| version="1.0.0.0" | |
| processorArchitecture="*" | |
| name="CompanyName.ProductName.YourApplication" | |
| type="win32" | |
| /> | |
| <description>Your application description here.</description> | |
| <dependency> |
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 ( | |
| "archive/zip" | |
| "encoding/json" | |
| "errors" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" |