176 lines
7.7 KiB
HTML
176 lines
7.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
<title>JGE++: JApp Class Reference</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.5.3 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<h1>JApp Class Reference</h1><!-- doxytag: class="JApp" --><code>#include <JApp.h></code>
|
|
<p>
|
|
|
|
<p>
|
|
<a href="class_j_app-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_app.html#d4e52fdc2e296884a47456e5c8a97a07">Create</a> ()=0</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_app.html#373ae2fb9ca6547f7e33612db786ad25">Destroy</a> ()=0</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_app.html#92b3822847ab603ef4f5ee08011a1b7b">Update</a> ()=0</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_app.html#bcc589a23e548f32b7cf4fde35d88b91">Render</a> ()=0</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_app.html#45ae0b04ea4eb58516e5ec66780d1692">Pause</a> ()=0</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_app.html#cc90993fc4af187704b3c62eec53b578">Resume</a> ()=0</td></tr>
|
|
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
Main application class for the system to run. The core game class should be derived from this base class. <hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="d4e52fdc2e296884a47456e5c8a97a07"></a><!-- doxytag: member="JApp::Create" ref="d4e52fdc2e296884a47456e5c8a97a07" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void JApp::Create </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Initialization function.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="373ae2fb9ca6547f7e33612db786ad25"></a><!-- doxytag: member="JApp::Destroy" ref="373ae2fb9ca6547f7e33612db786ad25" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void JApp::Destroy </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Cleanup function before exiting from the game.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="92b3822847ab603ef4f5ee08011a1b7b"></a><!-- doxytag: member="JApp::Update" ref="92b3822847ab603ef4f5ee08011a1b7b" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void JApp::Update </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Update function to be called for each frame update. Should perform all the game logic here.<p>
|
|
<dl class="user" compact><dt><b>Example: A simple Update() implementation:</b></dt><dd><div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> <a class="code" href="class_j_app.html#92b3822847ab603ef4f5ee08011a1b7b">Update</a>()
|
|
{
|
|
<span class="keywordtype">float</span> dt = <a class="code" href="class_j_g_e.html#35939174437b92423fd98cb5ffcb4341">JGE::GetInstance</a>()-><a class="code" href="class_j_g_e.html#51af49f4083b3c29f49f6fb8e61f7a11">GetDelta</a>();
|
|
mX += mSpeed*dt;
|
|
}
|
|
</pre></div> </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="bcc589a23e548f32b7cf4fde35d88b91"></a><!-- doxytag: member="JApp::Render" ref="bcc589a23e548f32b7cf4fde35d88b91" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void JApp::Render </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Render function to be called for each frame update. Should do all the game rendering here.<p>
|
|
<dl class="user" compact><dt><b>Example: A simple Render() implementation:</b></dt><dd><div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> <a class="code" href="class_j_app.html#bcc589a23e548f32b7cf4fde35d88b91">Render</a>()
|
|
{
|
|
<a class="code" href="class_j_renderer.html">JRenderer</a> *r = <a class="code" href="class_j_renderer.html#2817b4989698a174d46521ac6bff969a">JRenderer::GetInstance</a>();
|
|
r-><a class="code" href="class_j_renderer.html#d72682efda117e9a334bfec71be477d8">FillRect</a>(0,0,480,272,ARGB(255,0,0,0));
|
|
}
|
|
</pre></div> </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="45ae0b04ea4eb58516e5ec66780d1692"></a><!-- doxytag: member="JApp::Pause" ref="45ae0b04ea4eb58516e5ec66780d1692" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void JApp::Pause </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Callback function called when the game is paused by the system.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="cc90993fc4af187704b3c62eec53b578"></a><!-- doxytag: member="JApp::Resume" ref="cc90993fc4af187704b3c62eec53b578" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void JApp::Resume </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Callback function called when the game is resumed by the system.
|
|
</div>
|
|
</div><p>
|
|
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Oct 22 00:28:22 2007 for JGE++ by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
|
|
</body>
|
|
</html>
|