2006-08-20, 15:31
this post is mostly for JMarshall. sorry to keep bringing this one up, it's just i don't like leaving things unresolved.
here's a newly modified Splash.cpp:
http://appliedcuriosity.cc/xbox/Splash.cpp
here's the relevant code:
as you can see, this version resizes to the screen's horizontal dimension and uses the aspect ratio property to handle the vertical dimension as you instructed. i believe if i understand everything correctly this means that the image will display with the correct aspect ratio in all resolutions. splash screen makers need only to make their images with 4:3 proportions, and on widescreen systems the top & bottom portions of these images will simply be off the edges of the screen. for the splash concepts i've seen this will work fine, since they're almost universally some sort of logo thing in the middle of a field.
please let me know if this is ok, and i appreciate greatly your patience in this matter.
here's a newly modified Splash.cpp:
http://appliedcuriosity.cc/xbox/Splash.cpp
here's the relevant code:
Code:
void CSplash::Process()
{
D3DGAMMARAMP newRamp;
D3DGAMMARAMP oldRamp;
g_graphicsContext.Lock();
g_graphicsContext.Get3DDevice()->Clear(0, NULL, D3DCLEAR_TARGET, 0, 0, 0);
int sw = g_graphicsContext.GetWidth();
CGUIImage* image = new CGUIImage(0, 0, 0, 0, 0, 0, m_ImageName);
image->AllocResources();
image->SetAspectRatio(CGUIImage::ASPECT_RATIO_KEEP);
image->SetTextureWidth(sw);
image->SetPosition(0,0);
// Store the old gamma ramp
please let me know if this is ok, and i appreciate greatly your patience in this matter.