saludos ,
hace tiempo que no pasaba por aqui
estoy haciendo algo interesante, pero
necesito desde la dll recuperar el contenido
de mouse.x y mouse.y intento con glodword("mouse.y")
y me arroja cientos de errores...
que debo hacer?
como recupero datos usando las librerias .h del bennu?
me regalan un ejemplo? de como recuperar los datos usando
las variables globales, o como seria mas eficiente el mouse
sin necesidad de pasarle datos desde el .prg?
You should tell Bennu your library depends on Mouse.X and Mouse.Y by doing:
DLLEXPORT DLVARFIXUP __bgdexport(mylib,globals_fixup)[] = { // variable_numbers:
{ "MOUSE.X" , NULL , -1 , -1 }, // 0 = GLOBAL_MOUSE_X
{ "MOUSE.Y" , NULL , -1 , -1 }, // 1 = GLOBAL_MOUSE_Y
{ NULL , NULL , -1 , -1 }
};
enum {
GLOBAL_MOUSE_X = 0,
GLOBAL_MOUSE_Y
} _globals;
Change mylib to the exact name of your library without extension.
To tell Bennu you rely on libmouse:
DLLEXPORT char * __bgdexport(mylib,modules_dependency)[] = {
"libmouse",
NULL
};
Change mylib to the exact name of your library without extension.
To use it in your library:
GLOINT32( < the_exact_name_of_your_library_without_extension > , < INSTANCE* instance > , < variable_number > )
for example:
INSTANCE* i = first_instance;
int mouse_x = GLOINT32(mylib,i,GLOBAL_MOUSE_X);
GLOINT32(mylib,i,GLOBAL_MOUSE_X) = 0;
See dlvaracc.h for more LOC*() and GLO*() MACROs.
Also take a look at my bennu library template (http://deathegg.student.utwente.nl/files/BennuLib.c).
I think I don't have to translate this to Spanish. :)
exacto, tambien podes ver el fuente del mod_mouse.c o libmouse.c en el svn.
ya los fuentes de bennu estan liberados.
Thx...
Gracias