pentagram-cvs Mailing List for Pentagram
Status: Pre-Alpha
Brought to you by:
wjpalenstijn
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
(32) |
Jul
|
Aug
(44) |
Sep
(20) |
Oct
(106) |
Nov
(62) |
Dec
(124) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(18) |
Feb
(26) |
Mar
(109) |
Apr
(59) |
May
(357) |
Jun
(338) |
Jul
(160) |
Aug
(54) |
Sep
(16) |
Oct
(8) |
Nov
(11) |
Dec
(51) |
| 2004 |
Jan
(97) |
Feb
(20) |
Mar
(26) |
Apr
(94) |
May
(186) |
Jun
(110) |
Jul
(105) |
Aug
(120) |
Sep
(90) |
Oct
(98) |
Nov
(99) |
Dec
(61) |
| 2005 |
Jan
(142) |
Feb
(96) |
Mar
(138) |
Apr
(120) |
May
(90) |
Jun
(43) |
Jul
(176) |
Aug
(37) |
Sep
(6) |
Oct
(50) |
Nov
(11) |
Dec
(21) |
| 2006 |
Jan
(5) |
Feb
(76) |
Mar
(46) |
Apr
(26) |
May
(9) |
Jun
(2) |
Jul
(13) |
Aug
(6) |
Sep
(5) |
Oct
(4) |
Nov
(2) |
Dec
(11) |
| 2007 |
Jan
(26) |
Feb
(4) |
Mar
(14) |
Apr
(5) |
May
(26) |
Jun
(3) |
Jul
(4) |
Aug
(12) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(13) |
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
(19) |
Aug
(6) |
Sep
(8) |
Oct
|
Nov
(3) |
Dec
|
| 2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(11) |
Sep
(23) |
Oct
(2) |
Nov
(2) |
Dec
(1) |
| 2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(26) |
Nov
(5) |
Dec
|
| 2011 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(5) |
Nov
(11) |
Dec
(3) |
| 2012 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
(23) |
Feb
(3) |
Mar
|
Apr
(2) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <mji...@us...> - 2023-08-28 02:04:16
|
Revision: 2560
http://sourceforge.net/p/pentagram/code/2560
Author: mjimenez
Date: 2023-08-28 02:04:14 +0000 (Mon, 28 Aug 2023)
Log Message:
-----------
Update to support php 7
Modified Paths:
--------------
web/trunk/base.inc
web/trunk/class.FastTemplate.php3
web/trunk/credits.php
web/trunk/download.php
web/trunk/forum.php
web/trunk/index.php
web/trunk/screenshots.php
Modified: web/trunk/base.inc
===================================================================
--- web/trunk/base.inc 2020-04-11 16:10:32 UTC (rev 2559)
+++ web/trunk/base.inc 2023-08-28 02:04:14 UTC (rev 2560)
@@ -1,6 +1,7 @@
<?php
// Determine current file name
- if(ereg("[^/]+$", $PHP_SELF, $regs))
+ $THIS_FILE = &$_SERVER['PHP_SELF'];
+ if(preg_match("/[^\/]+$/", $THIS_FILE, $regs))
$CURRENTFILE = $regs[0];
@@ -24,7 +25,7 @@
if( !isset($MOD_DATE) )
$MOD_DATE = date("Y-m-d",filemtime($CURRENTFILE));
- if( $XHTML )
+ if( isset($XHTML) and $XHTML )
$MAIN_TEMPLATE .= "_xhtml";
@@ -36,19 +37,19 @@
$tpl->define(
array(
- main => "$MAIN_TEMPLATE.tpl",
- topic => "topic.tpl"
+ "main" => "$MAIN_TEMPLATE.tpl",
+ "topic" => "topic.tpl"
)
);
$tpl->assign(
array(
- URL => $PHP_SELF,
- MOD_DATE => $MOD_DATE,
- CURRENTFILE => $CURRENTFILE,
+ "URL" => $PHP_SELF,
+ "MOD_DATE" => $MOD_DATE,
+ "CURRENTFILE" => $CURRENTFILE,
- TITLE => $TITLE,
- GUARDIAN => $GUARDIAN
+ "TITLE" => $TITLE,
+ "GUARDIAN" => $GUARDIAN
)
);
@@ -56,7 +57,7 @@
if (!$CUSTOM_PARSE )
{
add_topic($HEADLINE,$CONTENT);
- $tpl->parse(MAIN, "main");
+ $tpl->parse("MAIN", "main");
$tpl->FastPrint();
exit;
}
@@ -67,10 +68,10 @@
$tpl->assign(
array(
- HEADLINE => $headline
+ "HEADLINE" => $headline
)
);
- $tpl->parse(TOPICS,".topic");
+ $tpl->parse("TOPICS",".topic");
}
function add_topic( $headline, $content )
@@ -79,10 +80,10 @@
$tpl->assign(
array(
- HEADLINE => $headline,
- CONTENT => $content
+ "HEADLINE" => $headline,
+ "CONTENT" => $content
)
);
- $tpl->parse(TOPICS,".topic");
+ $tpl->parse("TOPICS",".topic");
}
?>
Modified: web/trunk/class.FastTemplate.php3
===================================================================
--- web/trunk/class.FastTemplate.php3 2020-04-11 16:10:32 UTC (rev 2559)
+++ web/trunk/class.FastTemplate.php3 2023-08-28 02:04:14 UTC (rev 2560)
@@ -51,7 +51,13 @@
} // end (new) FastTemplate ()
+ function __construct ($pathToTemplates = "")
+ {
+ $this->FastTemplate($pathToTemplates);
+ } // end (new) FastTemplate ()
+
+
// ************************************************************
// All templates will be loaded from this "root" directory
// Can be changed in mid-process by re-calling with a new
@@ -104,7 +110,7 @@
$usec = (double)$time[0];
$sec = (double)$time[1];
return $sec + $usec;
- }
+ }
// **************************************************************
// Strict template checking, if true sends warnings to STDOUT when
@@ -141,7 +147,7 @@
}
// ************************************************************
-// Grabs a template from the root dir and
+// Grabs a template from the root dir and
// reads it into a (potentially REALLY) big string
function get_template ($template)
@@ -171,7 +177,7 @@
function show_unknowns ($Line)
{
$unknown = array();
- if (ereg("({[A-Z0-9_]+})",$Line,$unknown))
+ if (preg_match("/({[A-Z0-9_]+})/",$Line,$unknown))
{
$UnkVar = $unknown[1];
if(!(empty($UnkVar)))
@@ -187,7 +193,7 @@
function parse_template ($template, $tpl_array)
{
- while ( list ($key,$val) = each ($tpl_array) )
+ foreach ($tpl_array as $key => $val)
{
if (!(empty($key)))
{
@@ -198,7 +204,7 @@
// php4 doesn't like '{$' combinations.
$key = '{'."$key".'}';
- $template = ereg_replace("$key","$val","$template");
+ $template = preg_replace("/$key/","$val","$template");
//$template = str_replace("$key","$val","$template");
}
}
@@ -207,15 +213,15 @@
{
// Silently remove anything not already found
- $template = ereg_replace("{([A-Z0-9_]+)}","",$template);
+ $template = preg_replace("/{([A-Z0-9_]+)}/","",$template);
}
else
{
// Warn about unresolved template variables
- if (ereg("({[A-Z0-9_]+})",$template))
+ if (preg_match("/({[A-Z0-9_]+})/",$template))
{
- $unknown = split("\n",$template);
- while (list ($Element,$Line) = each($unknown) )
+ $unknown = explode("\n",$template);
+ foreach ($unknown as $Element => $Line)
{
$UnkVar = $Line;
if(!(empty($UnkVar)))
@@ -242,7 +248,7 @@
{
unset($this->$ReturnVar); // Clear any previous data
- while ( list ( $key , $val ) = each ( $FileTags ) )
+ foreach ($FileTags as $key => $val)
{
if ( (!isset($this->$val)) || (empty($this->$val)) )
{
@@ -296,7 +302,7 @@
}
}
- if($append)
+ if(!empty($this->$ReturnVar) and $append)
{
$this->$ReturnVar .= $this->parse_template($this->$val,$this->PARSEVARS);
}
@@ -372,7 +378,7 @@
// The file must already be in memory.
$ParentTag = $this->DYNAMIC["$Macro"];
- if( (!$this->$ParentTag) or (empty($this->$ParentTag)) )
+ if( empty($this->$ParentTag) or (!$this->$ParentTag) )
{
$fileName = $this->FILELIST[$ParentTag];
$this->$ParentTag = $this->get_template($fileName);
@@ -381,13 +387,13 @@
if($this->$ParentTag)
{
$template = $this->$ParentTag;
- $DataArray = split("\n",$template);
+ $DataArray = explode("\n",$template);
$newMacro = "";
$newParent = "";
$outside = true;
$start = false;
$end = false;
- while ( list ($lineNum,$lineData) = each ($DataArray) )
+ foreach ($DataArray as $lineNum => $lineData)
{
$lineTest = trim($lineData);
if("<!-- BEGIN DYNAMIC BLOCK: $Macro -->" == "$lineTest" )
@@ -453,12 +459,12 @@
if($this->$ParentTag)
{
$template = $this->$ParentTag;
- $DataArray = split("\n",$template);
+ $DataArray = explode("\n",$template);
$newParent = "";
$outside = true;
$start = false;
$end = false;
- while ( list ($lineNum,$lineData) = each ($DataArray) )
+ foreach ($DataArray as $lineNum => $lineData)
{
$lineTest = trim($lineData);
if("<!-- BEGIN DYNAMIC BLOCK: $Macro -->" == "$lineTest" )
@@ -499,7 +505,7 @@
function define ($fileList)
{
- while ( list ($FileTag,$FileName) = each ($fileList) )
+ foreach ($fileList as $FileTag => $FileName)
{
$this->FILELIST["$FileTag"] = $FileName;
}
@@ -521,7 +527,7 @@
if(!empty($ReturnVar))
{
- if( (gettype($ReturnVar)) != "array")
+ if(!is_array($ReturnVar))
{
unset($this->$ReturnVar);
return;
@@ -528,7 +534,7 @@
}
else
{
- while ( list ($key,$val) = each ($ReturnVar) )
+ foreach ($ReturnVar as $key => $val)
{
unset($this->$val);
}
@@ -538,7 +544,7 @@
// Empty - clear all of them
- while ( list ( $key,$val) = each ($this->HANDLE) )
+ foreach ($this->HANDLE as $key => $val)
{
$KEY = $key;
unset($this->$KEY);
@@ -574,7 +580,7 @@
{
// Clear ALL fileHandles
- while ( list ($key, $val) = each ($this->LOADED) )
+ foreach ($this->LOADED as $key => $val)
{
unset($this->$key);
}
@@ -584,7 +590,7 @@
}
else
{
- if( (gettype($fileHandle)) != "array")
+ if(!is_array($fileHandle))
{
if( (isset($this->$fileHandle)) || (!empty($this->$fileHandle)) )
{
@@ -595,10 +601,10 @@
}
else
{
- while ( list ($Key, $Val) = each ($fileHandle) )
+ foreach ($fileHandle as $key => $val)
{
- unset($this->LOADED[$Key]);
- unset($this->$Key);
+ unset($this->LOADED[$key]);
+ unset($this->$key);
}
return true;
}
@@ -618,7 +624,7 @@
return;
}
- if( (gettype($Files)) != "array")
+ if(!is_array($FileTag))
{
unset($this->FILELIST[$FileTag]);
return;
@@ -625,7 +631,7 @@
}
else
{
- while ( list ( $Tag, $Val) = each ($FileTag) )
+ foreach ($FileTag as $Tag => $Val)
{
unset($this->FILELIST[$Tag]);
}
@@ -647,7 +653,7 @@
{
if(!(empty($this->PARSEVARS)))
{
- while(list($Ref,$Val) = each ($this->PARSEVARS) )
+ foreach ($this->PARSEVARS as $Ref => $Val)
{
unset($this->PARSEVARS["$Ref"]);
}
@@ -667,7 +673,7 @@
}
else
{
- while (list ($Ref,$val) = each ($href) )
+ foreach ($href as $Ref => $val)
{
unset($this->PARSEVARS[$Ref]);
}
@@ -689,7 +695,7 @@
{
if(gettype($tpl_array) == "array")
{
- while ( list ($key,$val) = each ($tpl_array) )
+ foreach ($tpl_array as $key => $val)
{
if (!(empty($key)))
{
@@ -724,7 +730,7 @@
else
{
return false;
- }
+ }
}
// ************************************************************
@@ -732,7 +738,7 @@
function error ($errorMsg, $die = 0)
{
$this->ERROR = $errorMsg;
- echo "ERROR: $this->ERROR <BR> \n";
+ echo "ERROR: $this->ERROR <br/> \n";
if ($die == 1)
{
exit;
@@ -751,4 +757,4 @@
} // End class.FastTemplate.php3
-?>
+?>
\ No newline at end of file
Modified: web/trunk/credits.php
===================================================================
--- web/trunk/credits.php 2020-04-11 16:10:32 UTC (rev 2559)
+++ web/trunk/credits.php 2023-08-28 02:04:14 UTC (rev 2560)
@@ -11,7 +11,7 @@
add_topic("Pentagram Team", join("", file ("content/team.dat")));
add_topic("Special Thanks to", join("", file ("content/credits.dat")));
- $tpl->parse(MAIN, "main");
+ $tpl->parse("MAIN", "main");
$tpl->FastPrint();
exit;
?>
Modified: web/trunk/download.php
===================================================================
--- web/trunk/download.php 2020-04-11 16:10:32 UTC (rev 2559)
+++ web/trunk/download.php 2023-08-28 02:04:14 UTC (rev 2560)
@@ -8,12 +8,12 @@
$tpl->define(
array(
- download => "download.tpl",
- empty_tpl => "empty.tpl",
- section => "download_section.tpl",
- d_entry => "download_entry.tpl",
- s_entry => "snapshot_entry.tpl",
- d_link => "download_link.tpl"
+ "download" => "download.tpl",
+ "empty_tpl" => "empty.tpl",
+ "section" => "download_section.tpl",
+ "d_entry" => "download_entry.tpl",
+ "s_entry" => "snapshot_entry.tpl",
+ "d_link" => "download_link.tpl"
)
);
@@ -21,9 +21,9 @@
// very easy to change and maintain
include("content/download.dat");
- $tpl->parse(CONTENT, "download");
+ $tpl->parse("CONTENT", "download");
add_topic_headline($HEADLINE);
- $tpl->parse(MAIN, "main");
+ $tpl->parse("MAIN", "main");
$tpl->FastPrint();
exit;
@@ -35,7 +35,7 @@
// Set the name of the current section
$tpl->assign(
array(
- SECTION_TITLE => $section
+ "SECTION_TITLE" => $section
)
);
}
@@ -45,10 +45,10 @@
global $tpl;
// Write out the section
- $tpl->parse(DOWNLOAD_SECTIONS,".section");
+ $tpl->parse("DOWNLOAD_SECTIONS",".section");
// Close the section entries list, in preparation for the new section
- $tpl->parse(SECTION_ENTRIES,"empty_tpl");
+ $tpl->parse("SECTION_ENTRIES","empty_tpl");
}
function add_extern_entry( $file, $desc, $size )
@@ -57,12 +57,12 @@
$tpl->assign(
array(
- FILENAME => $file,
- DESCRIPTION => $desc,
- SIZE => $size
+ "FILENAME" => $file,
+ "DESCRIPTION" => $desc,
+ "SIZE" => $size
)
);
- $tpl->parse(SECTION_ENTRIES,".d_entry");
+ $tpl->parse("SECTION_ENTRIES",".d_entry");
}
function add_extern_link( $url, $desc )
@@ -71,11 +71,11 @@
$tpl->assign(
array(
- URL => $url,
- DESCRIPTION => $desc
+ "URL" => $url,
+ "DESCRIPTION" => $desc
)
);
- $tpl->parse(SECTION_ENTRIES,".d_link");
+ $tpl->parse("SECTION_ENTRIES",".d_link");
}
function add_local_entry( $file, $desc )
@@ -85,14 +85,14 @@
if (file_exists("snapshots/$file")) {
$tpl->assign(
array(
- FILENAME => $file,
- DESCRIPTION => $desc,
- FILE_TIME => date("H:i",filemtime("snapshots/$file")),
- FILE_DATE => date("Y-m-d",filemtime("snapshots/$file")),
- SIZE => ceil(filesize("snapshots/$file")/1024)
+ "FILENAME" => $file,
+ "DESCRIPTION" => $desc,
+ "FILE_TIME" => date("H:i",filemtime("snapshots/$file")),
+ "FILE_DATE" => date("Y-m-d",filemtime("snapshots/$file")),
+ "SIZE" => ceil(filesize("snapshots/$file")/1024)
)
);
- $tpl->parse(SECTION_ENTRIES,".s_entry");
+ $tpl->parse("SECTION_ENTRIES",".s_entry");
}
}
?>
Modified: web/trunk/forum.php
===================================================================
--- web/trunk/forum.php 2020-04-11 16:10:32 UTC (rev 2559)
+++ web/trunk/forum.php 2023-08-28 02:04:14 UTC (rev 2560)
@@ -9,7 +9,7 @@
add_topic("Pentagram Forum", join("", file ("content/forum.dat")));
- $tpl->parse(MAIN, "main");
+ $tpl->parse("MAIN", "main");
$tpl->FastPrint();
exit;
?>
Modified: web/trunk/index.php
===================================================================
--- web/trunk/index.php 2020-04-11 16:10:32 UTC (rev 2559)
+++ web/trunk/index.php 2023-08-28 02:04:14 UTC (rev 2560)
@@ -12,7 +12,7 @@
add_topic("What is it?", join("", file ("content/intro.dat")));
add_topic("What's the status?", join("", file("content/status.dat")));
add_topic("News", join("", file ("content/news.dat")));
- $tpl->parse(MAIN, "main");
+ $tpl->parse("MAIN", "main");
$tpl->FastPrint();
exit;
?>
Modified: web/trunk/screenshots.php
===================================================================
--- web/trunk/screenshots.php 2020-04-11 16:10:32 UTC (rev 2559)
+++ web/trunk/screenshots.php 2023-08-28 02:04:14 UTC (rev 2560)
@@ -9,8 +9,8 @@
$tpl->define(
array(
- screenshots => "screenshots.tpl",
- entry => "screenshot.tpl"
+ "screenshots" => "screenshots.tpl",
+ "entry" => "screenshot.tpl"
)
);
@@ -18,9 +18,9 @@
// dirty trick to seperate data and content a bit ;)
include("content/screenshots.dat");
- $tpl->parse(CONTENT, "screenshots");
+ $tpl->parse("CONTENT", "screenshots");
add_topic_headline($HEADLINE);
- $tpl->parse(MAIN, "main");
+ $tpl->parse("MAIN", "main");
$tpl->FastPrint();
exit;
@@ -31,12 +31,12 @@
$tpl->assign(
array(
- FILENAME => $file,
- WIDTH => $width,
- HEIGHT => $height,
- DESCRIPTION => $desc
+ "FILENAME" => $file,
+ "WIDTH" => $width,
+ "HEIGHT" => $height,
+ "DESCRIPTION" => $desc
)
);
- $tpl->parse(ENTRIES,".entry");
+ $tpl->parse("ENTRIES",".entry");
}
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2020-04-11 16:10:33
|
Revision: 2559
http://sourceforge.net/p/pentagram/code/2559
Author: dominus
Date: 2020-04-11 16:10:32 +0000 (Sat, 11 Apr 2020)
Log Message:
-----------
fixed some spelling mistakes
Modified Paths:
--------------
web/trunk/content/news.dat
Modified: web/trunk/content/news.dat
===================================================================
--- web/trunk/content/news.dat 2020-04-11 14:32:27 UTC (rev 2558)
+++ web/trunk/content/news.dat 2020-04-11 16:10:32 UTC (rev 2559)
@@ -1,6 +1,6 @@
<table width="100%">
<tr><td width="20%" valign="top"><b>11 April 2020</b><br></td><td>
- After yers of stagnation Pentagram became a subengine of
+ After years of stagnation Pentagram became a subengine of
<a href="https://www.scummvm.org">ScummVM</a> and is already
experiencing many bugfixes. It's not yet in an official ScummVM
release but you can follow its progress on
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2020-04-11 14:32:29
|
Revision: 2558
http://sourceforge.net/p/pentagram/code/2558
Author: dominus
Date: 2020-04-11 14:32:27 +0000 (Sat, 11 Apr 2020)
Log Message:
-----------
Pentagram is now a subengine of ScummVM
Modified Paths:
--------------
web/trunk/content/news.dat
web/trunk/content/status.dat
web/trunk/templates/main.tpl
Modified: web/trunk/content/news.dat
===================================================================
--- web/trunk/content/news.dat 2020-04-11 14:31:45 UTC (rev 2557)
+++ web/trunk/content/news.dat 2020-04-11 14:32:27 UTC (rev 2558)
@@ -1,4 +1,14 @@
<table width="100%">
+ <tr><td width="20%" valign="top"><b>11 April 2020</b><br></td><td>
+ After yers of stagnation Pentagram became a subengine of
+ <a href="https://www.scummvm.org">ScummVM</a> and is already
+ experiencing many bugfixes. It's not yet in an official ScummVM
+ release but you can follow its progress on
+ <a href="https://github.com/scummvm/scummvm">GitHub</a>.</br>
+ We hope that Ultima 8 gets all the love it needs on ScummVM and maybe,
+ just maybe someone decides to take on the Crusader games.
+ </td></tr>
+
<tr><td width="20%" valign="top"><b>6 January 2013</b><br></td><td>
Further bugfixes this week include two issues with collision detection
that could let objects move through walls, and a bug with loading
Modified: web/trunk/content/status.dat
===================================================================
--- web/trunk/content/status.dat 2020-04-11 14:31:45 UTC (rev 2557)
+++ web/trunk/content/status.dat 2020-04-11 14:32:27 UTC (rev 2558)
@@ -1,17 +1,17 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
+ Pentagram is now a subengine of ScummVM, so development is
+ happening at ScummVM and no longer here.
+ <br/><br/>
While it is currently possible to finish Ultima 8 using
- Pentagram, not everything is fully working yet.
+ Pentagram/ScummVM, not everything is fully working yet.
(Save regularly!)
In the game itself, most notably, the combat AI of monsters
is still very limited, and there are still quite a few
minor things which are not working as well as they should.
- <br/><br/>
- Outside of the game, installation and setup of
- Pentagram still require manual configuration. We hope to
- eliminate most of this in the future.<br/>
- <div style="text-align: right"><small>(Last modified: 9 May 2007)</small></div>
+ <br/>
+ <div style="text-align: right"><small>(Last modified: 11 April 2020)</small></div>
</td>
</tr>
Modified: web/trunk/templates/main.tpl
===================================================================
--- web/trunk/templates/main.tpl 2020-04-11 14:31:45 UTC (rev 2557)
+++ web/trunk/templates/main.tpl 2020-04-11 14:32:27 UTC (rev 2558)
@@ -65,7 +65,7 @@
</p>-->
</div>
<div id="TitleBar">
- <img src="images/pent.png" alt="Pentagram" /><br />
+ <img src="images/pent-scummvm.png" alt="Pentagram" /><br />
<i class="guardian">{GUARDIAN}</i>
</div>
<div id="Page">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2020-04-11 14:31:47
|
Revision: 2557
http://sourceforge.net/p/pentagram/code/2557
Author: dominus
Date: 2020-04-11 14:31:45 +0000 (Sat, 11 Apr 2020)
Log Message:
-----------
Add Pentagram logo with ScummVM pasted on top of it
Added Paths:
-----------
web/trunk/images/pent-scummvm.png
Added: web/trunk/images/pent-scummvm.png
===================================================================
(Binary files differ)
Index: web/trunk/images/pent-scummvm.png
===================================================================
--- web/trunk/images/pent-scummvm.png 2015-10-06 17:45:31 UTC (rev 2556)
+++ web/trunk/images/pent-scummvm.png 2020-04-11 14:31:45 UTC (rev 2557)
Property changes on: web/trunk/images/pent-scummvm.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2015-10-06 17:45:33
|
Revision: 2556
http://sourceforge.net/p/pentagram/code/2556
Author: dominus
Date: 2015-10-06 17:45:31 +0000 (Tue, 06 Oct 2015)
Log Message:
-----------
Hopefully now using the min/max OS X version correctly
Modified Paths:
--------------
pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp
Modified: pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp
===================================================================
--- pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp 2014-08-31 21:20:39 UTC (rev 2555)
+++ pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp 2015-10-06 17:45:31 UTC (rev 2556)
@@ -83,7 +83,7 @@
RequireNoErr(NewAUGraph(&_auGraph));
AUNode outputNode, synthNode;
// OS X 10.5 SDK doesn't know AudioComponentDescription desc;
-#if USE_DEPRECATED_COREAUDIO_API || (MAC_OS_X_VERSION_MIN_REQUIRED <= 1050)
+#if USE_DEPRECATED_COREAUDIO_API || (MAC_OS_X_VERSION_MAX_ALLOWED <= 1050)
ComponentDescription desc;
#else
AudioComponentDescription desc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2014-08-31 21:20:47
|
Revision: 2555
http://sourceforge.net/p/pentagram/code/2555
Author: dominus
Date: 2014-08-31 21:20:39 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
clang compatible .d file handling
Modified Paths:
--------------
pentagram/trunk/Makefile.in
Modified: pentagram/trunk/Makefile.in
===================================================================
--- pentagram/trunk/Makefile.in 2014-08-30 20:13:46 UTC (rev 2554)
+++ pentagram/trunk/Makefile.in 2014-08-31 21:20:39 UTC (rev 2555)
@@ -146,7 +146,7 @@
# custom compile rule which calculates dependencies
%.o: %.cpp $(PCHEADER)
@$(MKDIR) $(*D)/$(DEPDIR)
- $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(WARNINGS) $(CPPFLAGS) $(CXXFLAGS) $(SDL_CFLAGS) -c -o $@ $<
+ $(CXX) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP $(WARNINGS) $(CPPFLAGS) $(CXXFLAGS) $(SDL_CFLAGS) -c -o $@ $<
# cancel any built-in .m->.o rules
%.o: %.m
@@ -154,12 +154,12 @@
# custom compile rule which calculates dependencies
%.o: %.m $(PCHEADER)
@$(MKDIR) $(*D)/$(DEPDIR)
- $(CC) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(WARNINGS) $(CPPFLAGS) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $<
+ $(CC) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP $(WARNINGS) $(CPPFLAGS) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $<
# custom compile rule for the precompiled header
%.h.gch: %.h
@$(MKDIR) $(*D)/$(DEPDIR)
- $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).h.gch.d",-MQ,"$@",-MP $(WARNINGS) $(CPPFLAGS) $(CXXFLAGS) $(SDL_CFLAGS) -x c++-header -c -o $@ $<
+ $(CXX) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).h.gch.d" -MQ "$@" -MP $(WARNINGS) $(CPPFLAGS) $(CXXFLAGS) $(SDL_CFLAGS) -x c++-header -c -o $@ $<
# rule to rebuild Makefile if necessary
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2014-08-30 20:13:55
|
Revision: 2554
http://sourceforge.net/p/pentagram/code/2554
Author: dominus
Date: 2014-08-30 20:13:46 +0000 (Sat, 30 Aug 2014)
Log Message:
-----------
Newest codesign on OS X doesn't accept files in the bundle root
Modified Paths:
--------------
pentagram/trunk/module.mk
Modified: pentagram/trunk/module.mk
===================================================================
--- pentagram/trunk/module.mk 2014-05-09 22:37:28 UTC (rev 2553)
+++ pentagram/trunk/module.mk 2014-08-30 20:13:46 UTC (rev 2554)
@@ -78,6 +78,7 @@
bundle: pentagram$(EXEEXT)
mkdir -p $(bundle_name)/Contents/MacOS
mkdir -p $(bundle_name)/Contents/Resources/
+ mkdir -p $(bundle_name)/Contents/Documents
echo "APPL????" > $(bundle_name)/Contents/PkgInfo
$(INSTALL_DATA) system/macosx/Info.plist $(bundle_name)/Contents/
$(INSTALL_PROGRAM) pentagram$(EXEEXT) $(bundle_name)/Contents/MacOS/
@@ -87,10 +88,10 @@
$(INSTALL_DATA) $(top_srcdir)/data/*.png $(bundle_name)/Contents/Resources/
$(INSTALL_DATA) $(top_srcdir)/data/*.ttf $(bundle_name)/Contents/Resources/
$(INSTALL_DATA) $(top_srcdir)/data/*.txt $(bundle_name)/Contents/Resources/
- $(INSTALL_DATA) $(top_srcdir)/AUTHORS $(bundle_name)
- $(INSTALL_DATA) $(top_srcdir)/COPYING $(bundle_name)
- $(INSTALL_DATA) $(top_srcdir)/FAQ $(bundle_name)
- $(INSTALL_DATA) $(top_srcdir)/README $(bundle_name)
+ $(INSTALL_DATA) $(top_srcdir)/AUTHORS $(bundle_name)/Contents/Documents
+ $(INSTALL_DATA) $(top_srcdir)/COPYING $(bundle_name)/Contents/Documents
+ $(INSTALL_DATA) $(top_srcdir)/FAQ $(bundle_name)/Contents/Documents
+ $(INSTALL_DATA) $(top_srcdir)/README $(bundle_name)/Contents/Documents
ifneq ($(OSX_CODE_SIGNATURE),)
codesign -f -s "$(OSX_CODE_SIGNATURE)" $(bundle_name)
endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2014-05-09 22:37:30
|
Revision: 2553
http://sourceforge.net/p/pentagram/code/2553
Author: dominus
Date: 2014-05-09 22:37:28 +0000 (Fri, 09 May 2014)
Log Message:
-----------
On OS X if you have more than one MIDI device (real as in more than one Roland device or software as in MUNT) you can now tell Pentagram which one to use via setting coremidi_device in pentagram.ini. Stdout prints the device IDs and names when you use the CoreMidi midi driver.
Thanks to Qbix of DOSBox and Digitall of ScummVM for most of the code.
Modified Paths:
--------------
pentagram/trunk/ChangeLog
pentagram/trunk/audio/midi/CoreMidiDriver.cpp
Modified: pentagram/trunk/ChangeLog
===================================================================
--- pentagram/trunk/ChangeLog 2013-06-22 20:32:50 UTC (rev 2552)
+++ pentagram/trunk/ChangeLog 2014-05-09 22:37:28 UTC (rev 2553)
@@ -1,3 +1,11 @@
+2014-05-10 Dominik Reichardt <do...@us...>
+ * audio/midi/CoreMidiDriver.cpp: On OS X if you have more than one
+ MIDI device (real as in more than one Roland device or software as
+ in MUNT) you can now tell Pentagram which one to use via setting
+ coremidi_device in pentagram.ini. Stdout prints the device IDs and
+ names when you use the CoreMidi midi driver. Thanks to Qbix of DOSBox
+ and Digitall of ScummVM for most of the code.
+
2013-04-05 Dominik Reichardt <do...@us...>
* audio/midi/CoreAudioMidiDriver.*: backported changes from ScummVM
and Exult.
Modified: pentagram/trunk/audio/midi/CoreMidiDriver.cpp
===================================================================
--- pentagram/trunk/audio/midi/CoreMidiDriver.cpp 2013-06-22 20:32:50 UTC (rev 2552)
+++ pentagram/trunk/audio/midi/CoreMidiDriver.cpp 2014-05-09 22:37:28 UTC (rev 2553)
@@ -22,8 +22,6 @@
#ifdef USE_CORE_MIDI
-//#include <pthread.h>
-//#include <sched.h>
#include <iomanip>
using namespace std;
@@ -53,10 +51,40 @@
mOutPort = 0;
int dests = MIDIGetNumberOfDestinations();
- if (dests > 0 && mClient) {
- mDest = MIDIGetDestination(0);
+
+ // List device ID and names of CoreMidi destinations
+ // kMIDIPropertyDisplayName is not compatible with OS X SDK < 10.4
+ pout << "CoreMidi driver found " << dests << " destinations:" << std::endl;
+ for(int i = 0; i < dests; i++) {
+ MIDIEndpointRef dest = MIDIGetDestination(i);
+ std::string destname = "Unknown / Invalid";
+ if (dest) {
+ CFStringRef midiname = 0;
+ if(MIDIObjectGetStringProperty(dest, kMIDIPropertyDisplayName, &midiname) == noErr) {
+ const char *s = CFStringGetCStringPtr(midiname, kCFStringEncodingMacRoman);
+ if (s)
+ destname = std::string(s);
+ }
+ }
+ pout << i << ": " << destname.c_str() << endl;
+ }
+
+ std::string deviceIdStr;
+ deviceIdStr = getConfigSetting("coremidi_device", "");
+ int deviceId = 0;
+ deviceId = atoi(deviceIdStr.c_str());
+
+ // Default to the first CoreMidi device (ID 0)
+ // when the device ID in the cfg isn't possible anymore
+ if (deviceId < 0 || deviceId >= dests ){
+ pout << "CoreMidi destination " << deviceId << " not available, trying destination 0 instead." << std::endl;
+ deviceId = 0;
+ }
+
+ if (dests > deviceId && mClient) {
+ mDest = MIDIGetDestination(deviceId);
err = MIDIOutputPortCreate( mClient,
- CFSTR("exult_output_port"),
+ CFSTR("pentagram_output_port"),
&mOutPort);
} else {
return 3;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2013-06-22 20:32:54
|
Revision: 2552
http://sourceforge.net/p/pentagram/code/2552
Author: dominus
Date: 2013-06-22 20:32:50 +0000 (Sat, 22 Jun 2013)
Log Message:
-----------
added $(REVISION) variable for versioning the OS X snapshot disk images
Modified Paths:
--------------
pentagram/trunk/module.mk
Modified: pentagram/trunk/module.mk
===================================================================
--- pentagram/trunk/module.mk 2013-06-18 09:28:07 UTC (rev 2551)
+++ pentagram/trunk/module.mk 2013-06-22 20:32:50 UTC (rev 2552)
@@ -109,7 +109,7 @@
CpMac -r $(bundle_name) ./pentagram-snapshot/
hdiutil create -ov -format UDZO -imagekey zlib-level=9 -fs HFS+ \
-srcfolder pentagram-snapshot \
- -volname "Pentagram snapshot" \
+ -volname "Pentagram snapshot$(REVISION)" \
Pentagram.dmg
rm -rf pentagram-snapshot
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2013-06-18 09:28:10
|
Revision: 2551
http://sourceforge.net/p/pentagram/code/2551
Author: dominus
Date: 2013-06-18 09:28:07 +0000 (Tue, 18 Jun 2013)
Log Message:
-----------
Xcode 5 clang needs MAC_OS_X_VERSION_MIN_REQUIRED instead of MAC_OS_X_VERSION_MAX_ALLOWED to compile CoreAudioMidi correctly
Modified Paths:
--------------
pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp
Modified: pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp
===================================================================
--- pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp 2013-04-05 19:56:01 UTC (rev 2550)
+++ pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp 2013-06-18 09:28:07 UTC (rev 2551)
@@ -83,7 +83,7 @@
RequireNoErr(NewAUGraph(&_auGraph));
AUNode outputNode, synthNode;
// OS X 10.5 SDK doesn't know AudioComponentDescription desc;
-#if USE_DEPRECATED_COREAUDIO_API || (MAC_OS_X_VERSION_MAX_ALLOWED < 1060)
+#if USE_DEPRECATED_COREAUDIO_API || (MAC_OS_X_VERSION_MIN_REQUIRED <= 1050)
ComponentDescription desc;
#else
AudioComponentDescription desc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2013-04-05 19:56:09
|
Revision: 2550
http://pentagram.svn.sourceforge.net/pentagram/?rev=2550&view=rev
Author: dominus
Date: 2013-04-05 19:56:01 +0000 (Fri, 05 Apr 2013)
Log Message:
-----------
No double checking for the soundfont entry in the config
Modified Paths:
--------------
pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp
Modified: pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp
===================================================================
--- pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp 2013-04-05 00:44:54 UTC (rev 2549)
+++ pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp 2013-04-05 19:56:01 UTC (rev 2550)
@@ -73,7 +73,8 @@
int CoreAudioMidiDriver::open() {
OSStatus err = noErr;
- SettingManager* setting = SettingManager::get_instance();
+ //getting the soundfont config entry
+ std::string soundfont = getConfigSetting("soundfont", "");
if (_auGraph)
return 1;
@@ -125,45 +126,43 @@
#endif
// Load custom soundfont, if specified
- if (setting->exists("soundfont")){
- std::string soundfont = getConfigSetting("soundfont", "");
- if (soundfont != "") {
- pout << "Loading CoreAudio SoundFont '" << soundfont << "'" << std::endl;
- OSErr err;
+ if (soundfont != "") {
+ pout << "Loading CoreAudio SoundFont '" << soundfont << "'" << std::endl;
+ OSErr err;
#if USE_DEPRECATED_COREAUDIO_API
- FSRef fsref;
- err = FSPathMakeRef(reinterpret_cast<const UInt8 *>(soundfont.c_str()), &fsref, NULL);
- if (!err) {
- err = AudioUnitSetProperty(
- _synth, kMusicDeviceProperty_SoundBankFSRef,
- kAudioUnitScope_Global, 0, &fsref, sizeof(fsref));
- }
+ FSRef fsref;
+ err = FSPathMakeRef(reinterpret_cast<const UInt8 *>(soundfont.c_str()), &fsref, NULL);
+ if (!err) {
+ err = AudioUnitSetProperty(
+ _synth, kMusicDeviceProperty_SoundBankFSRef,
+ kAudioUnitScope_Global, 0, &fsref, sizeof(fsref));
+ }
#else
- // kMusicDeviceProperty_SoundBankFSSpec is present on 10.6+, but broken
- // kMusicDeviceProperty_SoundBankURL was added in 10.5 as a replacement
- CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,
- reinterpret_cast<const UInt8 *>(soundfont.c_str()),
- soundfont.size(), false);
- if (url) {
- err = AudioUnitSetProperty(
- _synth, kMusicDeviceProperty_SoundBankURL,
- kAudioUnitScope_Global, 0, &url, sizeof(url));
- CFRelease(url);
- } else {
- pout << "Failed to allocate CFURLRef from '" << soundfont << "'" << std::endl;
- }
-#endif
- if (!err) {
- pout << "Loaded CoreAudio SoundFont!" << std::endl;
- } else {
- pout << "Error loading CoreAudio SoundFont '" << soundfont << "'" << std::endl;
- // after trying and failing to load a soundfont it's better
- // to fail initializing the CoreAudio driver or it might crash
- return 1;
- }
+ // kMusicDeviceProperty_SoundBankFSSpec is present on 10.6+, but broken
+ // kMusicDeviceProperty_SoundBankURL was added in 10.5 as a replacement
+ CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,
+ reinterpret_cast<const UInt8 *>(soundfont.c_str()),
+ soundfont.size(), false);
+ if (url) {
+ err = AudioUnitSetProperty(
+ _synth, kMusicDeviceProperty_SoundBankURL,
+ kAudioUnitScope_Global, 0, &url, sizeof(url));
+ CFRelease(url);
} else {
- pout << "CoreAudio SoundFont Path Error" << std::endl;
+ pout << "Failed to allocate CFURLRef from '" << soundfont << "'" << std::endl;
}
+#endif
+ if (!err) {
+ pout << "Loaded CoreAudio SoundFont!" << std::endl;
+ } else {
+ pout << "Error loading CoreAudio SoundFont '" << soundfont << "'" << std::endl;
+ // after trying and failing to load a soundfont it's better
+ // to fail initializing the CoreAudio driver or it might crash
+ return 1;
+ }
+ } else {
+ pout << "No soundfont in the soundfont config entry!" << std::endl;
+ pout << "Continuing with CoreAudio default." << std::endl;
}
// Finally: Start the graph!
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2013-04-05 00:45:01
|
Revision: 2549
http://pentagram.svn.sourceforge.net/pentagram/?rev=2549&view=rev
Author: dominus
Date: 2013-04-05 00:44:54 +0000 (Fri, 05 Apr 2013)
Log Message:
-----------
backported CoreAudio changes from ScummVM and Exult.
Modified Paths:
--------------
pentagram/trunk/ChangeLog
pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp
pentagram/trunk/audio/midi/CoreAudioMidiDriver.h
Modified: pentagram/trunk/ChangeLog
===================================================================
--- pentagram/trunk/ChangeLog 2013-02-11 22:17:25 UTC (rev 2548)
+++ pentagram/trunk/ChangeLog 2013-04-05 00:44:54 UTC (rev 2549)
@@ -1,3 +1,7 @@
+2013-04-05 Dominik Reichardt <do...@us...>
+ * audio/midi/CoreAudioMidiDriver.*: backported changes from ScummVM
+ and Exult.
+
2013-01-06 Willem Jan Palenstijn <wjp...@us...>
* misc/Console.cpp: Fix crash when using removed console commands
Modified: pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp
===================================================================
--- pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp 2013-02-11 22:17:25 UTC (rev 2548)
+++ pentagram/trunk/audio/midi/CoreAudioMidiDriver.cpp 2013-04-05 00:44:54 UTC (rev 2549)
@@ -1,5 +1,8 @@
/*
-Copyright (C) 2003-2009 The Pentagram Team
+Code originally written by Max Horn for ScummVM,
+later improvements by Matthew Hoops,
+minor tweaks by various other people of the ScummVM, Pentagram
+and Exult teams.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -18,6 +21,7 @@
#include "pent_include.h"
#include "CoreAudioMidiDriver.h"
+#include "SettingManager.h"
#ifdef USE_CORE_AUDIO_MIDI
@@ -26,194 +30,190 @@
#include <iostream>
-// Enable the following switch to make ScummVM try to use native MIDI hardware
-// on your computer for MIDI output. This is currently quite hackish, in
-// particular you have no way to specify which device is used (it just always
-// uses the first output device it can find), nor is there a switch to
-// force it to use the soft synth instead of the MIDI HW.
-//#define ENABLE_HACKISH_NATIVE_MIDI_SUPPORT 1
+// With the release of Mac OS X 10.5 in October 2007, Apple deprecated the
+// AUGraphNewNode & AUGraphGetNodeInfo APIs in favor of the new AUGraphAddNode &
+// AUGraphNodeInfo APIs. While it is easy to switch to those, it breaks
+// compatibility with all pre-10.5 systems.
+//
+// Since 10.5 was the last system to support PowerPC, we use the old, deprecated
+// APIs on PowerPC based systems by default. On all other systems (such as Mac
+// OS X running on Intel hardware, or iOS running on ARM), we use the new API by
+// default.
+//
+// This leaves Mac OS X 10.4 running on x86 processors as the only system
+// combination that this code will not support by default. It seems quite
+// reasonable to assume that anybody with an Intel system has since then moved
+// on to a newer Mac OS X release. But if for some reason you absolutely need to
+// build an x86 version of this code using the old, deprecated API, you can
+// simply do so by manually enable the USE_DEPRECATED_COREAUDIO_API switch (e.g.
+// by adding setting it suitably in CPPFLAGS).
+#if !defined(USE_DEPRECATED_COREAUDIO_API)
+# if TARGET_CPU_PPC || TARGET_CPU_PPC64
+# define USE_DEPRECATED_COREAUDIO_API 1
+# else
+# define USE_DEPRECATED_COREAUDIO_API 0
+# endif
+#endif
+// A macro to simplify error handling a bit.
+#define RequireNoErr(error) \
+do { \
+err = error; \
+if (err != noErr) \
+goto bail; \
+} while (false)
+
const MidiDriver::MidiDriverDesc CoreAudioMidiDriver::desc =
MidiDriver::MidiDriverDesc ("CoreAudio", createInstance);
-CoreAudioMidiDriver::CoreAudioMidiDriver() :
- au_MusicDevice(0), au_output(0),
- mClient(0), mOutPort(0), mDest(0)
-{
- OSStatus err;
- err = MIDIClientCreate(CFSTR("Pentagram MIDI Driver for OS X"), NULL, NULL, &mClient);
+CoreAudioMidiDriver::CoreAudioMidiDriver() :
+ _auGraph(0) {
+ }
-}
-
-CoreAudioMidiDriver::~CoreAudioMidiDriver()
-{
- if (mClient)
- MIDIClientDispose(mClient);
- mClient = 0;
-}
-
-int CoreAudioMidiDriver::open()
-{
- if (au_output || mDest)
+int CoreAudioMidiDriver::open() {
+ OSStatus err = noErr;
+ SettingManager* setting = SettingManager::get_instance();
+
+ if (_auGraph)
return 1;
- OSStatus err = noErr;
+ // Open the Music Device.
+ RequireNoErr(NewAUGraph(&_auGraph));
+ AUNode outputNode, synthNode;
+ // OS X 10.5 SDK doesn't know AudioComponentDescription desc;
+#if USE_DEPRECATED_COREAUDIO_API || (MAC_OS_X_VERSION_MAX_ALLOWED < 1060)
+ ComponentDescription desc;
+#else
+ AudioComponentDescription desc;
+#endif
+
+ // The default output device
+ desc.componentType = kAudioUnitType_Output;
+ desc.componentSubType = kAudioUnitSubType_DefaultOutput;
+ desc.componentManufacturer = kAudioUnitManufacturer_Apple;
+ desc.componentFlags = 0;
+ desc.componentFlagsMask = 0;
+#if USE_DEPRECATED_COREAUDIO_API
+ RequireNoErr(AUGraphNewNode(_auGraph, &desc, 0, NULL, &outputNode));
+#else
+ RequireNoErr(AUGraphAddNode(_auGraph, &desc, &outputNode));
+#endif
- mOutPort = 0;
-#ifdef ENABLE_HACKISH_NATIVE_MIDI_SUPPORT
- int dests = MIDIGetNumberOfDestinations();
- if (dests > 0 && mClient) {
- mDest = MIDIGetDestination(0);
- err = MIDIOutputPortCreate( mClient,
- CFSTR("scummvm_output_port"),
- &mOutPort);
- }
+ // The built-in default (softsynth) music device
+ desc.componentType = kAudioUnitType_MusicDevice;
+ desc.componentSubType = kAudioUnitSubType_DLSSynth;
+ desc.componentManufacturer = kAudioUnitManufacturer_Apple;
+#if USE_DEPRECATED_COREAUDIO_API
+ RequireNoErr(AUGraphNewNode(_auGraph, &desc, 0, NULL, &synthNode));
+#else
+ RequireNoErr(AUGraphAddNode(_auGraph, &desc, &synthNode));
#endif
- if (err != noErr || !mOutPort) {
- AudioUnitConnection auconnect;
- ComponentDescription compdesc;
- Component compid;
+ // Connect the softsynth to the default output
+ RequireNoErr(AUGraphConnectNodeInput(_auGraph, synthNode, 0, outputNode, 0));
- // Open the Music Device
- compdesc.componentType = kAudioUnitType_MusicDevice;
- compdesc.componentSubType = kAudioUnitSubType_DLSSynth;
- compdesc.componentManufacturer = kAudioUnitManufacturer_Apple;
- compdesc.componentFlags = 0;
- compdesc.componentFlagsMask = 0;
- compid = FindNextComponent(NULL, &compdesc);
- au_MusicDevice = static_cast<AudioUnit>(OpenComponent(compid));
+ // Open and initialize the whole graph
+ RequireNoErr(AUGraphOpen(_auGraph));
+ RequireNoErr(AUGraphInitialize(_auGraph));
- // open the output unit
- au_output = static_cast<AudioUnit>(OpenDefaultComponent(kAudioUnitType_Output, kAudioUnitSubType_DefaultOutput));
+ // Get the music device from the graph.
+#if USE_DEPRECATED_COREAUDIO_API
+ RequireNoErr(AUGraphGetNodeInfo(_auGraph, synthNode, NULL, NULL, NULL, &_synth));
+#else
+ RequireNoErr(AUGraphNodeInfo(_auGraph, synthNode, NULL, &_synth));
+#endif
- // connect the units
- auconnect.sourceAudioUnit = au_MusicDevice;
- auconnect.sourceOutputNumber = 0;
- auconnect.destInputNumber = 0;
- err =
- AudioUnitSetProperty(au_output, kAudioUnitProperty_MakeConnection,
- kAudioUnitScope_Input, 0,
- static_cast<void*>(&auconnect),
- sizeof(AudioUnitConnection));
-
- // initialize the units
- AudioUnitInitialize(au_MusicDevice);
- AudioUnitInitialize(au_output);
-
- // load a soundfont
- std::string soundfont = getConfigSetting("soundfont", "");
- pout << "Loading CoreAudio SoundFont '" << soundfont << "'... ";
- if (soundfont != "") {
- FSRef soundfontRef;
- err = FSPathMakeRef((const UInt8*)soundfont.c_str(),
- &soundfontRef, NULL);
- if (!err) {
- err = AudioUnitSetProperty(
- au_MusicDevice,
- kMusicDeviceProperty_SoundBankFSRef,
- kAudioUnitScope_Global,
- 0,
- &soundfontRef,
- sizeof(soundfontRef)
- );
+ // Load custom soundfont, if specified
+ if (setting->exists("soundfont")){
+ std::string soundfont = getConfigSetting("soundfont", "");
+ if (soundfont != "") {
+ pout << "Loading CoreAudio SoundFont '" << soundfont << "'" << std::endl;
+ OSErr err;
+#if USE_DEPRECATED_COREAUDIO_API
+ FSRef fsref;
+ err = FSPathMakeRef(reinterpret_cast<const UInt8 *>(soundfont.c_str()), &fsref, NULL);
if (!err) {
+ err = AudioUnitSetProperty(
+ _synth, kMusicDeviceProperty_SoundBankFSRef,
+ kAudioUnitScope_Global, 0, &fsref, sizeof(fsref));
+ }
+#else
+ // kMusicDeviceProperty_SoundBankFSSpec is present on 10.6+, but broken
+ // kMusicDeviceProperty_SoundBankURL was added in 10.5 as a replacement
+ CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,
+ reinterpret_cast<const UInt8 *>(soundfont.c_str()),
+ soundfont.size(), false);
+ if (url) {
+ err = AudioUnitSetProperty(
+ _synth, kMusicDeviceProperty_SoundBankURL,
+ kAudioUnitScope_Global, 0, &url, sizeof(url));
+ CFRelease(url);
+ } else {
+ pout << "Failed to allocate CFURLRef from '" << soundfont << "'" << std::endl;
+ }
+#endif
+ if (!err) {
pout << "Loaded CoreAudio SoundFont!" << std::endl;
} else {
- pout << "Error loading CoreAudio SoundFont" << std::endl;
+ pout << "Error loading CoreAudio SoundFont '" << soundfont << "'" << std::endl;
+ // after trying and failing to load a soundfont it's better
+ // to fail initializing the CoreAudio driver or it might crash
+ return 1;
}
} else {
pout << "CoreAudio SoundFont Path Error" << std::endl;
}
}
-
- // start the output
- AudioOutputUnitStart(au_output);
- }
- return 0;
-}
+ // Finally: Start the graph!
+ RequireNoErr(AUGraphStart(_auGraph));
-void CoreAudioMidiDriver::close()
-{
- if (mOutPort && mDest) {
- MIDIPortDispose(mOutPort);
- mOutPort = 0;
- mDest = 0;
- } else {
- // Stop the output
- AudioOutputUnitStop(au_output);
-
- // Cleanup
- CloseComponent(au_output);
- au_output = 0;
- CloseComponent(au_MusicDevice);
- au_MusicDevice = 0;
+ return 0;
+
+bail:
+ if (_auGraph) {
+ AUGraphStop(_auGraph);
+ DisposeAUGraph(_auGraph);
+ _auGraph = 0;
+ }
+ return 0;
+}
+
+void CoreAudioMidiDriver::close() {
+ // Stop the output
+ if (_auGraph) {
+ AUGraphStop(_auGraph);
+ DisposeAUGraph(_auGraph);
+ _auGraph = 0;
}
}
-void CoreAudioMidiDriver::send(uint32 message)
-{
+void CoreAudioMidiDriver::send(uint32 message) {
uint8 status_byte = (message & 0x000000FF);
uint8 first_byte = (message & 0x0000FF00) >> 8;
uint8 second_byte = (message & 0x00FF0000) >> 16;
- if (mOutPort && mDest) {
- MIDIPacketList packetList;
- MIDIPacket *packet = &packetList.packet[0];
-
- packetList.numPackets = 1;
-
- packet->timeStamp = 0;
- packet->length = 3;
- packet->data[0] = status_byte;
- packet->data[1] = first_byte;
- packet->data[2] = second_byte;
-
- MIDISend(mOutPort, mDest, &packetList);
- } else {
- assert(au_output != NULL);
- assert(au_MusicDevice != NULL);
- MusicDeviceMIDIEvent(au_MusicDevice, status_byte, first_byte, second_byte, 0);
- }
+ assert(_auGraph != NULL);
+ MusicDeviceMIDIEvent(_synth, status_byte, first_byte, second_byte, 0);
}
-void CoreAudioMidiDriver::send_sysex (uint8 status, const uint8 *msg, uint16 length)
-{
+
+void CoreAudioMidiDriver::send_sysex(uint8 status, const uint8 *msg, uint16 length) {
uint8 buf[384];
- if (mOutPort && mDest) {
- MIDIPacketList *packetList = (MIDIPacketList *)buf;
- MIDIPacket *packet = packetList->packet;
+ assert(sizeof(buf) >= static_cast<size_t>(length) + 2);
+ assert(_auGraph != NULL);
- assert(sizeof(buf) >= sizeof(UInt32) + sizeof(MIDITimeStamp) + sizeof(UInt16) + length + 2);
-
- packetList->numPackets = 1;
+ // Add SysEx frame
+ buf[0] = status;
+ memcpy(buf + 1, msg, length);
+ buf[length + 1] = 0xF7;
- packet->timeStamp = 0;
-
- // Add SysEx frame
- packet->length = length + 2;
- packet->data[0] = status;
- memcpy(packet->data + 1, msg, length);
- packet->data[length + 1] = 0xF7;
-
- MIDISend(mOutPort, mDest, packetList);
- } else {
- assert(sizeof(buf) >= (size_t)length + 2);
- assert(au_output != NULL);
- assert(au_MusicDevice != NULL);
+ MusicDeviceSysEx(_synth, buf, length + 2);
+}
- // Add SysEx frame
- buf[0] = status;
- memcpy(buf+1, msg, length);
- buf[length+1] = 0xF7;
- MusicDeviceSysEx(au_MusicDevice, buf, length + 2);
- }
-}
-
void CoreAudioMidiDriver::increaseThreadPriority()
{
pthread_t self;
Modified: pentagram/trunk/audio/midi/CoreAudioMidiDriver.h
===================================================================
--- pentagram/trunk/audio/midi/CoreAudioMidiDriver.h 2013-02-11 22:17:25 UTC (rev 2548)
+++ pentagram/trunk/audio/midi/CoreAudioMidiDriver.h 2013-04-05 00:44:54 UTC (rev 2549)
@@ -1,5 +1,7 @@
/*
-Copyright (C) 2003-2009 The Pentagram Team
+Code originally written by Max Horn for ScummVM,
+minor tweaks by various other people of the ScummVM, Pentagram
+and Exult teams.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +18,7 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#ifndef COREAUDIOMIDIDRIVER_H_INCLUDED
#define COREAUDIOMIDIDRIVER_H_INCLUDED
@@ -24,19 +27,14 @@
#include "LowLevelMidiDriver.h"
-#include <AudioUnit/AudioUnit.h>
-#include <CoreMIDI/CoreMIDI.h>
+#include <AudioToolbox/AUGraph.h>
#include <CoreServices/CoreServices.h>
class CoreAudioMidiDriver : public LowLevelMidiDriver
{
- AudioUnit au_MusicDevice;
- AudioUnit au_output;
+ AUGraph _auGraph;
+ AudioUnit _synth;
- MIDIClientRef mClient;
- MIDIPortRef mOutPort;
- MIDIEndpointRef mDest;
-
static const MidiDriverDesc desc;
static MidiDriver *createInstance() {
return new CoreAudioMidiDriver();
@@ -46,7 +44,6 @@
static const MidiDriverDesc* getDesc() { return &desc; }
CoreAudioMidiDriver();
- ~CoreAudioMidiDriver();
protected:
virtual int open();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sha...@us...> - 2013-02-11 22:17:32
|
Revision: 2548
http://pentagram.svn.sourceforge.net/pentagram/?rev=2548&view=rev
Author: shadowchaser
Date: 2013-02-11 22:17:25 +0000 (Mon, 11 Feb 2013)
Log Message:
-----------
Added information about two previously unknown fields
Modified Paths:
--------------
pentagram/trunk/docs/u8gfxfmt.txt
Modified: pentagram/trunk/docs/u8gfxfmt.txt
===================================================================
--- pentagram/trunk/docs/u8gfxfmt.txt 2013-02-02 00:28:08 UTC (rev 2547)
+++ pentagram/trunk/docs/u8gfxfmt.txt 2013-02-11 22:17:25 UTC (rev 2548)
@@ -40,7 +40,11 @@
--- Type chunk ---
Offset Size Description
- 0 4 ??? Unknown ???
+ 0 2 In u8fonts.flx and u8mouse.shp, contains the maximum frame width
+ (in u8shapes.flx, appears to contain the shape number for shapes 842, 843, 844, and 845)
+ (appears to be '1' in all other cases)
+ 0 2 In u8fonts.flx and u8mouse.shp, contains the maximum frame height
+ (appears to be '1' in all other cases)
4 2 Number of frames in this type (f)
6 f*6 Frame information chunks
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ki...@us...> - 2013-02-02 00:28:15
|
Revision: 2547
http://pentagram.svn.sourceforge.net/pentagram/?rev=2547&view=rev
Author: kirben
Date: 2013-02-02 00:28:08 +0000 (Sat, 02 Feb 2013)
Log Message:
-----------
Minor changes to Makefile.mingw for easier reading.
Modified Paths:
--------------
pentagram/trunk/Makefile.mingw
Modified: pentagram/trunk/Makefile.mingw
===================================================================
--- pentagram/trunk/Makefile.mingw 2013-02-01 11:48:03 UTC (rev 2546)
+++ pentagram/trunk/Makefile.mingw 2013-02-02 00:28:08 UTC (rev 2547)
@@ -23,15 +23,16 @@
SDL_CFLAGS=-I$(SRC)/sdl/include
SDL_LIBS=-L$(SRC)/sdl/lib -lSDLmain -lSDL -lSDL_ttf
-CPPFLAGS=-DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_INTP=4 -I$(SRC) -I$(SRC)/conf -I$(SRC)/convert -I$(SRC)/filesys \
- -I$(SRC)/filesys/zip -I$(SRC)/graphics -I$(SRC)/graphics/fonts -I$(SRC)/graphics/scalers -I$(SRC)/gumps -I$(SRC)/kernel \
- -I$(SRC)/misc -I$(SRC)/tools/compile -I$(SRC)/tools/disasm \
+CPPFLAGS=-DVERSION=\"$(VERSION)\" -DBUILTIN_DATA -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_INTP=4 \
+ -DCOMPILE_ALL_BILINEAR_SCALERS -DCOMPILE_GAMMA_CORRECT_SCALERS \
+ -DHAVE_SYS_STAT_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H \
+ -DUSE_FLUIDSYNTH_MIDI -DUSE_FMOPL_MIDI -DUSE_HQ2X_SCALER -DUSE_HQ3X_SCALER -DUSE_HQ4X_SCALER \
+ -I$(SRC) -I$(SRC)/audio -I$(SRC)/audio/midi -I$(SRC)/audio/timidity -I$(SRC)/conf \
+ -I$(SRC)/convert -I$(SRC)/filesys -I$(SRC)/filesys/zip -I$(SRC)/games -I$(SRC)/graphics \
+ -I$(SRC)/graphics/fonts -I$(SRC)/graphics/scalers -I$(SRC)/gumps -I$(SRC)/gumps/widgets \
+ -I$(SRC)/kernel -I$(SRC)/misc -I$(SRC)/tools/compile -I$(SRC)/tools/disasm \
-I$(SRC)/tools/flexpack -I$(SRC)/tools/fold -I$(SRC)/usecode -I$(SRC)/world \
- -I$(SRC)/world/actors -I$(SRC)/gumps/widgets -I$(SRC)/games \
- -I$(SRC)/audio -I$(SRC)/audio/midi -I$(SRC)/audio/timidity \
- $(SDL_CFLAGS) -DHAVE_SYS_STAT_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H -DBUILTIN_DATA -DUSE_FLUIDSYNTH_MIDI -DUSE_FMOPL_MIDI \
- -DCOMPILE_ALL_BILINEAR_SCALERS -DCOMPILE_GAMMA_CORRECT_SCALERS -DUSE_HQ2X_SCALER -DUSE_HQ3X_SCALER -DUSE_HQ4X_SCALER \
- -DVERSION=\"$(VERSION)\" $(GTK_INCLUDES) $(GIMP_INCLUDES)
+ -I$(SRC)/world/actors $(SDL_CFLAGS) $(GTK_INCLUDES) $(GIMP_INCLUDES)
CXXFLAGS=-O2
CXX=g++
CFLAGS=-O2
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2013-02-01 11:48:10
|
Revision: 2546
http://pentagram.svn.sourceforge.net/pentagram/?rev=2546&view=rev
Author: dominus
Date: 2013-02-01 11:48:03 +0000 (Fri, 01 Feb 2013)
Log Message:
-----------
with newer Xcode versions these tools *should* be in the path
Modified Paths:
--------------
pentagram/trunk/module.mk
Modified: pentagram/trunk/module.mk
===================================================================
--- pentagram/trunk/module.mk 2013-01-20 00:44:07 UTC (rev 2545)
+++ pentagram/trunk/module.mk 2013-02-01 11:48:03 UTC (rev 2546)
@@ -105,8 +105,8 @@
cp $(top_srcdir)/COPYING ./pentagram-snapshot/License
cp $(top_srcdir)/README ./pentagram-snapshot/ReadMe
cp $(top_srcdir)/FAQ ./pentagram-snapshot/FAQ
- /Developer/Tools/SetFile -t ttro -c ttxt ./pentagram-snapshot/*
- /Developer/Tools/CpMac -r $(bundle_name) ./pentagram-snapshot/
+ SetFile -t ttro -c ttxt ./pentagram-snapshot/*
+ CpMac -r $(bundle_name) ./pentagram-snapshot/
hdiutil create -ov -format UDZO -imagekey zlib-level=9 -fs HFS+ \
-srcfolder pentagram-snapshot \
-volname "Pentagram snapshot" \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ki...@us...> - 2013-01-20 00:44:13
|
Revision: 2545
http://pentagram.svn.sourceforge.net/pentagram/?rev=2545&view=rev
Author: kirben
Date: 2013-01-20 00:44:07 +0000 (Sun, 20 Jan 2013)
Log Message:
-----------
Add win32 resource file to clean target for mingw builds.
Modified Paths:
--------------
pentagram/trunk/Makefile.mingw
Modified: pentagram/trunk/Makefile.mingw
===================================================================
--- pentagram/trunk/Makefile.mingw 2013-01-06 20:49:46 UTC (rev 2544)
+++ pentagram/trunk/Makefile.mingw 2013-01-20 00:44:07 UTC (rev 2545)
@@ -29,7 +29,7 @@
-I$(SRC)/tools/flexpack -I$(SRC)/tools/fold -I$(SRC)/usecode -I$(SRC)/world \
-I$(SRC)/world/actors -I$(SRC)/gumps/widgets -I$(SRC)/games \
-I$(SRC)/audio -I$(SRC)/audio/midi -I$(SRC)/audio/timidity \
- $(SDL_CFLAGS) -DHAVE_SYS_STAT_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H -DBUILTIN_DATA -DUSE_FLUIDSYNTH_MIDI -DUSE_FMOPL_MIDI \
+ $(SDL_CFLAGS) -DHAVE_SYS_STAT_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H -DBUILTIN_DATA -DUSE_FLUIDSYNTH_MIDI -DUSE_FMOPL_MIDI \
-DCOMPILE_ALL_BILINEAR_SCALERS -DCOMPILE_GAMMA_CORRECT_SCALERS -DUSE_HQ2X_SCALER -DUSE_HQ3X_SCALER -DUSE_HQ4X_SCALER \
-DVERSION=\"$(VERSION)\" $(GTK_INCLUDES) $(GIMP_INCLUDES)
CXXFLAGS=-O2
@@ -109,7 +109,7 @@
gimp-plugin: pentshp.exe
clean:
- rm -f $(PENTAGRAM_OBJS) pentagram.o data/data.h tools/data2c/data2c.o
+ rm -f $(PENTAGRAM_OBJS) pentagram.o pentagramico.o data/data.h tools/data2c/data2c.o
toolsclean:
rm -f tools/amf2mod/amf2mod.o tools/data2c/data2c.o tools/disasm/Disasm.o $(FLEXPACK_OBJCS) tools/fold/Fold.o $(FOLD_OBJCS) tools/shapeconv/ShapeConv.o *.exe $(PENTSHP_OBJCS) tools/gimp-plugin/pentshp.exe
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wjp...@us...> - 2013-01-06 20:49:53
|
Revision: 2544
http://pentagram.svn.sourceforge.net/pentagram/?rev=2544&view=rev
Author: wjpalenstijn
Date: 2013-01-06 20:49:46 +0000 (Sun, 06 Jan 2013)
Log Message:
-----------
Fix crash when using removed console commands
See bug #3599293.
Modified Paths:
--------------
pentagram/trunk/ChangeLog
pentagram/trunk/misc/Console.cpp
Modified: pentagram/trunk/ChangeLog
===================================================================
--- pentagram/trunk/ChangeLog 2013-01-06 19:29:10 UTC (rev 2543)
+++ pentagram/trunk/ChangeLog 2013-01-06 20:49:46 UTC (rev 2544)
@@ -1,3 +1,6 @@
+2013-01-06 Willem Jan Palenstijn <wjp...@us...>
+ * misc/Console.cpp: Fix crash when using removed console commands
+
2013-01-05 Willem Jan Palenstijn <wjp...@us...>
* world/actors/AnimationTracker.cpp: Do a sweepTest for large steps
* audio/*: Try to reduce clipping
Modified: pentagram/trunk/misc/Console.cpp
===================================================================
--- pentagram/trunk/misc/Console.cpp 2013-01-06 19:29:10 UTC (rev 2543)
+++ pentagram/trunk/misc/Console.cpp 2013-01-06 20:49:46 UTC (rev 2544)
@@ -596,7 +596,7 @@
it = ConsoleCommands.find(argv[0]);
- if (it != ConsoleCommands.end())
+ if (it != ConsoleCommands.end() && it->second)
it->second(argv);
else
pout << "Unknown command: " << argv[0] << std::endl;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wjp...@us...> - 2013-01-06 19:29:17
|
Revision: 2543
http://pentagram.svn.sourceforge.net/pentagram/?rev=2543&view=rev
Author: wjpalenstijn
Date: 2013-01-06 19:29:10 +0000 (Sun, 06 Jan 2013)
Log Message:
-----------
Update update script for 'new' SF filesystem
Modified Paths:
--------------
web/trunk/update.sh
Modified: web/trunk/update.sh
===================================================================
--- web/trunk/update.sh 2013-01-06 19:27:16 UTC (rev 2542)
+++ web/trunk/update.sh 2013-01-06 19:29:10 UTC (rev 2543)
@@ -4,7 +4,5 @@
svn update
echo "Fixing permissions"
-chmod -f -R g+rw .
-chmod -f -R o+rX .
-chgrp -R pentagram .
+chmod -f -R go+rX .
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wjp...@us...> - 2013-01-06 19:27:23
|
Revision: 2542
http://pentagram.svn.sourceforge.net/pentagram/?rev=2542&view=rev
Author: wjpalenstijn
Date: 2013-01-06 19:27:16 +0000 (Sun, 06 Jan 2013)
Log Message:
-----------
News update
Modified Paths:
--------------
web/trunk/content/news.dat
Modified: web/trunk/content/news.dat
===================================================================
--- web/trunk/content/news.dat 2013-01-05 19:11:47 UTC (rev 2541)
+++ web/trunk/content/news.dat 2013-01-06 19:27:16 UTC (rev 2542)
@@ -1,11 +1,21 @@
<table width="100%">
+ <tr><td width="20%" valign="top"><b>6 January 2013</b><br></td><td>
+ Further bugfixes this week include two issues with collision detection
+ that could let objects move through walls, and a bug with loading
+ savegames that had a small chance of producing weird behaviour for
+ certain saves. Another visible change is that cheats are now disabled
+ by default. They can be re-enabled by adding <b>cheat=true</b> to
+ the config file.
+ </td></tr>
+
<tr><td width="20%" valign="top"><b>3 January 2013</b><br></td><td>
We started this year with a fix of an eight year old bug causing
gradual object leaks. This bug would eventually have unpredictable
symptoms including missing objects, broken menus and crashes. Savegames
- where this leak has not yet reached a critical level will now be
+ where this leak has not yet reached a critical level will now be
automatically repaired when loading them.
</td></tr>
+
<tr><td width="20%" valign="top"><b>22 April 2012</b><br></td><td>
Ultima 8 is now available for sale from <a href="http://www.gog.com/en/gamecard/ultima_8_gold_edition">GOG.com</a>! Initial tests show that Pentagram supports it without any problems.
</td></tr>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wjp...@us...> - 2013-01-05 19:11:53
|
Revision: 2541
http://pentagram.svn.sourceforge.net/pentagram/?rev=2541&view=rev
Author: wjpalenstijn
Date: 2013-01-05 19:11:47 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Let cheat mode control more cheats
Modified Paths:
--------------
pentagram/trunk/ChangeLog
pentagram/trunk/games/U8Game.cpp
pentagram/trunk/world/actors/MainActor.cpp
pentagram/trunk/world/actors/QuickAvatarMoverProcess.cpp
Modified: pentagram/trunk/ChangeLog
===================================================================
--- pentagram/trunk/ChangeLog 2013-01-05 18:47:25 UTC (rev 2540)
+++ pentagram/trunk/ChangeLog 2013-01-05 19:11:47 UTC (rev 2541)
@@ -1,13 +1,13 @@
2013-01-05 Willem Jan Palenstijn <wjp...@us...>
* world/actors/AnimationTracker.cpp: Do a sweepTest for large steps
+ * audio/*: Try to reduce clipping
+ * *: Add 'cheat' config key to control cheat mode
2013-01-04 Willem Jan Palenstijn <wjp...@us...>
* world/CurrentMap.cpp: fix touching object detection in sweepTest
2013-01-03 Willem Jan Palenstijn <wjp...@us...>
* gumps/ControlGump.cpp: fix description of QuickLoad in control gump
-
-2013-01-03 Willem Jan Palenstijn <wjp...@us...>
* kernel/ObjectManager.cpp: Fix objID leak caused by DONT_SAVE gumps.
2013-01-02 Willem Jan Palenstijn <wjp...@us...>
Modified: pentagram/trunk/games/U8Game.cpp
===================================================================
--- pentagram/trunk/games/U8Game.cpp 2013-01-05 18:47:25 UTC (rev 2540)
+++ pentagram/trunk/games/U8Game.cpp 2013-01-05 19:11:47 UTC (rev 2541)
@@ -149,6 +149,10 @@
void U8Game::ConCmd_cheatItems(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) {
+ pout << "Cheats are disabled" << std::endl;
+ return;
+ }
MainActor* av = getMainActor();
if (!av) return;
Container* backpack = getContainer(av->getEquip(7)); // CONSTANT!
@@ -293,6 +297,10 @@
void U8Game::ConCmd_cheatEquip(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) {
+ pout << "Cheats are disabled" << std::endl;
+ return;
+ }
MainActor* av = getMainActor();
if (!av) return;
Container* backpack = getContainer(av->getEquip(7)); // CONSTANT!
Modified: pentagram/trunk/world/actors/MainActor.cpp
===================================================================
--- pentagram/trunk/world/actors/MainActor.cpp 2013-01-05 18:47:25 UTC (rev 2540)
+++ pentagram/trunk/world/actors/MainActor.cpp 2013-01-05 19:11:47 UTC (rev 2541)
@@ -342,6 +342,10 @@
void MainActor::ConCmd_teleport(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) {
+ pout << "Cheats are disabled" << std::endl;
+ return;
+ }
MainActor* mainactor = getMainActor();
int curmap = mainactor->getMapNum();
@@ -401,6 +405,10 @@
void MainActor::ConCmd_recall(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) {
+ pout << "Cheats are disabled" << std::endl;
+ return;
+ }
if (argv.size() == 1) {
pout << "Usage: recall <mark>: recall to named mark" << std::endl;
return;
@@ -439,6 +447,10 @@
void MainActor::ConCmd_maxstats(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) {
+ pout << "Cheats are disabled" << std::endl;
+ return;
+ }
MainActor* mainactor = getMainActor();
// constants!!
@@ -454,6 +466,10 @@
void MainActor::ConCmd_heal(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) {
+ pout << "Cheats are disabled" << std::endl;
+ return;
+ }
MainActor* mainactor = getMainActor();
mainactor->setHP(mainactor->getMaxHP());
@@ -716,6 +732,10 @@
void MainActor::ConCmd_toggleInvincibility(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) {
+ pout << "Cheats are disabled" << std::endl;
+ return;
+ }
MainActor* av = getMainActor();
if (av->getActorFlags() & Actor::ACT_INVINCIBLE) {
Modified: pentagram/trunk/world/actors/QuickAvatarMoverProcess.cpp
===================================================================
--- pentagram/trunk/world/actors/QuickAvatarMoverProcess.cpp 2013-01-05 18:47:25 UTC (rev 2540)
+++ pentagram/trunk/world/actors/QuickAvatarMoverProcess.cpp 2013-01-05 19:11:47 UTC (rev 2541)
@@ -199,30 +199,36 @@
void QuickAvatarMoverProcess::ConCmd_startMoveUp(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) return;
QuickAvatarMoverProcess::startMover(-64,-64,0,0);
}
void QuickAvatarMoverProcess::ConCmd_startMoveDown(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) return;
QuickAvatarMoverProcess::startMover(+64,+64,0,1);
}
void QuickAvatarMoverProcess::ConCmd_startMoveLeft(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) return;
QuickAvatarMoverProcess::startMover(-64,+64,0,2);
}
void QuickAvatarMoverProcess::ConCmd_startMoveRight(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) return;
QuickAvatarMoverProcess::startMover(+64,-64,0,3);
}
void QuickAvatarMoverProcess::ConCmd_startAscend(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) return;
QuickAvatarMoverProcess::startMover(0,0,8,4);
}
void QuickAvatarMoverProcess::ConCmd_startDescend(const Console::ArgvType &argv){
+ if (!GUIApp::get_instance()->areCheatsEnabled()) return;
QuickAvatarMoverProcess::startMover(0,0,-8,5);
}
@@ -262,6 +268,7 @@
void QuickAvatarMoverProcess::ConCmd_toggleClipping(const Console::ArgvType &argv)
{
+ if (!GUIApp::get_instance()->areCheatsEnabled()) return;
QuickAvatarMoverProcess::toggleClipping();
pout << "QuickAvatarMoverProcess::clipping = " << QuickAvatarMoverProcess::isClipping() << std::endl;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wjp...@us...> - 2013-01-05 18:47:33
|
Revision: 2540
http://pentagram.svn.sourceforge.net/pentagram/?rev=2540&view=rev
Author: wjpalenstijn
Date: 2013-01-05 18:47:25 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Make cheat mode optional
It is controlled by the 'cheat' config entry, and currently only
controls usecode-based cheats.
There is now also a Cheat::toggle console command.
Modified Paths:
--------------
pentagram/trunk/games/RemorseGame.cpp
pentagram/trunk/games/U8Game.cpp
pentagram/trunk/kernel/GUIApp.cpp
pentagram/trunk/kernel/GUIApp.h
pentagram/trunk/usecode/u8intrinsics.h
Modified: pentagram/trunk/games/RemorseGame.cpp
===================================================================
--- pentagram/trunk/games/RemorseGame.cpp 2013-01-05 17:54:55 UTC (rev 2539)
+++ pentagram/trunk/games/RemorseGame.cpp 2013-01-05 18:47:25 UTC (rev 2540)
@@ -40,7 +40,6 @@
settingman->setDefault("skipstart", false);
settingman->setDefault("endgame", false);
settingman->setDefault("footsteps", true);
- settingman->setDefault("cheat", true);
settingman->setDefault("textdelay", 5);
}
Modified: pentagram/trunk/games/U8Game.cpp
===================================================================
--- pentagram/trunk/games/U8Game.cpp 2013-01-05 17:54:55 UTC (rev 2539)
+++ pentagram/trunk/games/U8Game.cpp 2013-01-05 18:47:25 UTC (rev 2540)
@@ -48,7 +48,6 @@
settingman->setDefault("endgame", false);
settingman->setDefault("quotes", false);
settingman->setDefault("footsteps", true);
- settingman->setDefault("cheat", true);
settingman->setDefault("targetedjump", true);
GameInfo* info = GUIApp::get_instance()->getGameInfo();
Modified: pentagram/trunk/kernel/GUIApp.cpp
===================================================================
--- pentagram/trunk/kernel/GUIApp.cpp 2013-01-05 17:54:55 UTC (rev 2539)
+++ pentagram/trunk/kernel/GUIApp.cpp 2013-01-05 18:47:25 UTC (rev 2540)
@@ -146,7 +146,8 @@
painting(false), showTouching(false), mouseX(0), mouseY(0),
defMouse(0), flashingcursor(0),
mouseOverGump(0), dragging(DRAG_NOT), dragging_offsetX(0),
- dragging_offsetY(0), inversion(0), timeOffset(0), has_cheated(false),
+ dragging_offsetY(0), inversion(0), timeOffset(0),
+ has_cheated(false), cheats_enabled(false),
drawRenderStats(false), ttfoverrides(false), audiomixer(0)
{
application = this;
@@ -485,6 +486,7 @@
con.AddConsoleCommand("Cheat::maxstats", MainActor::ConCmd_maxstats);
con.AddConsoleCommand("Cheat::heal", MainActor::ConCmd_heal);
con.AddConsoleCommand("Cheat::toggleInvincibility", MainActor::ConCmd_toggleInvincibility);
+ con.AddConsoleCommand("Cheat::toggle", GUIApp::ConCmd_toggleCheatMode);
con.AddConsoleCommand("MainActor::name", MainActor::ConCmd_name);
con.AddConsoleCommand("MovieGump::play", MovieGump::ConCmd_play);
con.AddConsoleCommand("MusicProcess::playMusic", MusicProcess::ConCmd_playMusic);
@@ -555,6 +557,9 @@
settingman->setDefault("interpolate", true);
settingman->get("interpolate", interpolate);
+ settingman->setDefault("cheat", false);
+ settingman->get("cheat", cheats_enabled);
+
game->loadFiles();
gamedata->setupFontOverrides();
@@ -659,6 +664,7 @@
con.RemoveConsoleCommand(MainActor::ConCmd_maxstats);
con.RemoveConsoleCommand(MainActor::ConCmd_heal);
con.RemoveConsoleCommand(MainActor::ConCmd_toggleInvincibility);
+ con.RemoveConsoleCommand(GUIApp::ConCmd_toggleCheatMode);
con.RemoveConsoleCommand(MainActor::ConCmd_name);
con.RemoveConsoleCommand(MovieGump::ConCmd_play);
con.RemoveConsoleCommand(MusicProcess::ConCmd_playMusic);
@@ -2634,6 +2640,13 @@
g->getDesktopGump()->CloseItemDependents();
}
+void GUIApp::ConCmd_toggleCheatMode(const Console::ArgvType &argv)
+{
+ GUIApp * g = GUIApp::get_instance();
+ g->setCheatMode(!g->areCheatsEnabled());
+ pout << "Cheats = " << g->areCheatsEnabled() << std::endl;
+}
+
void GUIApp::ConCmd_memberVar(const Console::ArgvType &argv)
{
if (argv.size() == 1) {
@@ -2701,6 +2714,13 @@
// Intrinsics
//
+uint32 GUIApp::I_avatarCanCheat(const uint8* /*args*/,
+ unsigned int /*argsize*/)
+{
+ return GUIApp::get_instance()->areCheatsEnabled() ? 1 : 0;
+}
+
+
uint32 GUIApp::I_makeAvatarACheater(const uint8* /*args*/,
unsigned int /*argsize*/)
{
Modified: pentagram/trunk/kernel/GUIApp.h
===================================================================
--- pentagram/trunk/kernel/GUIApp.h 2013-01-05 17:54:55 UTC (rev 2539)
+++ pentagram/trunk/kernel/GUIApp.h 2013-01-05 18:47:25 UTC (rev 2540)
@@ -103,6 +103,7 @@
INTRINSIC(I_getTimeInMinutes);
INTRINSIC(I_getTimeInSeconds);
INTRINSIC(I_setTimeInGameHours);
+ INTRINSIC(I_avatarCanCheat);
INTRINSIC(I_makeAvatarACheater);
INTRINSIC(I_closeItemGumps);
@@ -328,8 +329,11 @@
sint32 timeOffset;
bool has_cheated;
+ bool cheats_enabled;
public:
+ bool areCheatsEnabled() const { return cheats_enabled; }
+ void setCheatMode(bool enabled) { cheats_enabled = enabled; }
bool hasCheated() const { return has_cheated; }
void makeCheater() { has_cheated = true; }
@@ -362,6 +366,8 @@
static void ConCmd_closeItemGumps(const Console::ArgvType &argv); //!< "GUIApp::closeItemGumps" console command
+ static void ConCmd_toggleCheatMode(const Console::ArgvType &argv); //!< "Cheat::toggle" console command
+
static void ConCmd_memberVar(const Console::ArgvType &argv); //!< "GuiApp::memberVar <member> [newvalue] [updateini]" console command
bool ttfoverrides;
Modified: pentagram/trunk/usecode/u8intrinsics.h
===================================================================
--- pentagram/trunk/usecode/u8intrinsics.h 2013-01-05 17:54:55 UTC (rev 2539)
+++ pentagram/trunk/usecode/u8intrinsics.h 2013-01-05 18:47:25 UTC (rev 2540)
@@ -317,7 +317,7 @@
0, //U
0, //U
FireballProcess::I_TonysBalls,
- UCMachine::I_true, // AvatarCanCheat
+ GUIApp::I_avatarCanCheat,
GUIApp::I_makeAvatarACheater,
UCMachine::I_true, // isGameRunning
0, //U
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wjp...@us...> - 2013-01-05 17:55:02
|
Revision: 2539
http://pentagram.svn.sourceforge.net/pentagram/?rev=2539&view=rev
Author: wjpalenstijn
Date: 2013-01-05 17:54:55 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Try to reduce clipping artifacts in speech
This is by applying RANGE_REDUX consistently and by copying
the clipping logic from the old dcmpsound pentagram tool.
See bug #3599379.
Modified Paths:
--------------
pentagram/trunk/audio/AudioChannel.cpp
pentagram/trunk/audio/SonarcAudioSample.cpp
Modified: pentagram/trunk/audio/AudioChannel.cpp
===================================================================
--- pentagram/trunk/audio/AudioChannel.cpp 2013-01-05 13:06:25 UTC (rev 2538)
+++ pentagram/trunk/audio/AudioChannel.cpp 2013-01-05 17:54:55 UTC (rev 2539)
@@ -204,11 +204,11 @@
if (src+2 < src_end) {
int c = *(src+2);
c = (c|(c << 8))-32768;
- interp_l.feedData(c);
+ interp_l.feedData(RANGE_REDUX(c));
} else if (src2 < src2_end) {
int c = *(src2);
c = (c|(c << 8))-32768;
- interp_l.feedData(c);
+ interp_l.feedData(RANGE_REDUX(c));
src2++;
} else {
interp_l.feedData();
@@ -265,11 +265,11 @@
if (src+2 < src_end) {
int c = *(src+2);
c = (c|(c << 8))-32768;
- interp_l.feedData(c);
+ interp_l.feedData(RANGE_REDUX(c));
} else if (src2 < src2_end) {
int c = *(src2);
c = (c|(c << 8))-32768;
- interp_l.feedData(c);
+ interp_l.feedData(RANGE_REDUX(c));
src2++;
} else {
interp_l.feedData();
Modified: pentagram/trunk/audio/SonarcAudioSample.cpp
===================================================================
--- pentagram/trunk/audio/SonarcAudioSample.cpp 2013-01-05 13:06:25 UTC (rev 2538)
+++ pentagram/trunk/audio/SonarcAudioSample.cpp 2013-01-05 17:54:55 UTC (rev 2539)
@@ -176,7 +176,6 @@
}
}
-
int SonarcAudioSample::audio_decode(const uint8* source, uint8* dest)
{
int size = source[0] + (source[1] << 8);
@@ -197,7 +196,11 @@
dest);
decode_LPC(order, samplecount, dest, source+8);
+ // Try to fix a number of clipped samples
+ for (int i = 1; i < samplecount; ++i)
+ if (dest[i] == 0 && dest[i-1] > 192) dest[i] = 0xFF;
+
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wjp...@us...> - 2013-01-05 13:06:32
|
Revision: 2538
http://pentagram.svn.sourceforge.net/pentagram/?rev=2538&view=rev
Author: wjpalenstijn
Date: 2013-01-05 13:06:25 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Manually fix up map bugs on map 5
See bug #3092602.
Modified Paths:
--------------
pentagram/trunk/docs/u8bugs.txt
pentagram/trunk/world/Map.cpp
Modified: pentagram/trunk/docs/u8bugs.txt
===================================================================
--- pentagram/trunk/docs/u8bugs.txt 2013-01-05 12:20:50 UTC (rev 2537)
+++ pentagram/trunk/docs/u8bugs.txt 2013-01-05 13:06:25 UTC (rev 2538)
@@ -192,10 +192,14 @@
Map 5: (East Road)
-Misplaced ground tiles around (9276,23672,48).
+Misplaced ground tiles at z == 0 instead of z == 48:
+Shape 71/8 at (9151,24127,0), (9279,23999,0), (9535,23615,0), (9151,23487,0),
+(9919,23487,0), (10303,23487,0), (10559,23487,0)
+
WORKAROUND:
-None yet.
+We manually shift them to z == 48 in Map::loadFixed while keeping them in
+the same on-screen position.
MISC BUGS:
Modified: pentagram/trunk/world/Map.cpp
===================================================================
--- pentagram/trunk/world/Map.cpp 2013-01-05 12:20:50 UTC (rev 2537)
+++ pentagram/trunk/world/Map.cpp 2013-01-05 13:06:25 UTC (rev 2538)
@@ -278,6 +278,27 @@
}
}
}
+
+ if (GAME_IS_U8 && mapnum == 5) {
+ // Map 5 has some ground tiles at the wrong z
+ std::list<Item*>::iterator iter;
+
+ for (iter = fixeditems.begin(); iter != fixeditems.end(); ++iter) {
+ if ((*iter)->getShape() == 71 && (*iter)->getFrame() == 8 && (*iter)->getZ() == 0) {
+ sint32 x, y, z;
+ (*iter)->getLocation(x, y, z);
+ if ((x == 9151 && y == 24127) || (x == 9279 && y == 23999) ||
+ (x == 9535 && y == 23615) || (x == 9151 && y == 23487) ||
+ (x == 10303 && y == 23487) || (x == 9919 && y == 23487) ||
+ (x == 10559 && y == 23487))
+ {
+ shiftCoordsToZ(x, y, z, 48);
+ (*iter)->setLocation(x, y, z);
+ }
+ }
+ }
+ }
+
}
void Map::unloadFixed()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wjp...@us...> - 2013-01-05 12:20:56
|
Revision: 2537
http://pentagram.svn.sourceforge.net/pentagram/?rev=2537&view=rev
Author: wjpalenstijn
Date: 2013-01-05 12:20:50 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Fix typo
Modified Paths:
--------------
pentagram/trunk/docs/u8bugs.txt
Modified: pentagram/trunk/docs/u8bugs.txt
===================================================================
--- pentagram/trunk/docs/u8bugs.txt 2013-01-05 12:17:50 UTC (rev 2536)
+++ pentagram/trunk/docs/u8bugs.txt 2013-01-05 12:20:50 UTC (rev 2537)
@@ -186,7 +186,7 @@
Wall: shapes 31, 32 at resp. (6755,15615,8), (6755,15743,8)
WORKAROUND:
-We manually shift them to z == 8 in Map::loadFixed while keeping them in
+We manually shift them to z == 16 in Map::loadFixed while keeping them in
the same on-screen position.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wjp...@us...> - 2013-01-05 12:17:57
|
Revision: 2536
http://pentagram.svn.sourceforge.net/pentagram/?rev=2536&view=rev
Author: wjpalenstijn
Date: 2013-01-05 12:17:50 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Manually fix up map bugs on map 21
See bug #3599375.
Modified Paths:
--------------
pentagram/trunk/docs/u8bugs.txt
pentagram/trunk/world/Map.cpp
Modified: pentagram/trunk/docs/u8bugs.txt
===================================================================
--- pentagram/trunk/docs/u8bugs.txt 2013-01-05 11:45:46 UTC (rev 2535)
+++ pentagram/trunk/docs/u8bugs.txt 2013-01-05 12:17:50 UTC (rev 2536)
@@ -179,6 +179,17 @@
None yet.
+Map 21: (Stone Cove)
+
+Two ground and two wall tiles have z == 8 instead of z == 16.
+Ground: shape 301 at (6783,15615,8), (6783,15743,8)
+Wall: shapes 31, 32 at resp. (6755,15615,8), (6755,15743,8)
+
+WORKAROUND:
+We manually shift them to z == 8 in Map::loadFixed while keeping them in
+the same on-screen position.
+
+
Map 5: (East Road)
Misplaced ground tiles around (9276,23672,48).
Modified: pentagram/trunk/world/Map.cpp
===================================================================
--- pentagram/trunk/world/Map.cpp 2013-01-05 11:45:46 UTC (rev 2535)
+++ pentagram/trunk/world/Map.cpp 2013-01-05 12:17:50 UTC (rev 2536)
@@ -75,8 +75,8 @@
{
sint32 zd = newz - z;
- x += zd / 2;
- y += zd / 2;
+ x += 4*zd;
+ y += 4*zd;
z = newz;
}
@@ -259,6 +259,25 @@
}
}
}
+
+ if (GAME_IS_U8 && mapnum == 21) {
+ // Map 21 has some ground and wall tiles at the wrong z
+ std::list<Item*>::iterator iter;
+
+ for (iter = fixeditems.begin(); iter != fixeditems.end(); ++iter) {
+ sint32 z = (*iter)->getZ();
+ uint32 sh = (*iter)->getShape();
+ if (z == 8 && (sh == 301 || sh == 31 || sh == 32)) {
+ sint32 x, y;
+ (*iter)->getLocation(x, y, z);
+ if ((x == 6783 || x == 6655) && (y == 15743 || y == 15615))
+ {
+ shiftCoordsToZ(x, y, z, 16);
+ (*iter)->setLocation(x, y, z);
+ }
+ }
+ }
+ }
}
void Map::unloadFixed()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|