Your Digital Media Has Never Looked So Good

 
User avatar
BradC
Topic Author
Posts: 305
Joined: Sun Dec 16, 2012 1:50 am

request for help. should this code work?

Sun Mar 03, 2013 8:14 am

Can anyone tell me if this is valid code?

I'm using the following code in a channel I'm developing. Works perfectly well on 2 of my roku boxes, but when I went to run the same code on another, it didn't work.

The 2 that work are 2500X on 4.9 build 5061 and the one that doesn't work is 3100X on build 5060, (but says it's up to date).


ShipBx[ShNX] = createobject("roBitmap", {width:100, height:100, AlphaEnable: true}) 
ShipDr[ShNX] = createObject("roRegion", ShipBx[ShNX], 0, 0, 100, 100)      
ShipDr[ShNX].DrawRotatedObject(0,0,RotDegree, m.bitmapset.regions["ship."+ str(SDegree)])   



This code is part of a nested loop, where it creates 6 regions in each of the 4 quadrants in the middle loop, then the outer loop changes the angle (RotDegree) to either 270, 180, 90, or 0 for the next 6. Right now, only the quadrant that isn't rotated works (12:30-3:00), the rest do not throw any type of error, debug shows the code being called, but the rotated images do not appear on screen on the 3100X. This makes it seem logical that the problem is in the rotation and not something else.

The goal is to have 24 ship images so the player experience is that the ship is rotating. Ideally this should be done with only using one image, but in this case 6 images for each quadrant if that's the best we can do. I can manually create all 24 images if there is no good way to do it in brightscript that will work on every roku (well I know it doesn't work on the oldest models, but that makes sense), it's just a bit odd (to me) that this works fine on 2, but not a third.

The only idea I can come up with is that SetPretranslation has something to do with it, but when I added that, it did not make a difference. I'm also using scaled object in a similar fashion and that works fine on all the rokus.

Can anyone tell me what am I doing wrong here?


Thanks.

-B
 
User avatar
BradC
Topic Author
Posts: 305
Joined: Sun Dec 16, 2012 1:50 am

Re: request for help. should this code work?

Mon Mar 04, 2013 11:44 am

anyone? bueller? :)


I'll take any help, if you have any crazy ideas, throw them out there. If the function is deprecated in the newer roku, or I missed something, or maybe the newer roku is just borked and this should work ok. Appreciate any suggestions.


thanks.

-B
♦MiniGolf♦HangMan♦Brain Puck♦Retro Tennis♦BORK♦FLIP♦Pathogen♦Pathogen 2♦Shut the Box♦Birdie♦Logic♦Dots♦Pool♦küglo♦Bubble Wrap♦Trivia Channel♦Mancala♦Air Hockey♦Weather♦CAMERA♦Your Photos Screensaver♦Desert Beauty Screensaver♦Wild Lakes Screensaver♦
 
User avatar
RokuJoel
Posts: 1758
Joined: Mon Nov 14, 2011 5:22 pm

Re: request for help. should this code work?

Mon Mar 04, 2013 2:07 pm

My best guess without testing this out is there may be a bug in the firmware, as there are two different hardware platforms you are testing on. If you can private message me a dropbox type link to a zipped example that I can attach to a bug report, it would save me some time in trying to recreate your issue from scratch to attach to the bug report.

- Joel
 
User avatar
BradC
Topic Author
Posts: 305
Joined: Sun Dec 16, 2012 1:50 am

Re: request for help. should this code work?

Mon Mar 04, 2013 6:13 pm

Thanks Joel, didn't intend for anyone to have extra work, I just assume I farkd my code somewhere.

I'll get the sample to you.
♦MiniGolf♦HangMan♦Brain Puck♦Retro Tennis♦BORK♦FLIP♦Pathogen♦Pathogen 2♦Shut the Box♦Birdie♦Logic♦Dots♦Pool♦küglo♦Bubble Wrap♦Trivia Channel♦Mancala♦Air Hockey♦Weather♦CAMERA♦Your Photos Screensaver♦Desert Beauty Screensaver♦Wild Lakes Screensaver♦

Who is online

Users browsing this forum: No registered users and 7 guests