Jump to content

Aaron Symons

Members
  • Posts

    90
  • Joined

  • Last visited

Profile Information

  • Location
    England, UK

Recent Profile Visitors

9,684 profile views

Aaron Symons's Achievements

Newbie

Newbie (1/14)

13

Reputation

  1. Hi thehankinator, That works like a charm! Can't believe it was so simple. Many thanks!
  2. Hi guys, I was wondering if anyone's ever used a custom icon for their application's window. If so, what steps did you take? I imagine I might have to fiddle with the main.cpp file and possibly derive a new window class from Leadwerks::Window to get things working. One thing that will make this tricky: I'm targeting Windows OS, but eventually supporting OSX and Linux. Many thanks
  3. Hi guys, I understand this is a very old thread, but I think main.cpp may have changed since, and in the interest of keeping things updated... I've followed the answers to this question, but main.cpp uses argv and argc to do some setup prior to running the game. So, how would I go about setting up/adjusting the main.cpp? After making the changes suggested by @Roland, there are errors in main.cpp on lines: #44 #63 #66 ...where you can see the usage of argv and argc. I've attempted adding extra #ifdef and #ifndef checks for _DEBUG mode on these lines, and changing the code accordingly, but with no success. Any help and guidance would be greatly appreciated! Many thanks
  4. [i know this post could have been much better in explanation, but I'm tired and need sleep ] Okay guys, another update on implementing an animated image file (now A-PNG) in Leadwerks. It's pretty simple: implement the TinyImageLoader ! Use that library to read the APNG into a TIL::Image - by default it will give you image frame count - then, just use a Leadwerks::Texture to draw to the context, setting the texture's pixels to the appropriate TIL::Image frame's pixels based on a simple interval timer - using TIL to get the pixel data (and manually converting it to a char* before passing to the Leadwerks::Texture). There are a couple of good examples included with TinyImageLoader SDK. I just referenced the first example, and thought how I could create an actual Leadwerks::Texture from the information supplied to me by TinyImageLoader. I now have an Animated-PNG image that renders to the screen and auto-updates the frame based on a set interval. I was going to have the APNG class implement Leadwerks::Texture, but I don't feel like implementing the extra 30+ virtual methods right now! *sad face* That's all for now, as I feel it could be simple enough for others to implement - if not a good test of some basic C++ to C/C++1 implementation abilities. However, if anyone would like me to post a code example I will! Many thanks! 1 The original code was written in C and then rewritten in C++ for TinymageLoader, though some C-style syntax does still appear.
  5. I thought I'd update this thread, seeing as I said I would! During my research I came across issues with GIF licensing, and why the GNU - and others - pretty much refuse to even deal with GIF now. However, I came across Animated-PNG which is an extension to the PNG format developed by Mozilla! I think APNG is a viable substitute if we want to integrate animated images in Leadwerks. I have the APNG add-on for GIMP, and now I'm researching how to read the file's frames in C++ and draw them to the screen using OpenGL. I haven't come across much information yet, but I think it's worth the effort.
  6. In Leadwerks.h, I changed #include <OpenAL/al.h> #include <OpenAL/alc.h> to #include "al.h" #include "alc.h" and I have no more OpenAL related errors. However, I do have issues in Steamworks.h now. Line #85 to #93: STEAM_CALLBACK() is missing an explicit type, and its parameters are all undefined. Line #104: HHTMLBrowser is undefined. Line #214: return type of "uint32" instead of "uint32_t". There are many others as well. I'm guessing that I'm still missing other dependencies somewhere. EDIT: Line #13 in Mutex.h - pthread_mutex_t is undefined. Definitely still missing lots of dependencies!
  7. I think including that file solved some issues, but I still have same the error as stated before.
  8. Hi guys! I've created a new Project in the Solution which will be for one of my custom frameworks/libraries. My framework references the Leadwerks library and classes. I'm currently having difficulties setting up the project to compile, as I get this error: Error 1 error C1083: Cannot open include file: 'OpenAL/al.h': No such file or directory I've added the dependencies and path macros for this new Project, trying to mimic the setup of the Project in the generated Solution from Leadwerks. I'm not sure what I'm missing! Any advice and guidance would be greatly appreciated! Many thanks
  9. Hi mbarhon, Thank you for the guidance. I'll try your suggestions when I have time and update the thread accordingly. Many thanks
  10. Your code basically follows the same flow I'm using, except I don't set the context color before clearing the context. Everything renders as needed now, but if you think I definitely should be setting the context color before clearing the context, we can explore and discuss further. Thanks!
  11. Hi guys, I was just wondering if there's a way to draw/play an animated gif image on screen in C++ using Leadwerks? Many thanks
  12. Hi guys, Thanks for the response. Clearing the context works, but only works without setting the color (before or after clearing), as I receive a black screen. However, as my background is currently black, I feel I could possibly draw a black background instead of setting the context color. This might be the way to go. I'll keep you guys updated with what I find. Thanks again!
  13. Hi all! I have a custom Cursor class written in C++. The image (a *.tex file) is being drawn multiple times across the window as I move the mouse. How can I draw it only where the mouse is, and avoid it being drawn all over the place? I have this for drawing: context->SetBlendMode(Leadwerks::Blend::Alpha); context->DrawImage(cursorImage, (mousePosition.x - cursorOffset.x), (mousePosition.y - cursorOffset.y)); context->SetBlendMode(Leadwerks::Blend::Solid); I've attempted clearing the context - which resolves this issue - but other drawn images do not display, as the cursor is the last thing to be drawn. Many thanks
×
×
  • Create New...