Charmed Quark Systems, Ltd. - Support Forums and Community
Official RIVA thread - Printable Version

+- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums)
+-- Forum: Third Party Development (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=8)
+--- Forum: Third Party Development (General) (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=22)
+--- Thread: Official RIVA thread (/showthread.php?tid=5632)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39


Official RIVA thread - Dean Roddey - 06-28-2010

I updated the document. Not much more to say than what I just said, but check it and make sure it makes sense to you.


Official RIVA thread - Dean Roddey - 06-28-2010

OK, the deal is is that image is true color, not true color with alpha. So it can't be alpha blitted it has to be drawn as a regular bitmap. I.e. it's a 24 bit per pixel bitmap, not a 32 bit per pixel bit map, so it's basically just a regular old bitmap and you should get a DrawBitmap command for that.


Official RIVA thread - brianmount - 06-29-2010

I'm not sure that answers my question. First of all, I appear to be getting AlphaBlits with an alpha of zero. That's legal, right? If I understand the protocol specification correctly, I should apply that alpha to the entire image, and then draw it. Of course that will have no effect with an alpha of zero, but it's legal, and in fact desired when the button is released, because the highlight should disappear.

But more importantly, I am also getting an AlphaBlit with an alpha of zero the first time the button is pressed. Maybe I should be getting a DrawBitmap as you say, but that's not what I see coming from the server.

Are you able to check what messages the server sends out for the problem template?


Official RIVA thread - Dean Roddey - 06-29-2010

If you have an image enabled but undefined, that's probably what you would get for that image. It'll be a 1x1 transparent image most likely since that's what the bitmap class will default itself to until some content is set on it. So when the button is being drawn unpressed, that's like what you will get.

I did debug into it far enough to see that I am getting a DrawBitmap when the button is pressed, and that's what prompted me to go look at the image and notice that it had no alpha. I checked the path so I know it was for the drawing of the pressed image. When it's released, you'd get the fill of the area and the draw of the default undefined image again.

But I'll get more info on exactly what's happening.


Official RIVA thread - SamVimes2 - 07-01-2010

I can confirm the web image widgets are working with no client changes necessary in 3.3.1. Way to go Dean!

Looking forward to seeing that other info...this 'blue button' thing has turned into our unicorn...


Official RIVA thread - brianmount - 07-11-2010

Now that I'm getting the Web image widget images, I need to figure out what to do cache-wise. Does the RIVA server use the same serial number semantics for these images, so that I can safely cache images until the serial number changes?


Official RIVA thread - Dean Roddey - 07-11-2010

brianmount Wrote:Now that I'm getting the Web image widget images, I need to figure out what to do cache-wise. Does the RIVA server use the same serial number semantics for these images, so that I can safely cache images until the serial number changes?

Check the updated RIVA protocol document, which discusses that in the section about image management. See if that makes sense to you, which will be a good sanity check on what I've written. It's linked to in the first post of this thread.


Official RIVA thread - brianmount - 07-15-2010

If it's alright, I'm moving this whole debugging-the-missing-highlight-image thing back to the RIVA thread, because it seems like it belongs here. It might be of interest to other RIVA developers, but won't be of any interest to end users of the iPhone (or any other) client.

Thanks for your debug log, Dean; that's very helpful. First of all, I see that I'm not sending the right protocol version. That's why I didn't see the new template message; you weren't sending it to me, because I was still using protoVer = 1. Am I supposed to set it to 2 now, or some other number?

Also, I see that, when you connect to Rob's server, you are getting AlphaBlits in the initial screen paint (serial numbers 26, 45, 78 and 97). I think these have alpha 0, and so have no effect, which is the right behavior. But you didn't receive those messages when you connected to your own server. So something must be different about Sam Vimes' template configuration, highlight images, or something. Do you know what that could be?

Of course, that still doesn't answer the question of why you are receiving a DrawBitmap as message serial number 144, whereas I get an AlphaBlit in the same position in the message stream coming from the same server. I remain stumped on that. Is it possible I'm sending something different at login time -- some flags detailing my screen resolution or capabilities -- that result in different server behavior? What values does your client send in the LoginRequest message?


Official RIVA thread - Dean Roddey - 07-15-2010

You can set the version to 2 if you want to get the new stuff. 1 is still supported for backwards compatibility, though since any client would likely just ignore anything it didn't understand it's only a formality I guess.

For the alpha blits during initial drawing, maybe there are some other widgets on the version of the template he has or something, compared to the one he sent me? If there was some widget there that is image based but has no image set for one of the enabled images, that can happen. You'll get a 1x1 transparent image, probably with no name. What image name are you getting with those initial alphablit drawing operations?


Official RIVA thread - brianmount - 07-16-2010

I receive "CQCRepo::\User\iPhone\keypresshighlight", serial number 1. Source rectangle 1/3/102/62, target rectangle 109/93/102/62, alpha 0, flags 0. It's the same thing I get later in the DrawBitmap (upon pressing the button a second time). Presumably, you are receiving the same thing from Rob's server.