Mark Sibly

Forum Replies Created

Viewing 15 posts - 766 through 780 (of 1,431 total)
  • Author
    Posts
  • in reply to: Capturing screen #8098

    Mark Sibly
    Keymaster

    > I’m not sure, but I think Red and Blue’s been switched.

    Haha!

    It’s actually doing the same thing here, only my desktop is so psychedelic I didn’t notice!

    Fixed code:

    in reply to: Capturing screen #8091

    Mark Sibly
    Keymaster

    Actually, PixelFormat.RGB8 is just an alias I added for RGB24 – should probably have used RGB24 in the above code to prevent confusion. I recently added a number of GL depth/float pixel formats recently (which aren’t well supported in the Pixmap class yet) and decided I quite like the GL ‘notation’ (which is very similar to mx2 anyway) so have been playing around with switching to it (but leaving the old ones in there). Haven’t decided what to do here in general though.

    But I’m surprised the code doesn’t work for you. What OS are you using? What desktop mode? Can you post a pic?

    in reply to: Capturing screen #8084

    Mark Sibly
    Keymaster

    There’s this, but it appears to be c++14 only. I have asked the author if he can backport it to c++11 for us (I’m not moving to c++14 just yet…) but I don’t like our chances.

    In the meantime, here’s some Windows only source…

     

     

    Windows only…

    in reply to: Ted2Go IDE #8064

    Mark Sibly
    Keymaster

    Want to use GridView but got memory access violation – “style is null”.

    Try the latest at develop.

    GridView uses Style=GetStyle( “GridView” ) in its ctor, but ted2go’s default theme doesn’t have a ‘GridView’ style. Still, it shouldn’t crash if GetStyle can’t find a style so GetStyle should now return a simple ’empty’ Style if all else fails, never Null.

    Some more on this: I’d recommend removing ted2go’s ‘default.json’ theme, and moving any customizations you may have made there to ted2-default.json. This should still work, and should cause ted2go to use mojox’s default.json instead, which *does* have a GridView style, and will also include any future default styles I may add.

    By providing a default.json theme file with ted2go, the mojox one is actually being overwritten. This behaviour is by design – assets are imported in ‘module dependancy order’, allowing you to ‘overwrite’ (or ‘override’) any assets imported by any imported modules. Hope that makes sense…!

    in reply to: Translation hanging with nested struct templates #8053

    Mark Sibly
    Keymaster

    Was there a reason structs are by-value and classes are by-reference as opposed to allowing the user to specify?

    ‘Coz it’s WAY simpler and the alternative opens a pandora’s box of complexity. For starters, people would have to starting tagging many of their variables, parameters, return types etc with ‘ByRef’ or something. I would personally hate this as a user.

    There’d be confusion over when to use ByRef, a bunch of technical issues like dereferencing, in place construction, probably GC issues, slicing issues (not currently an issue as structs can’t extend) – all that really *fun* stuff from C++ that makes me want to write new languages!

    in reply to: GetFileTime does not update? #8047

    Mark Sibly
    Keymaster

    GetFileTime should return the time the file was last modified – if you don’t modify the file, it wont change!

    Seems to work OK as mx2cc uses it often and if it didn’t nothing would build properly!

    in reply to: Forward referencing compiler error. #8046

    Mark Sibly
    Keymaster

    Working OK here, well compiling anayway. Fails when it needs to load something.

    I’ve just made more changes and pushed again – perhaps I forgot to push last time, anyway try again.

    You will need to be using the ‘develop’ branch and you’ll have to do an updatemx2cc.

    in reply to: Translation hanging with nested struct templates #8045

    Mark Sibly
    Keymaster

    Sorry, probably should’ve explained a bit better.

    Your code has the same problem as my ‘Struct S’ example above, ie: it delcares a type that contains an instance of itself (which therefore contains an instance of itself etc etc). In your case the type is Bob<N> but the idea’s the same. It works when you use a class because a type can of course contain a reference to itself, and classes are ‘reference types’.

    The compiler should of course not hang – you should get a ‘recursive type definition’ error or something, be cool if you could add this to github so I remember! – but ultimately your code can’t work as is and will need to change.

    in reply to: Forward referencing compiler error. #8043

    Mark Sibly
    Keymaster

    There’s a potential fix up on the develop branch now, although you’ll need to updatemx2cc to use it.

    You may also be able to fix the problem by assigning the ‘media’ global var to itself somewhere in the problem file.

    This fix is actually pretty cool, and has given me some (more) ideas for fixing this forward reference stuff for good! I wont be attempting this just as though it’ll be a reasonably major job.

    in reply to: Forward referencing compiler error. #8040

    Mark Sibly
    Keymaster

    Are you still having a problem t_mojo_graphics_Image under 1.1.04?

    Here, I’m having a problem with t_default_Media instead.

    in reply to: Forward referencing compiler error. #8033

    Mark Sibly
    Keymaster

    Have you tried 1.1.04?

    https://blitzresearch.itch.io/monkey2

    in reply to: Mac mouse wheel very fast #8031

    Mark Sibly
    Keymaster

    Can you try a normal/windows mouse on the mac?

    Also, hard to see how much scrolling is going on. Can you just show the screen while you try to scroll ‘click by click’?

    in reply to: Playniax news #8030

    Mark Sibly
    Keymaster

    Great stuff!

    in reply to: Mac mouse wheel very fast #8010

    Mark Sibly
    Keymaster

    For example, in the Ted2 IDE, if I just scroll the wheel a tiny bit, I’ve jumped about 30 lines.

    I am not getting this effect on macos here. One ‘wheel click’=about 2 lines of code scrolling in ted2, on both macos/windows.

    I am however getting wheel.y values oustide the range [-1,1] only on macos. On windows, wheel.y is always -1, 0 or 1.

    What values are you getting from this code? For me, one ‘click’ of the wheel is -1 or 1. On macos, spinning wheel faster gives greater values:

    in reply to: I got #8 in game jam! #8009

    Mark Sibly
    Keymaster

    Awesome stuff Adam!

Viewing 15 posts - 766 through 780 (of 1,431 total)