Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About MCP

  • Rank

Profile Information

  • Gender
  • Location
    Leeds UK
  1. Apologies xtreampb, the code example was meant for Admin because the error is within LE3 source code not your code. The reason you're getting a runtime error now is because a function pointer for all intense purposes is not compatible with a void pointer so your code is trying to call a function at an invalid memory address.
  2. ..and what makes you think function pointers are? I've already given you an example of how to fix your code in this thread (post #4)... http://www.leadwerks.com/werkspace/topic/6321-le3updatephysicshook/ If you want a more detailed explanation of what you can or can't do with function pointers refer this thread for a better insight... http://stackoverflow.com/questions/559581/casting-a-function-pointer-to-another-type
  3. It's generally bad practice to cast a function pointer to anything let alone a void pointer which is why your compilers are complaining. They either don't allow it or if they do it can lead to all kinds of instability errors. The error is in the function declaration of AddHook(...) which wrongly expects you to pass a function pointer as a void pointer. It's a bug and there's nothing anyone can do until Josh fixes the issue.
  4. Read my post in this thread for cause and solution... http://www.leadwerks...atephysicshook/
  5. Refer this thread for solution... http://www.leadwerks.com/werkspace/topic/6321-le3updatephysicshook/
  6. Your compiler is rightfully complaining that your function pointer isn't of the correct type ie "void *". The error lies within the declaration of System::AddHook() which has "void *" as the second parameter. AddHook should expect a function pointer of type void NOT a void pointer as they are in fact two completely different things and this should be classified as a typo bug. The correct declaration for System::AddHook() should have been this.... typdef void (*vFunc)(Leadwerks::Entity *); AddHook(int hookid, vFunc hook) { ... } As a temporary measure you call cast all your function pointers to void pointers but generally speaking this is considered dangerous in the C++ world and some compilers may not allow you even to do that. In a case were compilation has been successful you will often run into instability issues, memory address violations or other runtime errors... Avoid! See this discussion on the subject... http://stackoverflow...er-as-parameter
  7. @xstreampb: Have to tried removing the prototype altogether? The problem maybe that your prototypes have not been declared with the correct namespace hence the error that you are getting (Re thread aggror supplied). Also you don't need a '*' before your Break function parameter in the AddHook function call.
  8. MCP

    edge of screen in 3D

    Unproject() could be useful there. Unproject(0,y) for left screen edge and Unproject(screenWidth-1,y) for right edge etc. Position your quads accordingly.
  9. MCP

    2D on mobile

    To answer your original question Rick. I faced the same problems when I developed my first Android game which I published roughly two years ago. Depending on your game's graphical requirements it's best to design your game to the absolute smallest screen you think it will be comfortably played on. You can then rescale your graphics to fit larger screen sizes and/or reference higher resolution bitmaps to fit. Remember to preserve the aspect ratio of your original screen size then centre the game area on the larger screen and you should be fine.
  10. I noticed the windows version of the updater downloads some macOS content and I assume vice versa for the Mac. Maybe a fix there?
  11. Is there any progress on this yet? I'm also having the same trouble.
  12. No problems Chris. Thanks for your help so far.
  13. A couple of Android queries: 1) Will it be possible to change the build target from the default to 4.x.x Jellybean for instance? 2) Will it be possible to incorporate the Google licensing api if required? 3) If needs be am I free to modify the android manifest? Thanks.
  14. Hi Chris, when executing a project in either debug or release mode a console window opens up before the main application window listing all the assets being loaded etc. Is there a way to suppress the console on a release build?
  15. Big fail for me. The editor goes through it's startup process, loads resources for the Darkness awaits, briefly displays a "Welcome" dialog before being dumped straight back to desktop. Win7pro (32bit) 4Gb ram NVidia 9600GT 512mb (latest drivers!) *EDIT* Just checked the editor log which reports OpenAL: AL_INVALID_OPERATION. **EDIT** Never mind... Updating OpenAL solved the problem! Everything works fine now.
  • Create New...