I'm having two issues:
I'm working in Tier 2, Template 1.076, and I'm working with the percentage based system.
First issue,
In Visual Studio 2008, I set the device width and height in the core.cpp file and the DEVICE_HEIGHT function is not returning the correct number. Please see attached screenshot of different resolutions. And eventhough 640x960 is not listed doesn't have the correct height value neither.
Will this affect the functionality of the SetDisplayRatio function?
However, it does show the correct height value when ran on the Galaxy S3 which has a resolution of 720x1280, but it doesn't fill the screen.
Second issue:
I'm trying to get the entire screen to be filled using the percentage based system and it works in Tier 1, vs 1.07, and in Windows as long as the resolutions are 320x480 and 480x640.
But when I get to higher resolutions like 640x960, it runs but the entire screen is not filled and the ratio I have set to .66.
Now when setting the resolution to 720x1280 it doesn't work at all. The screen doesn't even popup to show the program running, and I have the ratio set to .56.
Here are my examples:
The background is 640x960.
Here is the code I'm using:
//Tier 1 (320x480) - works fine
//In setup.agc the width is 320x480
bksprite = CreateSprite (LoadImage ( "Bkgrd.jpg" ))
SetSpriteSize( bksprite,100,100);
SetDisplayAspect(0.66);
SetOrientationAllowed(1,0,0,0);
rem A Wizard Did It!
do
Print(GetDeviceWidth());
Print(GetDeviceHeight());
Print(GetVirtualWidth());
Print(GetVirtualHeight());
Sync()
loop
//Tier 1 (480x640) - works fine
//In setup.agc the width is 480x640
bksprite = CreateSprite (LoadImage ( "Bkgrd.jpg" ))
SetSpriteSize( bksprite,100,100);
SetDisplayAspect(0.75);
SetOrientationAllowed(1,0,0,0);
rem A Wizard Did It!
do
Print(GetDeviceWidth());
Print(GetDeviceHeight());
Print(GetVirtualWidth());
Print(GetVirtualHeight());
Sync()
loop
//Tier 1 (640x960) - doesn't work
//In setup.agc the width is 640x960
bksprite = CreateSprite (LoadImage ( "Bkgrd.jpg" ))
SetSpriteSize( bksprite,100,100);
SetDisplayAspect(0.75);
SetOrientationAllowed(1,0,0,0);
rem A Wizard Did It!
do
Print(GetDeviceWidth());
Print(GetDeviceHeight());
Print(GetVirtualWidth());
Print(GetVirtualHeight());
Sync()
loop
Tier 2 example
The width and height is 640x960, it runs in windows but doesn't fill the screen.
// Begin app, called once at the start
void app::Begin( void )
{
agk::SetSpriteSize(agk::CreateSprite (agk::LoadImage ( "pics/Bkgrd2.jpg" ) ),100.00,100.00);
agk::SetDisplayAspect(0.66);
agk::SetOrientationAllowed(1,0,0,0);
//prepare for random numbers
_millisecs = agk::GetMilliseconds();
agk::SetRandomSeed(_millisecs);
iLastPlayed=0;
LoadMP3();
GraphicImages();
//load buttons
LoadButtons();
}
// Main loop, called every frame
void app::Loop ( void )
{
UINT rndNum;
//press the escape key to exit game
if (agk::GetRawKeyPressed(27)==1)
{
//make sure music is not playing
agk::StopMusic();
exit(0);
}
agk::Print(agk::GetDeviceWidth());
agk::Print(agk::GetDeviceHeight());
agk::Print(agk::GetVirtualWidth());
agk::Print(agk::GetVirtualHeight());
agk::Sync();
}
// Called when the app ends
void app::End ( void )
{
}
And by using the percentage system, I get none of it to fill the screen in Tier 2 on the Galaxy S3. It has black borders on the top and the bottom.