import from git: added extra usage explanation, added -s command-line option to set multisample level, added a fallback to AV::start() to try multisample level of 1 if attempting samples>1 fails, fixed audio bug for combining multiple streams getting staticky, added documentation for joint and sound Lua member methods

git-svn-id: svn://anubis/anaglym/trunk@300 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop committed 2010-08-06 01:56:27 +00:00
1 parent 82254ff82c
commit 8dbcc0b043
4 files changed
+210 -9

No files matched your search

+142
View File
@@ -34,6 +34,8 @@ The library functions are documented below.
<ul>
<li><a href="#object_creation">object creation functions</a></li>
<li><a href="#object">object member methods</a></li>
<li><a href="#joint">joint member methods</a></li>
<li><a href="#sound">sound member methods</a></li>
</ul>
</li>
<li><a href="#std"><tt>std</tt> library</a></li>
@@ -58,6 +60,7 @@ The library functions are documented below.
<li><tt>-h height</tt> - specify the height in pixels of the window</li>
<li><tt>-f</tt> - do not fullscreen window</li>
<li><tt>-g</tt> - do not grab mouse input</li>
<li><tt>-s samples</tt> - set multisample level (default 4)</li>
</ul>
</p>
@@ -476,6 +479,16 @@ You can instantiate a reference object into a normal object by calling
the <a href="#object_clone">clone()</a> method on the object.
</p>
<a name="ag_loadSound" />
<h3>loadSound</h3>
<p><tt>sound = ag.loadSound(sound_name)</tt></p>
<p>
This routine loads a <a href="#sound">sound</a> object from file
<tt>sound_name</tt> and returns a Lua reference to the loaded sound.
The <tt>sound_name</tt> should contain the file extension,
since multiple formats are supported (.wav, .mp3, etc...).
</p>
<a name="ag_loadTexture" />
<h3>loadTexture</h3>
<p><tt>texture = ag.loadTexture(texture_name)</tt></p>
@@ -925,6 +938,135 @@ Newly created objects are visible by default.
<hr />
<a name="joint" />
<h2>Joint member methods</h2>
<a name="joint_setAMotorAxis" />
<h3>setAMotorAxis</h3>
<p><tt>joint:setAMotorAxis(anum, rel, x, y, z)</tt></p>
<p>
Set axis parameters of the AMotor joint.
See <a href="#ag_createAMotor">ag.createAMotor()</a> for more information.
</p>
<a name="joint_setNumAxes" />
<h3>setAMotorNumAxes</h3>
<p><tt>joint:setAMotorNumAxes(num)</tt></p>
<p>
Set the number of axes of the AMotor joint.
See <a href="#ag_createAMotor">ag.createAMotor()</a> for more information.
</p>
<a name="joint_setAMotorAngle" />
<h3>setAMotorAngle</h3>
<p><tt>joint:setAMotorAngle(anum, angle)</tt></p>
<p>
Set the angle of the specified of axis of the AMotor joint.
See <a href="#ag_createAMotor">ag.createAMotor()</a> for more information.
</p>
<a name="joint_setAMotorLoStop" />
<h3>setAMotorLoStop</h3>
<p><tt>joint:setAMotorLoStop(anum, lostop)</tt></p>
<p>
Set the low stop angle of the specified axis of the AMotor joint.
See <a href="#ag_createAMotor">ag.createAMotor()</a> for more information.
</p>
<a name="joint_setAMotorHiStop" />
<h3>setAMotorHiStop</h3>
<p><tt>joint:setAMotorHiStop(anum, histop)</tt></p>
<p>
Set the high stop angle of the specified axis of the AMotor joint.
See <a href="#ag_createAMotor">ag.createAMotor()</a> for more information.
</p>
<a name="joint_setAMotorVel" />
<h3>setAMotorVel</h3>
<p><tt>joint:setAMotorVel(vel)</tt></p>
<p>
Set the velocity of the AMotor joint.
See <a href="#ag_createAMotor">ag.createAMotor()</a> for more information.
</p>
<a name="joint_setAMotorFMax" />
<h3>setAMotorFMax</h3>
<p><tt>joint:setAMotorFMax(vel)</tt></p>
<p>
Set the maximum force that the AMotor joint will apply to
maintain its constraints.
See <a href="#ag_createAMotor">ag.createAMotor()</a> for more information.
</p>
<a name="joint_setAMotorBounce" />
<h3>setAMotorBounce</h3>
<p><tt>joint:setAMotorBounce(bounce)</tt></p>
<p>
Set the bounciness of the AMotor joint.
See <a href="#ag_createAMotor">ag.createAMotor()</a> for more information.
</p>
<hr />
<a name="sound" />
<h2>Sound member methods</h2>
<a name="sound_play" />
<h3>play</h3>
<p><tt>snd:play()</tt></p>
<p>
Begins playing the <tt>snd</tt> sound at the beginning.
</p>
<a name="sound_resume" />
<h3>resume</h3>
<p><tt>snd:resume()</tt></p>
<p>
Begins playing the <tt>snd</tt> sound where it stopped after calling
<a href="#sound_stop">stop()</a>.
</p>
<a name="sound_stop" />
<h3>stop</h3>
<p><tt>snd:stop()</tt></p>
<p>
Stops playing the <tt>snd</tt> sound at its current position.
</p>
<a name="sound_loop" />
<h3>loop</h3>
<p><tt>snd:loop(count)</tt></p>
<p>
Begins playing the <tt>snd</tt> sound at the beginning and sets the loop
count to <tt>count</tt>. <tt>snd:loop(1)</tt> is equivalent to
<tt>snd:play()</tt>.
</p>
<a name="sound_loopForever" />
<h3>loopForever</h3>
<p><tt>snd:loopForever()</tt></p>
<p>
Begins playing the <tt>snd</tt> sound at the beginning and sets the loop
count to infinity. This routine is good for background music.
</p>
<a name="sound_getVolume" />
<h3>getVolume</h3>
<p><tt>snd:getVolume()</tt></p>
<p>
Get the volume for the <tt>snd</tt> sound.
</p>
<a name="sound_setVolume" />
<h3>setVolume</h3>
<p><tt>snd:setVolume(vol)</tt></p>
<p>
Set the volume for the <tt>snd</tt> sound to <tt>snd</tt>.
<tt>snd</tt> should be between <tt>0.0</tt> and <tt>1.0</tt>.
</p>
<hr />
<a name="std" />
<h2><tt>std</tt> library</h2>