Mercurial > MadButterfly
changeset 399:31b6633e3538
- Fix a minor error in src/sprite.c: should check *(s-1) instead of
*s or the pointer will stop at '/', which is not what we want.
- Fix various load path errors in examples because libtool put .so
into .libs directory.
- Fix an error in examples/dynamic/Makefile.am: scene_la_SOURCES
should be scene.c instead of mytext.c
author | john.cylee@gmail.com |
---|---|
date | Fri, 12 Jun 2009 18:36:15 +0800 |
parents | 674717c2c3ee |
children | c3fbf599e88f |
files | examples/dynamic/Makefile.am examples/dynamic/hello.c examples/dynamic/main.c examples/dynamic/text.c examples/menu/filebrowser.c examples/menu/main.c src/sprite.c |
diffstat | 7 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/dynamic/Makefile.am Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/dynamic/Makefile.am Fri Jun 12 18:36:15 2009 +0800 @@ -35,7 +35,7 @@ mytext_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared -scene_la_SOURCES = mytext.c +scene_la_SOURCES = scene.c scene_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared
--- a/examples/dynamic/hello.c Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/dynamic/hello.c Fri Jun 12 18:36:15 2009 +0800 @@ -48,7 +48,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("scene"); + myApp = MBApp_Init(".libs/scene"); data.currentscene=0; MBApp_setData(myApp,&data); //b = mb_button_new(myApp, myApp->rootsprite, "btn");
--- a/examples/dynamic/main.c Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/dynamic/main.c Fri Jun 12 18:36:15 2009 +0800 @@ -121,7 +121,7 @@ mb_button_t *b; mb_sprite_t *sprite; - sprite = sprite_load("button", myApp->rdman, myApp->rdman->root_coord); + sprite = sprite_load(".libs/button", myApp->rdman, myApp->rdman->root_coord); b = mb_button_new(myApp->rdman, sprite, "btn"); mb_button_add_onClick(b, test,NULL); } @@ -140,7 +140,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("scene"); + myApp = MBApp_Init(".libs/scene"); data.currentscene=0; draw_text(); MBApp_setData(myApp,&data);
--- a/examples/dynamic/text.c Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/dynamic/text.c Fri Jun 12 18:36:15 2009 +0800 @@ -67,7 +67,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("mytext"); + myApp = MBApp_Init(".libs/mytext"); data.currentscene=0; MBApp_setData(myApp,&data); get_now(&tmo);
--- a/examples/menu/filebrowser.c Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/menu/filebrowser.c Fri Jun 12 18:36:15 2009 +0800 @@ -226,7 +226,7 @@ dir = argv[1]; else dir ="/tmp"; - myApp = MBApp_Init("browser"); + myApp = MBApp_Init(".libs/browser"); MBApp_setData(myApp,&data); MyApp_InitContent(dir);
--- a/examples/menu/main.c Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/menu/main.c Fri Jun 12 18:36:15 2009 +0800 @@ -76,7 +76,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("list"); + myApp = MBApp_Init(".libs/list"); MBApp_setData(myApp,&data); MyApp_InitContent();
--- a/src/sprite.c Fri Jun 12 11:23:59 2009 +0800 +++ b/src/sprite.c Fri Jun 12 18:36:15 2009 +0800 @@ -57,7 +57,7 @@ return NULL; } s = name + strlen(name)-1; - while((s != name) && *s != '/') s--; + while((s != name) && *(s-1) != '/') s--; snprintf(path,sizeof(path), "%s_new", s); new = dlsym(handle,path); if (new == NULL) {