Gwenel

Forum Replies Created

Viewing 15 posts - 76 through 90 (of 117 total)
  • Author
    Posts
  • in reply to: Arrays with multiple dimensions #14461

    Gwenel
    Participant

    Sounds like a great idea!

    in reply to: Recursive example (Pow) #14434

    Gwenel
    Participant

    The -1 is just kept to maintain the symmetry, so you see how it works more easily.

    in reply to: Recursive example (Pow) #14433

    Gwenel
    Participant

    Ya I know it’s an example how to do recursive algorithms that I found intriguing while converting some game code. This one uses integer numbers instead of double also, it might be preferable sometimes.

    in reply to: Bytes 'n bytes #14414

    Gwenel
    Participant

    Building an arcade emulator around a few processors and thinking of making it open-source if it turns out alright.

    It’s all Monkey2 code and it tries to avoid externals, maybe there will be some externals we’ll see but it’s a fun project and very good practice.

    It’s understandable if Mark doesn’t want to put low-level in there no worries but I would’ve guessed that there were an integer division that fulfilled the purpose of what Sar does. A hidden low-level element, a hackers kinder surprise.

    in reply to: Bytes 'n bytes #14413

    Gwenel
    Participant

    Thanks, ya it’s good to be clear about things.

    Okay if it’s not implemented we can use something that does the same thing.

    Something like x = Floor(x/2) ‘ Sar x,1 (but sometimes the correct Sar for a negative x would be -Ceil(-x / 2) when you use 2nd complement. It’s just an oddity to watch for out for.

    in reply to: Bytes 'n bytes #14410

    Gwenel
    Participant

    Is there a SAR in this language? Is there a way  to do that? Maybe integer division? << >> >>>

    in reply to: Bytes 'n bytes #14409

    Gwenel
    Participant

    The unsigned is the only one left to explain and I think I understand it now too

    -1 is interpreted all one bits so so it will give 255

     

    So the thing that was fuzzy was that the functions where defined to get input and output of certain type.

    And that type needs to be converted at the call of the function.

     

    That conversion was the source of confusion. It needs time to get used to.

    in reply to: Bytes 'n bytes #14407

    Gwenel
    Participant

    no it goes up to 127

    in reply to: Bytes 'n bytes #14405

    Gwenel
    Participant

    Ahh the value is seen as a 2nd complement AFTERWARDS, I’m stupid. Okay gotcha. Of course.

    I just read BYTE and thought 0-255.  0-255 0 -255 0 -255 It’s signed.

     

    But the unsigned one I haven’t got around yet to understand.

    in reply to: Bytes 'n bytes #14404

    Gwenel
    Participant

    Any other demo coders in the building? Need help.

    in reply to: Bytes 'n bytes #14403

    Gwenel
    Participant

    Unsigned bytes

    Why is 255 & -1  =  0 instead of 255? -1 is all one bits except one, and we mask all bits but the 8 lowest bits. So all bits should be 1’s = 255.

     

     

    The signed bytes below are harder to explain but if  the above is explained that’s probably enough to understand these aswell.
    The questions where (not stupid at all) these questions:

    Why is 255 & 255 =  -1 and not 255?
    Why is 128 & 255 = -128 and not 0?
    Why is -1 & 255  =  -1 and not 255?

    I know it’s about the interpretation of the actual values in edit time and runtime swell, but how are you supposed to reason about this?

    in reply to: Bytes 'n bytes #14402

    Gwenel
    Participant

    As apposed to what we wrote inside the source code.

    How do you mean?

    Okay, how do this work?

    in reply to: A request :) #14399

    Gwenel
    Participant

    Thank so much, that’s perfect. We thought we would go mad because we have several layers of shadows and they all need to be able to overlap without looking terrible but we’ll give this a go!

    You can probably fix the overlapping problem with an in-between image and then use that as a single shadow but there’s so much shadowing going on and the performance went crazy slow.

    in reply to: Maybe bug? #14390

    Gwenel
    Participant

    I said what everyone said here and I added that it was probably the old model so he got down and bought a Apple iMac 27″ 5k Retina, lo and behold, it now WORKS!

    Thanks so much for trying things out 🙂

    in reply to: Fragment shader fails with additional uniform #14389

    Gwenel
    Participant

    This gives an error for me, but maybe that gives a away a clue for you or someone else

    “GL_VERSION=2.1 ATI 10.4.14
    Renderer is using deferred rendering”

Viewing 15 posts - 76 through 90 (of 117 total)