therevills

Forum Replies Created

Viewing 15 posts - 61 through 75 (of 272 total)
  • Author
    Posts
  • in reply to: Faster way to read in pixels? #12369

    therevills
    Participant

    Thanks Abakobo!

    Note that Image and Pixmap (extends Ressource) are not GCed so you you have to .Discard() them before replacing/loosing them or you’ll leak memory. But as the are not GCed Mark won’t tell it’s not safe to point to them!?

    Hmmm, I thought I read Mark had changed the GC…

    Edit:
    On Mark’s Blog:

    This means it’s not strictly necessary to use Discard to cleanup resources any more, GC will eventually do it for you. GCCollect() is still slow so Discard is recommended in realtime situations, but on the whole it should be possible to write apps without worrying about using Discard at all now.

    in reply to: @peterigz – Monkey2 Tutorials #12368

    therevills
    Participant

    Thanks Peter – I was wondering if you found a bug or something and decided on removing it.

    Really like how you implemented the component functionality.

    in reply to: Faster way to read in pixels? #12355

    therevills
    Participant

    Okay bench marking is done 🙂

    Debug Timing

    Release Timing

    And here is the full code:

    in reply to: Faster way to read in pixels? #12348

    therevills
    Participant

    Thanks guys! I’ll run some bench marking to see what is faster, I was considering of doing it “offline” too by creating a simple app which reads in the pixel data and spit it out to a JSON file.

    @scurty

    Not sure why you’re creating a canvas and then copying the viewport pixmap of it.

    To allow me to read the pixel data from an Image, do you know another way?

    in reply to: [ MONKEYX2 ] Android Back button #12292

    therevills
    Participant

    I thought AC stood for Android Code, but it looks like it stands for Application Control.

    “AC Back” (the Back key (application control keypad))

    https://wiki.libsdl.org/SDL_ScancodeAndKeycode

    Thanks for fixing this.

    in reply to: [ MONKEYX2 ] Android Back button #12279

    therevills
    Participant

    Nope you put in the right place…

    Damn, KeyHit calls KeyPressed which calls ScanCode… and ScanCode checks Key.Max 🙁

    I tried an Extension and sub classing the KeyboardDevice class both failed due to it uses a lot of private variables so it complains. I think we need Mark to make a change to get it to work – sorry.

    I’ll raise a GitHub ticket and point to this thread. Could you change title of this thread please (edit your first post) as its a Monkey2 issue than a Diddy2 issue 🙂

    Raised: https://github.com/blitz-research/monkey2/issues/293

    in reply to: [ MONKEYX2 ] Android Back button #12257

    therevills
    Participant

    I’ve copied some of the monkey keyboard code and found the scan values for AC_BACK:

    So Amon could you please add this code your project:

    Then when you want to hit the back key:

    I havent tested this so this may or may NOT work! 🙂

    in reply to: [ MONKEYX2 ] Android Back button #12256

    therevills
    Participant

    In the native keyinfo.cpp within Mojo, Mark has:

    KeyInfo is used in keyboard.monkey2:

    In SDL_keycode.h

    And SDL_keyboard.c

    So we may be able to use it somehow…

    in reply to: [ MONKEYX2 ] Android Back button #12255

    therevills
    Participant

    No idea sorry! Havent actually done any Android development in Monkey2 yet…

    I’ll investigate, unless you or anyone else knows!

    Edit: Quick Google in pure SDL2 C++:

    in reply to: Preferences class #12032

    therevills
    Participant

    Cool!

    I dont know if its in MX2 yet, but for Windows we need a way to save to the “correct” Microsoft approved folder locations.

    in reply to: CRT Shader? #12019

    therevills
    Participant

    Cool! MIT is fine with me 🙂

    in reply to: CRT Shader? #12004

    therevills
    Participant

    Very nice! Also didnt know that Monkey2 could play videos! Thanks!

    in reply to: Trigonometry Fail! Help! #11983

    therevills
    Participant

    Ah thanks Jesse! Yeah that makes sense!

    in reply to: CRT Shader? #11981

    therevills
    Participant

    @pixelpaladin – did you see my post just before yours?

    in reply to: CRT Shader? #11979

    therevills
    Participant

    @pixelpaladin – I cant get your code to work. When I try to compile I get:

    So I changed this line:

    to

    So it now compiles but crashes at runtime:

    Full code:

Viewing 15 posts - 61 through 75 (of 272 total)