aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-09-06 20:30:10 +0800
committerchai <chaifix@163.com>2018-09-06 20:30:10 +0800
commit957c073df5fc2c57d531c96cdca11bfafdbae076 (patch)
tree8418852b77d65c5fa9523c48824b0d0d59f985d9
parent50084b0b3451328a4dfe6db65c78a225e9c8f288 (diff)
*update
-rw-r--r--bin/Jin.exebin548864 -> 548864 bytes
-rw-r--r--bin/jin.exebin548864 -> 548864 bytes
-rw-r--r--src/libjin/Graphics/base.shader.h1
-rw-r--r--src/lua/modules/event/event.cpp26
4 files changed, 14 insertions, 13 deletions
diff --git a/bin/Jin.exe b/bin/Jin.exe
index e564a41..1e3ea92 100644
--- a/bin/Jin.exe
+++ b/bin/Jin.exe
Binary files differ
diff --git a/bin/jin.exe b/bin/jin.exe
index e564a41..1e3ea92 100644
--- a/bin/jin.exe
+++ b/bin/jin.exe
Binary files differ
diff --git a/src/libjin/Graphics/base.shader.h b/src/libjin/Graphics/base.shader.h
index 577a5f0..109d791 100644
--- a/src/libjin/Graphics/base.shader.h
+++ b/src/libjin/Graphics/base.shader.h
@@ -12,6 +12,7 @@ static const char* base_shader = R"(
#define Vec3 vec3
#define Vec4 vec4
#define Number number
+#define Image Texture
extern Texture %s;
%s
diff --git a/src/lua/modules/event/event.cpp b/src/lua/modules/event/event.cpp
index af9f8fc..b79e946 100644
--- a/src/lua/modules/event/event.cpp
+++ b/src/lua/modules/event/event.cpp
@@ -28,53 +28,53 @@ namespace lua
switch (e.type)
{
case EventType::QUIT:
- luax_setfield_string(L, "type", "quit");
+ luax_setfield_string(L, "type", "Quit");
break;
case EventType::KEY_DOWN:
- luax_setfield_string(L, "type", "keydown");
+ luax_setfield_string(L, "type", "KeyDown");
luax_setfield_string(L, "key", getKeyName(e.key.keysym.sym));
break;
case EventType::KEY_UP:
- luax_setfield_string(L, "type", "keyup");
+ luax_setfield_string(L, "type", "KeyUp");
luax_setfield_string(L, "key", getKeyName(e.key.keysym.sym));
break;
case EventType::MOUSE_MOTION:
- luax_setfield_string(L, "type", "mousemotion");
+ luax_setfield_string(L, "type", "MouseMotion");
luax_setfield_number(L, "x", e.motion.x);
luax_setfield_number(L, "y", e.motion.y);
break;
case EventType::MOUSE_BUTTON_DOWN:
- luax_setfield_string(L, "type", "mousebuttondown");
+ luax_setfield_string(L, "type", "MouseButtonDown");
luax_setfield_string(L, "button", getButtonName(e.button.button));
luax_setfield_number(L, "x", e.button.x);
luax_setfield_number(L, "y", e.button.y);
break;
case EventType::MOUSE_BUTTON_UP:
- luax_setfield_string(L, "type", "mousebuttonup");
+ luax_setfield_string(L, "type", "MouseButtonUp");
luax_setfield_string(L, "button", getButtonName(e.button.button));
luax_setfield_number(L, "x", e.button.x);
luax_setfield_number(L, "y", e.button.y);
break;
case EventType::MOUSE_WHEEL:
- luax_setfield_string(L, "type", "wheel");
+ luax_setfield_string(L, "type", "Wheel");
if(e.wheel.x == -1)
- luax_setfield_string(L, "x", "left");
+ luax_setfield_string(L, "x", "Left");
else if(e.wheel.x == 1)
- luax_setfield_string(L, "x", "right");
+ luax_setfield_string(L, "x", "Right");
else
- luax_setfield_string(L, "x", "none");
+ luax_setfield_string(L, "x", "None");
if (e.wheel.y == -1)
- luax_setfield_string(L, "y", "near");
+ luax_setfield_string(L, "y", "Near");
else if (e.wheel.y == 1)
- luax_setfield_string(L, "y", "far");
+ luax_setfield_string(L, "y", "Far");
else
- luax_setfield_string(L, "y", "none");
+ luax_setfield_string(L, "y", "None");
break;
default: