This file contains 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 ( | |
"encoding/hex" | |
"fmt" | |
"math/rand" | |
"github.com/gopherjs/vecty" | |
"github.com/gopherjs/vecty/elem" | |
"github.com/gopherjs/vecty/event" |
This file contains 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 ( | |
"encoding/hex" | |
"fmt" | |
"math/rand" | |
"github.com/gopherjs/vecty" | |
"github.com/gopherjs/vecty/elem" | |
"github.com/gopherjs/vecty/event" |
This file contains 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 ( | |
"fmt" | |
"reflect" | |
) | |
func assert(k bool, msg string) { | |
if !k { | |
panic(msg) |
This file contains 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 ( | |
"fmt" | |
"reflect" | |
"time" | |
) | |
type Status struct { | |
APC string |
This file contains 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
#include "stdio.h" | |
#include "math.h" | |
#include "assert.h" | |
#define static_assert _Static_assert | |
typedef float f32; | |
typedef struct Vec2 { f32 X, Y; } Vec2; | |
float Vec2_Distance(Vec2 a, Vec2 b){ | |
f32 dx = a.X - b.X; |
This file contains 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
TEXT github.com/hajimehoshi/ebiten.vertices(SB) | |
:0 0xebc68 e59a1008 MOVW 0x8(R10), R1 | |
:0 0xebc6c e15d0001 CMP R1, R13 | |
:0 0xebc70 9a000227 B.LS 0xec514 | |
:0 0xebc74 e52de068 MOVW.W R14, -0x68(R13) | |
:0 0xebc78 ebffd931 BL github.com/hajimehoshi/ebiten/internal/graphics.QuadVertexSizeInBytes(SB) | |
:0 0xebc7c e59d0004 MOVW 0x4(R13), R0 | |
:0 0xebc80 e58d0060 MOVW R0, 0x60(R13) | |
:0 0xebc84 e59d106c MOVW 0x6c(R13), R1 | |
:0 0xebc88 e5912018 MOVW 0x18(R1), R2 |
This file contains 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
set VCVARS="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" | |
call %VCVARS% x64 | |
cl /O1 -Feloader.64.exe loader.cpp | |
call %VCVARS% x86 | |
cl /O1 -Feloader.32.exe loader.cpp | |
del *.obj |
This file contains 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
rem don't use optimizations otherwise cl may remove Shell32 dependency | |
cl dynamic.cpp | |
cl static.cpp | |
cl none.cpp | |
del *.obj | |
rem compiled x64 https://dl.dropboxusercontent.com/u/4300994/Go/measure-shell32-loading.zip |
This file contains 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
// adjust the input/controller to your own liking | |
type Device interface { | |
Update(input *Controller, window *glfw.Window) | |
} | |
// this is the general | |
type Controller struct { | |
ID int | |
Device Device |
This file contains 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
use as | |
go build -gantt <project> 2> build.html | |
then add <table> and </table> to the beginning and end of build.html |