aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/Jin.exebin552960 -> 552960 bytes
-rw-r--r--bin/jin.exebin552960 -> 552960 bytes
-rw-r--r--src/libjin/Graphics/Canvas.cpp16
-rw-r--r--src/libjin/Graphics/Drawable.cpp10
-rw-r--r--src/libjin/Input/Event.h10
-rw-r--r--src/libjin/input/event.h10
-rw-r--r--src/lua/modules/event/event.cpp5
7 files changed, 27 insertions, 24 deletions
diff --git a/bin/Jin.exe b/bin/Jin.exe
index 2d27938..5690063 100644
--- a/bin/Jin.exe
+++ b/bin/Jin.exe
Binary files differ
diff --git a/bin/jin.exe b/bin/jin.exe
index 2d27938..5690063 100644
--- a/bin/jin.exe
+++ b/bin/jin.exe
Binary files differ
diff --git a/src/libjin/Graphics/Canvas.cpp b/src/libjin/Graphics/Canvas.cpp
index 1d1a347..4def58d 100644
--- a/src/libjin/Graphics/Canvas.cpp
+++ b/src/libjin/Graphics/Canvas.cpp
@@ -33,11 +33,11 @@ namespace graphics
GLint current_fbo;
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &current_fbo);
- // generate a new render buffer object
+ /* generate a new render buffer object */
glGenFramebuffers(1, &fbo);
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
- // generate texture save target
+ /* generate texture save target */
glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
@@ -48,7 +48,7 @@ namespace graphics
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- // unbind framebuffer
+ /* unbind framebuffer */
glBindFramebuffer(GL_FRAMEBUFFER, current_fbo);
}
@@ -79,7 +79,7 @@ namespace graphics
glViewport(0, 0, size.w, size.h);
glOrtho(0, size.w, size.h, 0, -1, 1);
- // Switch back to modelview matrix
+ /* Switch back to modelview matrix */
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
@@ -101,15 +101,15 @@ namespace graphics
glViewport(0, 0, ww, wh);
- // load back to normal
+ /* load back to normal */
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
- // set viewport matrix
+ /* set viewport matrix */
glOrtho(0, ww, wh, 0, -1, 1);
- // switch to model matrix
+ /* switch to model matrix */
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
@@ -118,4 +118,4 @@ namespace graphics
} // render
} // jin
-#endif // LIBJIN_MODULES_RENDER
+#endif // LIBJIN_MODULES_RENDER \ No newline at end of file
diff --git a/src/libjin/Graphics/Drawable.cpp b/src/libjin/Graphics/Drawable.cpp
index acdb6e1..dc1c8dd 100644
--- a/src/libjin/Graphics/Drawable.cpp
+++ b/src/libjin/Graphics/Drawable.cpp
@@ -30,7 +30,7 @@ namespace graphics
void Drawable::draw(int x, int y, float sx, float sy, float r)
{
- // Must set textCoord and vertCoord before renderring
+ /* Must set textCoord and vertCoord before renderring */
if (! textCoord||! vertCoord) return;
static jin::math::Matrix t;
@@ -38,7 +38,7 @@ namespace graphics
glBindTexture(GL_TEXTURE_2D, texture);
- // push modle matrix
+ /* push modle matrix */
glPushMatrix();
glMultMatrixf((const GLfloat*)t.getElements());
@@ -50,14 +50,14 @@ namespace graphics
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
- // pop the model matrix
+ /* pop the model matrix */
glPopMatrix();
- // bind texture to default screen
+ /* bind texture to default screen */
glBindTexture(GL_TEXTURE_2D, 0);
}
} // render
} // jin
-#endif // LIBJIN_MODULES_RENDER
+#endif // LIBJIN_MODULES_RENDER \ No newline at end of file
diff --git a/src/libjin/Input/Event.h b/src/libjin/Input/Event.h
index 713b393..831c204 100644
--- a/src/libjin/Input/Event.h
+++ b/src/libjin/Input/Event.h
@@ -58,11 +58,11 @@ namespace input
{
switch (button)
{
- case 1: return "left";
- case 2: return "middle";
- case 3: return "right";
- case 4: return "wheelup";
- case 5: return "wheeldown";
+ case 1: return "Left";
+ case 2: return "Middle";
+ case 3: return "Right";
+ case 4: return "WheelUp";
+ case 5: return "WheelDown";
default: return "?";
}
}
diff --git a/src/libjin/input/event.h b/src/libjin/input/event.h
index 713b393..831c204 100644
--- a/src/libjin/input/event.h
+++ b/src/libjin/input/event.h
@@ -58,11 +58,11 @@ namespace input
{
switch (button)
{
- case 1: return "left";
- case 2: return "middle";
- case 3: return "right";
- case 4: return "wheelup";
- case 5: return "wheeldown";
+ case 1: return "Left";
+ case 2: return "Middle";
+ case 3: return "Right";
+ case 4: return "WheelUp";
+ case 5: return "WheelDown";
default: return "?";
}
}
diff --git a/src/lua/modules/event/event.cpp b/src/lua/modules/event/event.cpp
index b79e946..08d52e0 100644
--- a/src/lua/modules/event/event.cpp
+++ b/src/lua/modules/event/event.cpp
@@ -23,7 +23,10 @@ namespace lua
poll:
while (pollEvent(&e))
{
- // each event is a table
+ /**
+ * TODO: ڴСıʱҪtransform
+ *
+ */
luax_newtable(L);
switch (e.type)
{