Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Mirror flips on PNG Images

Author
Message
damothegreat
User Banned
Posted: 1st Apr 2017 11:29 Edited at: 1st Apr 2017 11:31
If no one has any of these yet - then I'm going to create a handful of useful mirror flips on images

First one... Mirror Flipped and rotated

You will need a PNG file in the media folder called test.png



Or just simply use spriteangle and spriteflip routines.

But I'm just seeing if I can program with memblocks!!

Shall write other over the course of the next week

Damo
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 1st Apr 2017 12:20
This looks useful. Thanks
damothegreat
User Banned
Posted: 1st Apr 2017 15:40
Added another one



Damo
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Apr 2017 15:52 Edited at: 1st Apr 2017 15:55
Why grab each channel as 4 separate bytes when you can simplify it with a single integer?




I tried your second demo, it's just crashes for me.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
damothegreat
User Banned
Posted: 1st Apr 2017 16:03
Thanks - ill adjust the code accordingly

How is it crashing. Coming up with an error at all?

Mine Is ok
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Apr 2017 17:24 Edited at: 1st Apr 2017 17:39
It might be on my end. I'm getting a lot of weird, inconsistent crashes on my demo now. I've restarted AppGameKit and it hasn't helped for some reason. I made a function that adds a reflection to the bottom of the image. Only *real* bug I see in my code is a slight misalignment of some pixels. Ok, 2 bugs. I can't call my function more than once. Calling it a second time just returns a black image and I haven't a clue why.



"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
damothegreat
User Banned
Posted: 1st Apr 2017 17:50
Wow that's cool, cheers

Even a 2nd / 3rd or even 4th calls into different integer variables, doesn't return a black area

Works fine and dandy on my setup
damothegreat
User Banned
Posted: 1st Apr 2017 17:53
Your first example worked.. - you must have reposted some code

This example doesn't work (like you said)..

Let me check it out

Login to post a reply

Server time is: 2024-03-29 10:31:53
Your offset time is: 2024-03-29 10:31:53