aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/Jin.exebin510464 -> 2263040 bytes
-rw-r--r--bin/SDL2.dllbin996352 -> 1242112 bytes
-rw-r--r--bin/font.pngbin2780 -> 0 bytes
-rw-r--r--bin/font.shader26
-rw-r--r--bin/font2.pngbin2758 -> 0 bytes
-rw-r--r--bin/game/0.pngbin0 -> 563072 bytes
-rw-r--r--bin/game/1.pngbin0 -> 73228 bytes
-rw-r--r--bin/game/SDL.jpgbin0 -> 6481 bytes
-rw-r--r--bin/game/config.lua5
-rw-r--r--bin/game/forest.oggbin0 -> 789109 bytes
-rw-r--r--bin/game/icon.icobin0 -> 85182 bytes
-rw-r--r--bin/game/main.lua102
-rw-r--r--bin/game/splash.pngbin0 -> 392 bytes
-rw-r--r--bin/img2.bmpbin12342 -> 0 bytes
-rw-r--r--bin/intro.oggbin1221422 -> 0 bytes
-rw-r--r--bin/intro_logo.wavbin685750 -> 0 bytes
-rw-r--r--bin/jin.exebin510464 -> 2263040 bytes
-rw-r--r--bin/lua51.dllbin364544 -> 0 bytes
-rw-r--r--bin/main.lua121
-rw-r--r--bin/music.oggbin2121836 -> 0 bytes
-rw-r--r--bin/text.txt1
21 files changed, 107 insertions, 148 deletions
diff --git a/bin/Jin.exe b/bin/Jin.exe
index 1c7f23f..8251ee4 100644
--- a/bin/Jin.exe
+++ b/bin/Jin.exe
Binary files differ
diff --git a/bin/SDL2.dll b/bin/SDL2.dll
index c21f747..3aaf046 100644
--- a/bin/SDL2.dll
+++ b/bin/SDL2.dll
Binary files differ
diff --git a/bin/font.png b/bin/font.png
deleted file mode 100644
index 151b992..0000000
--- a/bin/font.png
+++ /dev/null
Binary files differ
diff --git a/bin/font.shader b/bin/font.shader
deleted file mode 100644
index 7b714db..0000000
--- a/bin/font.shader
+++ /dev/null
@@ -1,26 +0,0 @@
-#VERTEX_SHADER
-
-Vertex vert(Vertex v)
-{
- return v;
-}
-
-#END_VERTEX_SHADER
-
-#FRAGMENT_SHADER
-
-uniform float dt;
-
-Color frag(Color col, Texture tex, Vertex v)
-{
- Color c = texel(tex, v.uv);
- c.r *= sin(dt);
- c.g *= sin(dt / 3);
- c.a *= sin(dt / 2);
- return c;
-}
-//1.21 1.34
-
- asdas
-//stbi_write_png
-#END_FRAGMENT_SHADER \ No newline at end of file
diff --git a/bin/font2.png b/bin/font2.png
deleted file mode 100644
index 6083ab6..0000000
--- a/bin/font2.png
+++ /dev/null
Binary files differ
diff --git a/bin/game/0.png b/bin/game/0.png
new file mode 100644
index 0000000..fa62576
--- /dev/null
+++ b/bin/game/0.png
Binary files differ
diff --git a/bin/game/1.png b/bin/game/1.png
new file mode 100644
index 0000000..7e3fe49
--- /dev/null
+++ b/bin/game/1.png
Binary files differ
diff --git a/bin/game/SDL.jpg b/bin/game/SDL.jpg
new file mode 100644
index 0000000..dcd530a
--- /dev/null
+++ b/bin/game/SDL.jpg
Binary files differ
diff --git a/bin/game/config.lua b/bin/game/config.lua
new file mode 100644
index 0000000..380dd1b
--- /dev/null
+++ b/bin/game/config.lua
@@ -0,0 +1,5 @@
+return
+{
+ title = "window form",
+ icon = "splash.png",
+} \ No newline at end of file
diff --git a/bin/game/forest.ogg b/bin/game/forest.ogg
new file mode 100644
index 0000000..d3059e1
--- /dev/null
+++ b/bin/game/forest.ogg
Binary files differ
diff --git a/bin/game/icon.ico b/bin/game/icon.ico
new file mode 100644
index 0000000..3043332
--- /dev/null
+++ b/bin/game/icon.ico
Binary files differ
diff --git a/bin/game/main.lua b/bin/game/main.lua
new file mode 100644
index 0000000..ce22f46
--- /dev/null
+++ b/bin/game/main.lua
@@ -0,0 +1,102 @@
+io.stdout:setvbuf("no")
+local shader = [[
+#VERTEX_SHADER
+Vertex vert(Vertex v)
+{
+ return v;
+}
+#END_VERTEX_SHADER
+#FRAGMENT_SHADER
+Color frag(Color col, Texture tex, Vertex v)
+{
+ return col;
+}
+#END_FRAGMENT_SHADER
+]]
+
+local shader2 = [[
+#VERTEX_SHADER
+Vertex vert(Vertex v)
+{
+ return v;
+}
+#END_VERTEX_SHADER
+#FRAGMENT_SHADER
+Color frag(Color col, Texture tex, Vertex v)
+{
+ Color c = texel(tex, v.uv);
+ return c;
+}
+#END_FRAGMENT_SHADER
+]]
+music = nil
+local tex = nil
+local shader_program = nil
+local shader_program2 = nil
+local timer = nil
+local tb = {x = 1, y = 2}
+local t = 0
+local spr = nil
+local bitmap = nil
+function jin.core.onLoad()
+ bitmap = jin.graphics.newBitmap(128, 128, function(w, h, x, y)
+ return {255*math.sin(x/w),255 - 255*math.cos(y/w),0,255}
+ end)
+ shader_program = jin.graphics.newShader(shader)
+ shader_program2 = jin.graphics.newShader(shader2)
+ --tex = jin.graphics.newTexture("1.png")
+ tex = jin.graphics.newTexture(bitmap)
+ local ssheet = jin.graphics.newSpriteSheet(tex)
+ spr = ssheet:newSprite(50, 50, 50, 50)
+ spr:setPosition(0, 50)
+ spr:setShader(shader_program2)
+ tex = nil
+ spr:setScale(2, 2)
+ spr:setColor(100, 0, 100, 255)
+ spr:setOrigin(jin.graphics.SpriteOrigin.BOTTOMCENTER)
+ -- music = jin.audio.newSource("forest.ogg")
+ -- music:setVolume(0.5)
+ -- music:setLoop(true)
+ --music:play()
+ jin.graphics.clear()
+ jin.graphics.showWindow()
+ timer = jin.time.newTimer()
+ local h = timer:every(0.5, function(sp)
+ local x, y = spr:getPosition()
+ spr:move(5, 0)
+ end, spr)
+ timer:after(3, function(p)
+ --timer:cancel(h)
+ end, h)
+ jin.graphics.pushMatrix()
+ --jin.graphics.translate(100, 0)
+ jin.graphics.rotate(0.2)
+end
+local stop = false
+
+function jin.core.onEvent(e)
+ if e.type == "Quit" then
+ jin.core.stop()
+ end
+end
+
+function jin.core.onUpdate()
+ tb.x = t
+ t = t + jin.time.getDelta()
+end
+
+function jin.core.onDraw()
+ timer:update(jin.time.getDelta())
+ jin.graphics.useShader(shader_program)
+ jin.graphics.setColor(255, 0, 255, 255)
+ jin.graphics.rect(jin.graphics.RenderMode.FILL, 30, 50, 100, 200)
+ jin.graphics.setColor(255, 255, 255, 255)
+ jin.graphics.unuseShader()
+ spr:render()
+ --jin.graphics.useShader(shader_program2)
+ --jin.graphics.draw(tex, 0, 0,0.2, 0.2)
+ --jin.graphics.unuseShader()
+ if stop then
+ jin.graphics.print("Quit", 100, 300)
+ end
+end \ No newline at end of file
diff --git a/bin/game/splash.png b/bin/game/splash.png
new file mode 100644
index 0000000..b0c4256
--- /dev/null
+++ b/bin/game/splash.png
Binary files differ
diff --git a/bin/img2.bmp b/bin/img2.bmp
deleted file mode 100644
index dc9cf95..0000000
--- a/bin/img2.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/intro.ogg b/bin/intro.ogg
deleted file mode 100644
index 9ba4905..0000000
--- a/bin/intro.ogg
+++ /dev/null
Binary files differ
diff --git a/bin/intro_logo.wav b/bin/intro_logo.wav
deleted file mode 100644
index 828c423..0000000
--- a/bin/intro_logo.wav
+++ /dev/null
Binary files differ
diff --git a/bin/jin.exe b/bin/jin.exe
index 1c7f23f..8251ee4 100644
--- a/bin/jin.exe
+++ b/bin/jin.exe
Binary files differ
diff --git a/bin/lua51.dll b/bin/lua51.dll
deleted file mode 100644
index dd93ee2..0000000
--- a/bin/lua51.dll
+++ /dev/null
Binary files differ
diff --git a/bin/main.lua b/bin/main.lua
deleted file mode 100644
index af78076..0000000
--- a/bin/main.lua
+++ /dev/null
@@ -1,121 +0,0 @@
-io.stdout:setvbuf("no")
-
-local shader
-local text
-local page
-local tf
-local sprites
-local ttf
-function jin.core.onLoad()
- shader = jin.graphics.newShaderf("font.shader")
- -- local bitmap = jin.graphics.newBitmap("defaultfont.png")
- -- local tfdata = jin.graphics.newTTFData("font.ttf")
- -- tf = tfdata:newTTF(13)
- -- page = tf:typeset("this is a test")
- jin.graphics.setClearColor(100, 100, 100, 255)
- sprites = jin.graphics.newTexture("sprites.png")
- -- local ttfdata = jin.graphics.newTTFData("font_pixel.ttf")
- -- ttf = ttfdata:newTTF(22);
- local bitmap = jin.graphics.newBitmap("font2.png")
- tf = jin.graphics.newTextureFont(bitmap, [[<=>?.'^@abcdefghijklmnopqrstuvwxyz|~[\]_]], {255, 0, 0, 255}, 16)
-end
-local value = 0
-function jin.core.onEvent(e)
- if e.type == "Quit" then
- jin.core.stop()
- end
- if e.type == "KeyDown" then
- if e.key == "Up" then
- value = value + 0.01
- end
- if e.key == "Down" then
- value = value - 0.01
- end
- end
-end
-local t = 0
-local fps = 0
-local f = 0
-function jin.core.onUpdate(dt)
- t = t + dt
- f = f + 1
- if t > 1 then
- fps = f
- f = 0
- t = t - 1
- end
-end
-
-function run()
- ---#if editor
-
- ---#endif
-end
-
-function jin.core.onDraw()
- jin.graphics.setColor(255, 255, 255)
- --jin.graphics.draw(sprites, 10, 10, 1, 1)
- -- jin.graphics.setFont(tf)
- jin.graphics.useShader(shader)
- shader:sendNumber("dt", t)
- jin.graphics.print(value)
- jin.graphics.print([[
-#VERTEX_SHADER
-
-Vertex vert(Vertex v)
-{
- return v;
-}
-
-#END_VERTEX_SHADER
-
-#FRAGMENT_SHADER
-
-uniform float dt;
-
-Color frag(Color col, Texture tex, Vertex v)
-{
- Color c = texel(tex, v.uv);
- if(c.a < 0.9f)
- {
- c.a /= 1.34;
- }
- return c;
-}
-//1.21 1.34
-
-//stbi_write_png
-#END_FRAGMENT_SHADER
-
- ]], 0, 20)
- jin.graphics.unuseShader()
- jin.graphics.print([[
-#VERTEX_SHADER
-
-Vertex vert(Vertex v)
-{
- return v;
-}
-
-#END_VERTEX_SHADER
-
-#FRAGMENT_SHADER
-
-uniform float dt;
-
-Color frag(Color col, Texture tex, Vertex v)
-{
- Color c = texel(tex, v.uv);
- if(c.a < 0.9f)
- {
- c.a /= 1.34;
- }
- return c;
-}
-//1.21 1.34
-
-//stbi_write_png
-#END_FRAGMENT_SHADER
-
- ]], 300, 20)
-end
diff --git a/bin/music.ogg b/bin/music.ogg
deleted file mode 100644
index 9d44af6..0000000
--- a/bin/music.ogg
+++ /dev/null
Binary files differ
diff --git a/bin/text.txt b/bin/text.txt
deleted file mode 100644
index 33c6055..0000000
--- a/bin/text.txt
+++ /dev/null
@@ -1 +0,0 @@
-开始 \ No newline at end of file