X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=blobdiff_plain;f=src%2Fgui-environment.cpp;h=420b6a67129eb743fc10a9563f1c84bd12b63f66;hp=5af49682d673585a1865eb8d88c561d41872d7a9;hb=19663b6c5766b06c73148fdf803ce3555052a23e;hpb=6343b5b67dfe68e1e7270ba6c100603f157d1b31 diff --git a/src/gui-environment.cpp b/src/gui-environment.cpp index 5af4968..420b6a6 100644 --- a/src/gui-environment.cpp +++ b/src/gui-environment.cpp @@ -81,15 +81,15 @@ gui_IGUIEnvironment_addImage (SCM gui_environment, SCM id, SCM text) { - gui::IGUIImage* image = - ((gui::IGUIEnvironment*)scm_to_pointer (gui_environment))-> - addImage ((video::ITexture*)scm_to_pointer (image), - scm_to_position2d_s32 (position), - scm_to_bool (use_alpha_channel), - (TParent)scm_to_pointer (parent), - scm_to_int32 (id), - scm_to_wide_char_string (text)); - return scm_from_pointer ((void*)image, NULL); + gui::IGUIEnvironment* guienv = (gui::IGUIEnvironment*)scm_to_pointer (gui_environment); + gui::IGUIImage* new_image = + guienv->addImage ((video::ITexture*)scm_to_pointer (image), + scm_to_position2d_s32 (position), + scm_to_bool (use_alpha_channel), + (TParent)scm_to_pointer (parent), + scm_to_int32 (id), + scm_to_wide_char_string (text)); + return scm_from_pointer ((void*) new_image, NULL); }