Giter Site home page Giter Site logo

ejoy2d's People

Contributors

actboy168 avatar cabriter avatar cdj3579 avatar cloudwu avatar grissiom avatar hqwrong avatar huiliu avatar keyring avatar lusin2 avatar lvzixun avatar rainfiel avatar robinxb avatar sarabear avatar scus avatar tiancaiamao avatar tsiannian avatar venus-solar avatar xebecnan avatar xjdrew avatar ywxzm avatar zhomgwu avatar zhoukk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ejoy2d's Issues

双屏显示器的问题

我是双显示器,在WIN7(64位) 执行实例1,例子一下占了2个屏,黑乎乎一片,刷新下桌面才恢复。

一个相对游戏开发来讲较弱的需求

希望能够在shader中提供一些绘制点、线、多边形、圆形等接口,虽然这些功能对于游戏来说很少用到,不过既然是一套图形引擎,那提供这些方法应该也是合理的,另外这些接口对于应用开发来说很重要。

linux下运行黑屏,没看到图片

环境:deepinlinux
编译报错:
gcc -g -Wall -Ilib -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -o ej2d lib/shader.c lib/lshader.c lib/ejoy2dgame.c lib/fault.c lib/screen.c lib/texture.c lib/ppm.c lib/spritepack.c lib/sprite.c lib/lsprite.c lib/matrix.c lib/lmatrix.c lib/dfont.c lib/label.c lib/particle.c linux/window.c linux/winfw.c linux/winfont.c -lGLEW -lGL -lX11 -lfreetype -llua -lm -lrt
/usr/bin/ld: /usr/local/lib/liblua.a(loadlib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libdl.so.2 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libdl.so.2: could not read symbols: 无效的操作
collect2: 错误: ld 返回 1
make: *** [ej2d] 错误 1
然后从网上找到解决办法:添加-ldl.
gcc -g -Wall -Ilib -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -o ej2d lib/shader.c lib/lshader.c lib/ejoy2dgame.c lib/fault.c lib/screen.c lib/texture.c lib/ppm.c lib/spritepack.c lib/sprite.c lib/lsprite.c lib/matrix.c lib/lmatrix.c lib/dfont.c lib/label.c lib/particle.c linux/window.c linux/winfw.c linux/winfont.c -lGLEW -lGL -lX11 -lfreetype -llua -lm -ldl
编译成功,但是运行黑色的。。。
ctrl+C关闭后,报错。
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 1109 requests (1109 known processed) with 0 events remaining.

label怎么支持字体背景色

我希望显示字体的时候加上背景色,现有的代码似乎是不支持的,想到的办法,是创建一个空的sprite,把label作为子节点,能包含的应该只有ani类型,貌似不合适的,有什么办法吗,另外TYPE_PANNEL类型是怎么用的?

Compile error in my ubuntu 14 enviroment.

lib/shader.c: In function ‘shader_init’:
lib/shader.c:23:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

define BUFFER_OFFSET(f) ((int)&(((struct vertex *)NULL)->f))

^
lib/shader.c:102:38: note: in expansion of macro ‘BUFFER_OFFSET’
{ "position", 0, 2, sizeof(float), BUFFER_OFFSET(vp.vx) },

My gcc verion is gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)

linux mint下运行ej2d关闭窗口时XIO报错

错误信息如下:
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 6922 requests (6909 known processed) with 0 events remaining.
看上去不是一个很要紧的问题,我提问的目的是想确定是我的系统问题还是ej2d的问题。谢谢。

Ubuntu 64位,编译成功,运行报错,窗口闪退

控制台输出如下:
compile failed:0:1(1): error: syntax error, unexpected NEW_IDENTIFIER
source:
precision lowp float;
varying vec2 v_texcoord;
varying vec4 v_color;
uniform sampler2D texture0;
uniform vec3 additive;

void main() {
vec4 tmp = texture2D(texture0, v_texcoord);
gl_FragColor.xyz = tmp.xyz * v_color.xyz;
gl_FragColor.w = tmp.w;
gl_FragColor *= v_color.w;
gl_FragColor.xyz += additive.xyz * tmp.w;
}

求助.谢谢.

make出错

链接官方的glew32.dll报格式不匹配
链接自己用vs2012编译的glew32.dll报下面这个错误

F:\Download\ejoy2d-master>make mingw
process_begin: CreateProcess(NULL, uname, ...) failed.
process_begin: CreateProcess(NULL, uname, ...) failed.
process_begin: CreateProcess(NULL, uname, ...) failed.
gcc -g -Wall -Ilib -D EJOY2D_OS=WINDOWS -IF:/Download/glew-1.10.0/include -IF:/D
ownload/lua-5.2.3/src -o ej2d.exe lib/shader.c lib/lshader.c lib/ejoy2dgame.c li
b/fault.c lib/screen.c lib/texture.c lib/ppm.c lib/spritepack.c lib/sprite.c lib
/lsprite.c lib/matrix.c lib/lmatrix.c lib/dfont.c lib/label.c lib/particle.c lib
/lparticle.c lib/scissor.c mingw/window.c mingw/winfw.c mingw/winfont.c -L"C:/Pr
ogram Files (x86)/Windows Kits/8.0/Lib/win8/um/x86" -lgdi32 -LF:/Download/glew-1
.10.0/bin/Release/Win32 -lglew32 -L"C:/Program Files (x86)/Windows Kits/8.0/Lib/
win8/um/x86" -lopengl32 -LF:/Download/lua-5.2.3/src -llua52
C:\Users\ADMINI~1\AppData\Local\Temp\ccqFl6OH.o: In function init_window': F:\Download\ejoy2d-master/mingw/window.c:49: undefined reference to_imp__glewI
nit@0'
collect2.exe: error: ld returned 1 exit status
Makefile:64: recipe for target 'ej2d' failed
make: *** [ej2d] Error 1

mac os 10.9 编译通不过

步骤:

  1. Install XQuartz (http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.5.dmg)
  2. $ brew install lua52 glew freetype
  3. make
    出现以下错误

posix/winfw.c:78:10: warning: unused variable 'buf' [-Wunused-variable]
char buf[BUFSIZE];
^
1 warning generated.
In file included from posix/winfont.c:7:
/usr/X11R6/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found

include <freetype/config/ftheader.h>

1 error generated.

运行闪退

MinGW下运行后闪退 (win7 x64)

$ ej2d.exe examples/ex01.lua
LUA_ERRERR : error in error handling

make不过

确定了glew1.9版本,也确定了lib的位置
make的时候还总报
好郁闷。

J:\Project\ejoy2d/lib/shader.c:58: undefined reference to __glewGenBuffers' J:\Project\ejoy2d/lib/shader.c:59: undefined reference to__glewBindBuffer'
J:\Project\ejoy2d/lib/shader.c:72: undefined reference to __glewBufferData' J:\Project\ejoy2d/lib/shader.c:74: undefined reference to__glewGenBuffers'
J:\Project\ejoy2d/lib/shader.c:75: undefined reference to __glewBindBuffer' c:\Users\xhacker\AppData\Local\Temp\ccabdE7p.o: In functioncompile':
J:\Project\ejoy2d/lib/shader.c:86: undefined reference to __glewCreateShader' J:\Project\ejoy2d/lib/shader.c:87: undefined reference to__glewShaderSource'
J:\Project\ejoy2d/lib/shader.c:88: undefined reference to __glewCompileShader' J:\Project\ejoy2d/lib/shader.c:90: undefined reference to__glewGetShaderiv'
J:\Project\ejoy2d/lib/shader.c:95: undefined reference to __glewGetShaderInfoLog' J:\Project\ejoy2d/lib/shader.c:100: undefined reference to__glewDeleteShader'
c:\Users\xhacker\AppData\Local\Temp\ccabdE7p.o: In function `link':

在我机器上启动ejoy2d.exe必挂!

我这个诡异的问题:启动ejoy2d.exe会挂 一直在我机器上没解决呢
qq20140429135124
运行到这行 必挂 在我机器上 我win7 64位的系统 感觉是和opengl有关

Fedora20 Compiler is OK!!But....

err(1): set your own vector font resource path, error occured in file posix/winfont.c, line 72

 have a look at fterrdef.h

When I try to run ex01.lua,this error happens!!!I hope this problem can be solve soon!!

ubuntu 13.04 make 报错 glew1.10

换了系统,以前的12.04能编过了,但是系统坏了,又开始配置,但是glu.h 找不到,下了一个放在 include 了

/usr/include/GL/glu.h:263:87: error: expected ‘)’ before ‘’ token
/usr/include/GL/glu.h:274:91: error: expected ‘)’ before ‘
’ token
/usr/include/GL/glu.h:283:91: error: expected ‘)’ before ‘*’ token

就是几个函数申明:
263:extern void APIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, GLvoid (CALLBACK CallBackFunc)());
274:extern void APIENTRY gluQuadricCallback (GLUquadric
quad, GLenum which, GLvoid (CALLBACK CallBackFunc)());
283:extern void APIENTRY gluTessCallback (GLUtesselator
tess, GLenum which, GLvoid (CALLBACK *CallBackFunc)());

有碰见过的吗?我不是太看的出来问题在哪里。。

macosx编译有warning

mbp:ejoy2d jintiao$ make
gcc -g -Wall -Ilib -Ilib/render -Ilua -D EJOY2D_OS=MACOSX -I/usr/X11R6/include -I/usr/include -I/opt/X11/include/freetype2 -D MACOSX -o ej2d lib/shader.c lib/lshader.c lib/ejoy2dgame.c lib/fault.c lib/screen.c lib/texture.c lib/ppm.c lib/spritepack.c lib/sprite.c lib/lsprite.c lib/matrix.c lib/lmatrix.c lib/dfont.c lib/label.c lib/particle.c lib/lparticle.c lib/scissor.c lib/renderbuffer.c lib/lrenderbuffer.c lib/lgeometry.c lib/render/render.c lib/render/carray.c lib/render/log.c posix/window.c posix/winfw.c posix/winfont.c lua/lapi.c lua/lauxlib.c lua/lbaselib.c lua/lbitlib.c lua/lcode.c lua/lcorolib.c lua/lctype.c lua/ldblib.c lua/ldebug.c lua/ldo.c lua/ldump.c lua/lfunc.c lua/lgc.c lua/linit.c lua/liolib.c lua/llex.c lua/lmathlib.c lua/lmem.c lua/loadlib.c lua/lobject.c lua/lopcodes.c lua/loslib.c lua/lparser.c lua/lstate.c lua/lstring.c lua/lstrlib.c lua/ltable.c lua/ltablib.c lua/ltm.c lua/lundump.c lua/lutf8lib.c lua/lvm.c lua/lzio.c -L/usr/X11R6/lib -lGLEW -lGL -lX11 -lfreetype -lm -ldl
lib/lgeometry.c:55:6: warning: using integer absolute value function 'abs' when
argument is of floating point type [-Wabsolute-value]
if (abs(x1-x2) > abs(y1-y2)) {
^
lib/lgeometry.c:55:6: note: use function 'fabsf' instead
if (abs(x1-x2) > abs(y1-y2)) {
^~~
fabsf
lib/lgeometry.c:55:19: warning: using integer absolute value function 'abs' when
argument is of floating point type [-Wabsolute-value]
if (abs(x1-x2) > abs(y1-y2)) {
^
lib/lgeometry.c:55:19: note: use function 'fabsf' instead
if (abs(x1-x2) > abs(y1-y2)) {
^~~
fabsf
2 warnings generated.
lib/render/render.c:947:14: warning: comparison of constant 2 with expression of type
'enum DRAW_MODE' is always true [-Wtautological-constant-out-of-range-compare]
assert(mode < sizeof(draw_mode)/sizeof(int));
~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func
, FILE, LINE, #e...
^
1 warning generated.
mbp:ejoy2d jintiao$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix

在Mac OS X下运行examples/ex01.lua失败

我用命令./ej2d examples/ex01.lua运行,会失败
失败时显示cannot find glyph 10

调试进去,ex01.lua有行脚本为
obj2.label.text = string.format("AABB\n%d x %d", x2-x1, y2-y1)

这行脚本需要绘画字符串,绘画时候会调用label.c文件的label_draw函数,最终会调用winfont.c文件下的font_size函数,当字符为\n,也就是unicode为10的时候,
FT_Get_Char_Index返回0,之后,就打印出错误信息然后退出了。

2.5D sprite遮挡问题

在考虑2.5d情况下,场景中多个层级(地下,地面,空中)间的的单位以及同层级间的单位遮挡问题,如果引入layer概念感觉有些麻烦,只用sprite的y坐标做比较貌似不能解决多层级概念,这里是否有必要为sprite加入z_position呢?或者有其他的什么办法。

本人新手,问题比较小白一点,还望见谅

vc下编译ejoy2d

不知道有没有人像我这样平时工作用vs,但不怎么用mingw,下面是在vs下编译ejoy2d的方法,有需要的可以看看:

前面的步骤就不说了,建工程(console程序),导入代码,下载必要的库文件,设置include路径之类的。下面的部分是解决编译连接的一些问题。

  1. ejoy2d用了gcc的语法扩展,在vs下要用c++方式编译,在属性高级-编译为,选c++。
  2. 但这样还编不了,需要把用到的扩展语法部分改成vs可识别的,比如动态数组,vs在c++编译也不支持。
  3. 以上两步就可以编译成功,但是还不能链接,需要把lua相关的头文件引入修改为extern “C",如下:
    extern "C"
    {

include <lua.h>

include <lauxlib.h>

include <lualib.h>

};

PS:ejoy2d.exe执行要在代码根目录,因为运行需要加载ejoy2d目录下的脚本

trying to running it!

正在搭环境...

对于我这种基本写什么项目都在windows上用c++ & vs的人来说...面对云老板的这种linux正统范儿的项目,搭环境是一件困难的事,不过还是要搭~毕竟是云老板的2d engine呀.

对于上层开发人员,lua真的能像c++那样得心应手吗?

Mac OS X 下编译时不支持通过 Homebrew 安装的 freetype2

gcc -g -Wall -Ilib -D EJOY2D_OS=MACOSX -I/usr/X11R6/include -I/usr/include -I/usr/local/include -I/usr/local/Cellar/freetype/2.5.2/include/freetype2 -D __MACOSX -o ej2d lib/shader.c lib/lshader.c lib/ejoy2dgame.c lib/fault.c lib/screen.c lib/texture.c lib/ppm.c lib/spritepack.c lib/sprite.c lib/lsprite.c lib/matrix.c lib/lmatrix.c lib/dfont.c lib/label.c lib/particle.c lib/lparticle.c lib/scissor.c posix/window.c posix/winfw.c posix/winfont.c -L/usr/X11R6/lib  -lGLEW -lGL -lX11 -lfreetype -llua -lm -Wl,-E -ldl
In file included from posix/winfont.c:7:
/usr/X11R6/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found
#include <freetype/config/ftheader.h>
         ^
1 error generated.
make: *** [ej2d] Error 1

需要添加一个软链接: ln -s /usr/local/include/freetype2 /usr/local/include/freetype

ej2d.exe error

C:\ejoy2d>ej2d.exe examples/ex01.lua
[string "local path, script = ......"]:4: attempt to concatenate local 'path' (
nil value)
stack traceback:
[string "local path, script = ......"]:4: in main chunk

window 7 64

thanks

windows下基于timer的刷新不可靠

UpdateWindow之后是不是应该用如下代码刷新:
MSG msg;
while (1)
{
if (! PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
ejoy2d_win_update();
InvalidateRect(wnd, NULL , FALSE);
if (WM_QUIT == msg.message)
{
break;
}
continue;
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}

在我的机器上(Win7, Intel i3)上动画不能正常播放。

在ubuntu下make编译,发现一个bug

系统环境: ubuntu13.10

在编译的时候,报错
/usr/bin/ld: /usr/local/lib/liblua.a(loadlib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line

然后,在makefile中加入了 -ldl 这句话,就好使了。
似乎只是一个未链接库的问题。

Ubuntu 14.04编译异常

发现一个问题,链接时有几个函数找不到:
/tmp/ccGBYpaA.o:在函数‘os_tmpname’中:
/home/sxf/data/workspace/Game/ejoy2d/lua/loslib.c:140: 警告: the use of tmpnam' is dangerous, better usemkstemp'
/tmp/ccfHosBu.o:在函数‘render_buffer_update’中:
/home/sxf/data/workspace/Game/ejoy2d/lib/render/render.c:175:对‘glBindVertexArrayOES’未定义的引用
/tmp/ccfHosBu.o:在函数‘render_shader_create’中:
/home/sxf/data/workspace/Game/ejoy2d/lib/render/render.c:329:对‘glGenVertexArraysOES’未定义的引用
/tmp/ccfHosBu.o:在函数‘close_shader’中:
/home/sxf/data/workspace/Game/ejoy2d/lib/render/render.c:346:对‘glDeleteVertexArraysOES’未定义的引用
/tmp/ccfHosBu.o:在函数‘apply_va’中:
/home/sxf/data/workspace/Game/ejoy2d/lib/render/render.c:549:对‘glBindVertexArrayOES’未定义的引用

好像跟OpenGL 1和2的不同实现有关, 我找到了许多类似错误的修正提示但依旧没有效果, 希望能获得帮助,谢谢!

ex01.lua执行失败

提示如下
...WE Workspaes\Github\ejoy2d\msvc..\ejoy2d\spritepack.lua:291: Invalid stream(19): frame part need an id
stack traceback:
[C]: in function 'import'
...WE Workspaes\Github\ejoy2d\msvc..\ejoy2d\spritepack.lua:291: in function 'init'
...Workspaes\Github\ejoy2d\msvc..\ejoy2d\simplepackage.lua:46: in function 'preload'
...Workspaes\Github\ejoy2d\msvc..\ejoy2d\simplepackage.lua:81: in function 'load'
examples/ex01.lua:5: in function 'f'
[string "local path, script = ......"]:7: in main chunk

如果去掉 4861aaf,就正常了

windows下编译一些问题

环境什么的都配置好了,出现下面错误呢
enjoy/lib/shader.c :60:undefined reference to '_imp____glewGenBuffer'
enjoy/lib/shader.c :61:undefined reference to '_imp____glewBindBuffer'
enjoy/lib/shader.c :76:undefined reference to '_imp____glewGenBuffer'
......
求助一下哈~

centos make不成功

gcc -g -Wall -Ilib -D EJOY2D_OS=LINUX -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -o ej2d lib/shader.c lib/lshader.c lib/ejoy2dgame.c lib/fault.c lib/screen.c lib/texture.c lib/ppm.c lib/spritepack.c lib/sprite.c lib/lsprite.c lib/matrix.c lib/lmatrix.c lib/dfont.c lib/label.c lib/particle.c lib/lparticle.c lib/scissor.c posix/window.c posix/winfw.c posix/winfont.c -lGLEW -lGL -lX11 -lfreetype -llua -lm -Wl,-E
/tmp/ccTymNxz.o: In function ldraw': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:41: undefined reference tolua_tounsignedx'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:43: undefined reference to luaL_optunsigned' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:46: undefined reference tolua_rawlen'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:58: undefined reference to lua_tonumberx' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:59: undefined reference tolua_tonumberx'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:60: undefined reference to lua_tonumberx' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:61: undefined reference tolua_tonumberx'
/tmp/ccTymNxz.o: In function ejoy2d_shader': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:106: undefined reference toluaL_setfuncs'
/tmp/cc7FJCRH.o: In function ejoy2d_framework': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:72: undefined reference toluaL_setfuncs'
/tmp/cc7FJCRH.o: In function checkluaversion': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:78: undefined reference tolua_version'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:79: undefined reference to lua_version' /tmp/cc7FJCRH.o: In functionejoy2d_game':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:97: undefined reference to lua_setglobal' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:104: undefined reference toluaL_requiref'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:105: undefined reference to luaL_requiref' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:106: undefined reference toluaL_requiref'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:107: undefined reference to luaL_requiref' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:108: undefined reference toluaL_requiref'
/tmp/cc7FJCRH.o:/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:109: more undefined references to luaL_requiref' follow /tmp/cc7FJCRH.o: In functiontraceback':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:138: undefined reference to luaL_traceback' /tmp/cc7FJCRH.o: In functionejoy2d_game_start':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:150: undefined reference to lua_callk' /tmp/cc7FJCRH.o: In functioncall':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:159: undefined reference to lua_pcallk' /tmp/ccgVdHtg.o: In functionsave_rgb':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:372: undefined reference to lua_tointegerx' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:373: undefined reference tolua_tointegerx'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:390: undefined reference to lua_tointegerx' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:391: undefined reference tolua_tointegerx'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:392: undefined reference to lua_tointegerx' /tmp/ccgVdHtg.o:/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:408: more undefined references tolua_tointegerx' follow
/tmp/ccgVdHtg.o: In function saveppm': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:443: undefined reference tolua_rawlen'
/tmp/ccgVdHtg.o: In function ejoy2d_ppm': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:470: undefined reference toluaL_setfuncs'
/tmp/cczIpTHp.o: In function limport': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/spritepack.c:311: undefined reference tolua_rawlen'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/spritepack.c:335: undefined reference to lua_tointegerx' /tmp/cczIpTHp.o: In functionlpackcolor':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/spritepack.c:392: undefined reference to luaL_checkunsigned' /tmp/cczIpTHp.o: In functionejoy2d_spritepack':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/spritepack.c:598: undefined reference to luaL_setfuncs' /tmp/cczxPY6I.o: In functionlnewlabel':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:56: undefined reference to luaL_optunsigned' /tmp/cczxPY6I.o: In functionnewsprite':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:125: undefined reference to lua_setuservalue' /tmp/cczxPY6I.o: In functionlsettext':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:304: undefined reference to lua_setuservalue' /tmp/cczxPY6I.o: In functionlgettext':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:315: undefined reference to lua_getuservalue' /tmp/cczxPY6I.o: In functionlgetcolor':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:322: undefined reference to lua_pushunsigned' /tmp/cczxPY6I.o: In functionlsetcolor':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:329: undefined reference to luaL_checkunsigned' /tmp/cczxPY6I.o: In functionlgetadditive':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:337: undefined reference to lua_pushunsigned' /tmp/cczxPY6I.o: In functionlsetadditive':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:344: undefined reference to luaL_checkunsigned' /tmp/cczxPY6I.o: In functionlgetter':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:363: undefined reference to luaL_setfuncs' /tmp/cczxPY6I.o: In functionlsetter':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:381: undefined reference to luaL_setfuncs' /tmp/cczxPY6I.o: In functionlfetch':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:391: undefined reference to lua_getuservalue' /tmp/cczxPY6I.o: In functionlmount':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:405: undefined reference to lua_getuservalue' /tmp/cczxPY6I.o: In functionlmulti_draw':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:474: undefined reference to lua_rawlen' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:487: undefined reference tolua_tounsignedx'
/tmp/cczxPY6I.o: In function lookup': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:502: undefined reference tolua_getuservalue'
/tmp/cczxPY6I.o: In function lmethod': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:649: undefined reference toluaL_setfuncs'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:664: undefined reference to luaL_setfuncs' /tmp/cczxPY6I.o: In functionejoy2d_sprite':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:674: undefined reference to luaL_setfuncs' /tmp/cc7Bib02.o: In functionlnew':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lmatrix.c:12: undefined reference to lua_rawlen' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lmatrix.c:16: undefined reference tolua_tointegerx'
/tmp/cc7Bib02.o: In function ejoy2d_matrix': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lmatrix.c:145: undefined reference toluaL_setfuncs'
/tmp/ccZgeI3I.o: In function dict_float': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lparticle.c:12: undefined reference tolua_tonumberx'
/tmp/ccZgeI3I.o: In function dict_int': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lparticle.c:20: undefined reference tolua_tointegerx'
/tmp/ccZgeI3I.o: In function ldata': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lparticle.c:179: undefined reference tolua_pushunsigned'
/tmp/ccZgeI3I.o: In function ejoy2d_particle': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lparticle.c:197: undefined reference toluaL_setfuncs'
/tmp/cc8IUseh.o: In function traceback': /home/aispeech/test/c_lua/ejoy2d/trunk/posix/winfw.c:43: undefined reference toluaL_traceback'
/tmp/cc8IUseh.o: In function ejoy2d_win_init': /home/aispeech/test/c_lua/ejoy2d/trunk/posix/winfw.c:95: undefined reference tolua_pcallk'
collect2: ld returned 1 exit status
make: *** [ej2d] Error 1

lua安装的是5.2.3版本,其他依赖组建也已安装。

ejoy2d中如何实现树状结构?

类似Unity和cocos2dx中,对一个节点做变换,子节点也会跟着变,这样做UI和tween动画比较方便。
资源文件中animation是写死的,如果想在程序中动态生成应该怎么做呢,能否提供一些实现思路,谢谢。

能否支持c++编译器

主要需要进行两点修改
1.不使用void_的隐式转换
例如char_ p = malloc(xxx);改为char* p = (char*)malloc(xxx);
2.不使用new作为标识符(因为它是c++的关键字)

在Mac OS X 下使用Makefile编译不过

posix/winfw.c:78:10: warning: unused variable 'buf' [-Wunused-variable]
char buf[BUFSIZE];
^
1 warning generated.
ld: unknown option: -E
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ej2d] Error 1

我的解决方法是,去掉macosx下的链接选项,-E, 也去掉了选项-Wl,
-Wl 选项保留的话,会有警告。
warning: unknown warning option '-Wl' [-Wunknown-warning-option]

也就是将,macosx: LDFLAGS修改成
macosx : LDFLAGS += -L/usr/X11R6/lib -lGLEW -lGL -lX11 -lfreetype -llua -lm -ldl

一个文档的错误

id 的管理工作交给使用者,如果使用 simplepackage 模块的话,它会简单的为所有加载的包分配贴图 id 。所以 不建议 联合使用 simplepackage 和 ppm.texture ,除非你知道如何确切的管理贴图 id 。

按我的理解,这里应该是 建议

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.