Skip to content

Commit

Permalink
Auto-version Inochi2D
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed Jun 6, 2021
1 parent 587d095 commit 9d81fbf
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "enter program name, for example ${workspaceFolder}/a.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"console": "externalTerminal"
}
]
}
1 change: 1 addition & 0 deletions dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dependency "bindbc-opengl" version="~>0.13.0"
dependency "asdf" version="~>0.7.8"
versions "GL_42" "GL_AllowDeprecated" "GL_ARB_gl_spirv"
stringImportPaths "shaders/"
preBuildCommands "dub run gitver -- --prefix IN --file source/inochi2d/ver.d --mod inochi2d.ver --appname Inochi2D"
3 changes: 3 additions & 0 deletions source/inochi2d/math/camera.d
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public:
inGetViewport(width, height);

vec2 realSize = vec2(cast(float)width/scale.x, cast(float)height/scale.y);
if(!position.isFinite) position = vec2(0);
if(!scale.isFinite) scale = vec2(1);
if(!realSize.isFinite) return mat4.identity;

return
mat4.orthographic(0f, realSize.x, realSize.y, 0, 0, ushort.max) *
Expand Down
1 change: 1 addition & 0 deletions source/inochi2d/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public import inochi2d.math;
public import inochi2d.phys;
public import inochi2d.fmt;
public import inochi2d.core;
public import inochi2d.ver;

private double currentTime_ = 0;
private double lastTime_ = 0;
Expand Down
9 changes: 9 additions & 0 deletions source/inochi2d/ver.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// AUTOGENERATED BY GITVER, DO NOT MODIFY
module inochi2d.ver;

/**
Inochi2D Version, autogenerated with gitver
*/
enum IN_VERSION = "commit+587d095";

// trans rights

0 comments on commit 9d81fbf

Please sign in to comment.