[Scummvm-cvs-logs] CVS: web/include screenshots.php,NONE,1.1

Max Horn fingolfin at users.sourceforge.net
Sun Jun 26 04:21:09 CEST 2005


Update of /cvsroot/scummvm/web/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15132/include

Added Files:
	screenshots.php 
Log Message:
Reorder some screenshot stuff; make it use the new jpg thumbs

--- NEW FILE: screenshots.php ---
<?php

function screenshot_path ($id)
{
	global $file_root;
	return $file_root . "/screenshots/big_scummvm_" . $id . ".png";
}

function screenshot_thumb_path ($id)
{
	global $file_root;
	return $file_root . "/screenshots/scummvm_" . $id . ".jpg";
}

function screenshot_caption ($id)
{
	global $file_root;
	return implode("", file($file_root."/screenshots/scummvm_".$id.".txt"));
}


// Grab list of images from screenshot dir
// and loop through them and add to $screenshots array
$screenshots = array();
$tmp = get_files($file_root."/screenshots","jpg");
while (list($key,$image) = each($tmp))
{
	array_push($screenshots,$image);
}
$screenshots_count = count($screenshots);

$thumb_w = 256;
$thumb_h = 192;

?>




More information about the Scummvm-git-logs mailing list