2004-03-28, 07:39
hi all,
due to the differing resolutions that various people use, and therefore the need for displaying skins in differing resolutions, i have coded up a new system to take care of it all.
the current layout has the following structure:
<skindir>
media/
fonts/
pal/
.xml files
credits.txt
i propose to extend this by offering other subfolders for ntsc, 720p, 1080i and also pal16x9 and ntsc16x9. that will take care of all the various options.
basically the structure will change to this:
<skindir>
fonts/
pal/
pal16x9/
ntsc/
ntsc16x9/
720p/
1080i/
skin.xml
the skin.xml file will contain the current credits.txt, as well as information regarding the default resolution that xbmc should fall back on and scale if a requested resolution is not present. only one subdir actually needs to be present - the others will only be used if they are there.
the idea is that a skinner will only need to create one of the above subfolders completely - the others can be used to override the default files just like the pal/ folder currently does. xbmc then first looks in the folder corresponding to whatever resolution the gui is running in (for instance pal16x9/ ). if it doesn't find the .xml files describing the skin layout, it will fall back to the default resolution of the skin (could be pal/). once it retrieves the info, it will either display the info as is (if it found the .xml files for the correct resolution), or it will scale the .xml files to the correct resolution.
each subfolder's coordinate system depends on the resolution it represents:
pal, pal16x9: 720x576
ntsc, ntsc16x9: 720x480
720p: 1280x720
1080i: 1920x1080
this will enable skinners to get pixel perfect skins, and is also necessary due to the fact that the fonts have to be rendered based on the pixel system being used.
skinners may want to note that the pal and ntsc resolutions are not square based pixels - make sure you take the pixel aspect ratio's into account if you want nice circles etc.
the one thing i am not yet sure about is how to handle the media/ subdirectory and texture files. the current system basically searches media/ first, then the pal/media directory. this is fine, but the addition of the textures.xpr file complicates matters.
my current thoughts is that there should be just one textures.xpr file in a media/ subdir of the main skin directory. this will be generated by scanning all subdirs for there separate media/ dirs, and combining them as is currently done with the pal directory. we then attempt to load the file corresponding to the resolution we are in first, then default back to the default resolution directory if that does not work. this is pretty similar to how the pal subdir works now.
any and all comments are most welcome, from both skinners and the dev team.
cheers,
jonathan
due to the differing resolutions that various people use, and therefore the need for displaying skins in differing resolutions, i have coded up a new system to take care of it all.
the current layout has the following structure:
<skindir>
media/
fonts/
pal/
.xml files
credits.txt
i propose to extend this by offering other subfolders for ntsc, 720p, 1080i and also pal16x9 and ntsc16x9. that will take care of all the various options.
basically the structure will change to this:
<skindir>
fonts/
pal/
pal16x9/
ntsc/
ntsc16x9/
720p/
1080i/
skin.xml
the skin.xml file will contain the current credits.txt, as well as information regarding the default resolution that xbmc should fall back on and scale if a requested resolution is not present. only one subdir actually needs to be present - the others will only be used if they are there.
the idea is that a skinner will only need to create one of the above subfolders completely - the others can be used to override the default files just like the pal/ folder currently does. xbmc then first looks in the folder corresponding to whatever resolution the gui is running in (for instance pal16x9/ ). if it doesn't find the .xml files describing the skin layout, it will fall back to the default resolution of the skin (could be pal/). once it retrieves the info, it will either display the info as is (if it found the .xml files for the correct resolution), or it will scale the .xml files to the correct resolution.
each subfolder's coordinate system depends on the resolution it represents:
pal, pal16x9: 720x576
ntsc, ntsc16x9: 720x480
720p: 1280x720
1080i: 1920x1080
this will enable skinners to get pixel perfect skins, and is also necessary due to the fact that the fonts have to be rendered based on the pixel system being used.
skinners may want to note that the pal and ntsc resolutions are not square based pixels - make sure you take the pixel aspect ratio's into account if you want nice circles etc.
the one thing i am not yet sure about is how to handle the media/ subdirectory and texture files. the current system basically searches media/ first, then the pal/media directory. this is fine, but the addition of the textures.xpr file complicates matters.
my current thoughts is that there should be just one textures.xpr file in a media/ subdir of the main skin directory. this will be generated by scanning all subdirs for there separate media/ dirs, and combining them as is currently done with the pal directory. we then attempt to load the file corresponding to the resolution we are in first, then default back to the default resolution directory if that does not work. this is pretty similar to how the pal subdir works now.
any and all comments are most welcome, from both skinners and the dev team.
cheers,
jonathan