Hi Edge,
For Symbian 9.1 S60, I know the graphics can be enlarged or reduced separately using the Blt(). I have the graphic set for 176x208 devices, can I enlarge the hole screen to fit the resolution 352x416?
Thanks
Screen size question1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void RenderGame(E2DSurface *buffer)
{
buffer->BltFast(...)
}
void OnNextFrame(ClassEDisplay *display, unsigned long timedelta)
{
if (display->buffer.GetWidth() == 352 && display->buffer.GetHeight() == 416)
{
RenderGame(&temp_buffer);
display->buffer.Blt(...);//Scale here
}
else
RenderGame(&display->buffer);
}
15 lines; 6 keywds; 2 nums; 57 ops; 0 strs; 1 coms Syntactic Coloring v0.4 - Dan East
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
ERESULT ClassMain::OnDisplayInit(EINSTANCE instance, ClassEDisplay *display)
{
E2DSurface temp;
bool upscale = false;
if (display->buffer.GetWidth() == 352 && display->buffer.GetHeight() == 416)
upscale = true;
if (upscale)
{
if (display->CreateSurface(&temp, "tilesheet.bmp") == E_OK)
{
display->CreateSurface(&tilesheet, temp.GetWidth() * 2, temp.GetHeight() * 2);
tilesheet.Blt(0, 0, &temp, NULL, 0, 65536 * 2);
}
}
else
display->CreateSurface(&tilesheet, "tilesheet.bmp");
return(E_OK);
}
18 lines; 8 keywds; 9 nums; 84 ops; 2 strs; 0 coms Syntactic Coloring v0.4 - Dan East