I need a help with modification of Orbiter for Nokia Internet Tablets. Basically, it works fine. But when I built the Orbiter from the latest 0710 sources I found the problem with icons on floorplan. Let me first a clarify the Orbiter's logic (as I understand it). All icons on the floor plan have color pink (255, 102, 255). When the screen with floor plan is opened the Orbiter starts checking all pixels from the screen area to compare their colors with pink. If such pixel is found its color is replaced by proper color (red, yellow, black etc). There is a hack (which works fine with current version of the Orbiter) to fill icons by proper color. I just increase the maximum difference between RGB parts of pink and retrieved pixel to 10 (originally it's 3):

SDL_GetRGB((Uint32)Pixel, m_pScreenImage->format, &red, &green, &blue);But now I have to convert replacement color from 32bit to 16. I don't have a lot of SDL of C++ knowledge. So, any help will be very appreciated!

You can find the code in the Orbiter/SDL/OrbiterRenderer_SDL.cpp, method OrbiterRenderer_SDL::ReplaceColorInRectangle. Here is a my version of that method:

I need a help with modification of Orbiter for Nokia Internet Tablets. Basically, it works fine. But when I built the Orbiter from the latest 0710 sources I found the problem with icons on floorplan. Let me first a clarify the Orbiter's logic (as I understand it). All icons on the floor plan have color pink (255, 102, 255). When the screen with floor plan is opened the Orbiter starts checking all pixels from the screen area to compare their colors with pink. If such pixel is found its color is replaced by proper color (red, yellow, black etc). There is a hack (which works fine with current version of the Orbiter) to fill icons by proper color. I just increase the maximum difference between RGB parts of pink and retrieved pixel to 10 (originally it's 3):

SDL_GetRGB((Uint32)Pixel, m_pScreenImage->format, &red, &green, &blue);But now I have to convert replacement color from 32bit to 16. I don't have a lot of SDL of C++ knowledge. So, any help will be very appreciated!

You can find the code in the Orbiter/SDL/OrbiterRenderer_SDL.cpp, method OrbiterRenderer_SDL::ReplaceColorInRectangle. Here is a my version of that method:

Uint16 value = ((red >> fmt->Rloss) << fmt->Rshift) + ((green >> fmt->Gloss) << fmt->Gshift) + ((blue >> fmt->Bloss) << fmt->Bshift);where fmt is SDL pixel format. But as I already mentioned, it seems that pixel format doesn't take into account byte order. I found RGB shifts for little endian in the SDL_Helper/SDL_Defs.h. But I have no idea where can get appropriate loss values.

oh i think i told BS. From your posted code I take you want to store all three values in 16bit?

so if yes, you have to divide the 16 bits on three colors, so i'd assume it is sth like 5+6+5 (giving green an additional bit). So you have to "loose" 3 bits for R & B and 2 for G. EDIT: (starting with 8 bits per color)

Thanks to all for your suggestions. Finally I solved the problem with color of icons. Now all icons are displayed correctly including MD (it was a long time issue). The only one issue which still exists is olive color of pressed button (some lighting scenario, for example). It happens because all Oriter's colors are 32bit but Nokia supports 16bit. So, the color light blue - #7387BC (115, 135, 188 in RGB) becomes to olive - #738700 because it looses last two bytes.

I have no idea where those buttons are rendered. Does somebody can point me?

Thanks to all for your suggestions. Finally I solved the problem with color of icons. Now all icons are displayed correctly including MD (it was a long time issue). The only one issue which still exists is olive color of pressed button (some lighting scenario, for example). It happens because all Oriter's colors are 32bit but Nokia supports 16bit. So, the color light blue - #7387BC (115, 135, 188 in RGB) becomes to olive - #738700 because it looses last two bytes.

I have no idea where those buttons are rendered. Does somebody can point me?

Thanks to all for your suggestions. Finally I solved the problem with color of icons. Now all icons are displayed correctly including MD (it was a long time issue). The only one issue which still exists is olive color of pressed button (some lighting scenario, for example). It happens because all Oriter's colors are 32bit but Nokia supports 16bit. So, the color light blue - #7387BC (115, 135, 188 in RGB) becomes to olive - #738700 because it looses last two bytes.

I have no idea where those buttons are rendered. Does somebody can point me?

TIA

Cool effort. Thanks very much for this one ... How can we get the update ?

Just installed it here on Diablo and it seems to be working fine. We'll use it for 'real' today and post any issues here later.

Great! I attached patches for the Nokia's Orbiter - http://www.mediafire.com/?14nicedkntt. They are made from 0710 branch. Have a look on it and if they're ok let's put them into LMCE repository.

Your new rev is being used for a demo now... so that will give it a good 'workout' ;-)

So the only remaining issues are the button highlights and making it possible to switch to another N800 app and then back to the Orbiter without the Orbiter crashing. By the way is the screen-saver disabled in this version?

Yes, there is a disabled screen-saver. I applied Oliver's path before build the Orbiter.

Quote

So the only remaining issues are the button highlights and making it possible to switch to another N800 app and then back to the Orbiter without the Orbiter crashing.

Yes, I'm working on it.

Another thing which can be done with the floorplan icons is that. To use color with different intensity according to value came with ON. For example, if some dimmer has is set ON with 50% its color will be rgb(255,255,96) and not rgb(255,255,0). In that case it'll be more visible what intensity has each lighting object.

For each object on the floorplan is returned a string with its properties. For example, dimmer information looks like that: