Forum Replies Created
- 
		AuthorPosts
 - 
		
			
				
Sounds like a great idea!
The -1 is just kept to maintain the symmetry, so you see how it works more easily.
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.
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.
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.
Is there a SAR in this language? Is there a way to do that? Maybe integer division? << >> >>>
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.
no it goes up to 127
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.
Any other demo coders in the building? Need help.
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?
As apposed to what we wrote inside the source code.
How do you mean?
Okay, how do this work?
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.
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
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” - 
		AuthorPosts