1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
<title>Ares: Ext/SWType/Hooks.cpp File Reference</title>
4
<link href="tabs.css" rel="stylesheet" type="text/css">
5
<link href="doxygen.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.5.8 -->
8
<script type="text/javascript">
10
function changeDisplayState (e){
11
var num=this.id.replace(/[^[0-9]/g,'');
12
var button=this.firstChild;
13
var sectionDiv=document.getElementById('dynsection'+num);
14
if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
15
sectionDiv.style.display='block';
16
button.src='open.gif';
18
sectionDiv.style.display='none';
19
button.src='closed.gif';
22
function initDynSections(){
23
var divs=document.getElementsByTagName('div');
25
for(var i=0;i<divs.length-1;i++){
26
if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
28
var section=divs[i+1];
29
var button=header.firstChild;
31
divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
32
button=document.createElement('img');
33
divs[i].insertBefore(button,divs[i].firstChild);
35
header.style.cursor='pointer';
36
header.onclick=changeDisplayState;
37
header.id='dynheader'+sectionCounter;
38
button.src='closed.gif';
39
section.id='dynsection'+sectionCounter;
40
section.style.display='none';
41
section.style.marginLeft='14px';
46
window.onload = initDynSections;
49
<div class="navigation" id="top">
52
<li><a href="index.html"><span>Main Page</span></a></li>
53
<li><a href="pages.html"><span>Related Pages</span></a></li>
54
<li><a href="annotated.html"><span>Classes</span></a></li>
55
<li class="current"><a href="files.html"><span>Files</span></a></li>
56
<li><a href="dirs.html"><span>Directories</span></a></li>
58
<form action="search.php" method="get">
59
<table cellspacing="0" cellpadding="0" border="0">
61
<td><label> <u>S</u>earch for </label></td>
62
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
71
<li><a href="files.html"><span>File List</span></a></li>
72
<li><a href="globals.html"><span>File Members</span></a></li>
75
<div class="navpath"><a class="el" href="dir_4f38a043d9972e86e8aa3f2d4f00b04c.html">Ext</a> » <a class="el" href="dir_8f7b7985954d5bf130d17768b9862b9d.html">SWType</a>
78
<div class="contents">
79
<h1>Hooks.cpp File Reference</h1><code>#include "<a class="el" href="_s_w_type_2_body_8h.html">Body.h</a>"</code><br>
80
<code>#include "<a class="el" href="_s_w_types_8h.html">../../Misc/SWTypes.h</a>"</code><br>
81
<table border="0" cellpadding="0" cellspacing="0">
83
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
84
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_s_w_type_2_hooks_8cpp.html#86d3355613bbc0c9444b239e33775d8c">__declspec</a> (dllexport) DWORD __cdecl SuperWeaponTypeClass_GetCursorOverObject(REGISTERS *R)</td></tr>
87
<hr><h2>Function Documentation</h2>
88
<a class="anchor" name="86d3355613bbc0c9444b239e33775d8c"></a><!-- doxytag: member="Hooks.cpp::__declspec" ref="86d3355613bbc0c9444b239e33775d8c" args="(dllexport) DWORD __cdecl SuperWeaponTypeClass_GetCursorOverObject(REGISTERS *R)" -->
90
<div class="memproto">
91
<table class="memname">
93
<td class="memname">__declspec </td>
95
<td class="paramtype">dllexport </td>
96
<td class="paramname"> </td>
97
<td> ) </td>
105
<div class="fragment"><pre class="fragment"><a name="l00005"></a>00005 {
106
<a name="l00006"></a>00006 GET(SuperWeaponTypeClass*, pThis, ECX);
107
<a name="l00007"></a>00007
108
<a name="l00008"></a>00008 <a class="code" href="class_s_w_type_ext_1_1_ext_data.html">SWTypeExt::ExtData</a> *pData = <a class="code" href="class_s_w_type_ext.html#6906468c9e4ae4d421cba9cb572fb6ec">SWTypeExt::ExtMap</a>.<a class="code" href="class_container.html#90ddec0f8fb14f5a9894e128c2f938fc">Find</a>(pThis);
109
<a name="l00009"></a>00009
110
<a name="l00010"></a>00010 <span class="keywordflow">if</span>(pThis->Action == <a class="code" href="_actions_8h.html#3828d4bdcec55d055849f3503ab93410">SW_YES_CURSOR</a>) {
111
<a name="l00011"></a>00011 GET_STACK(CellStruct *, pMapCoords, 0x0C);
112
<a name="l00012"></a>00012
113
<a name="l00013"></a>00013 <span class="keywordtype">int</span> Action = <a class="code" href="_actions_8h.html#3828d4bdcec55d055849f3503ab93410">SW_YES_CURSOR</a>;
114
<a name="l00014"></a>00014
115
<a name="l00015"></a>00015 <span class="keywordflow">if</span>(!pData-><a class="code" href="class_s_w_type_ext_1_1_ext_data.html#bdd598d5c5eb2c9ecc274706985138de">SW_FireToShroud</a>.<a class="code" href="class_valueable.html#4f5eae470563f06f257cbc81df24f7a9">Get</a>()) {
116
<a name="l00016"></a>00016 CellClass* pCell = MapClass::Instance->GetCellAt(pMapCoords);
117
<a name="l00017"></a>00017 CoordStruct Crd;
118
<a name="l00018"></a>00018
119
<a name="l00019"></a>00019 <span class="keywordflow">if</span>(MapClass::Instance->IsLocationShrouded(pCell->GetCoords(&Crd))) {
120
<a name="l00020"></a>00020 Action = <a class="code" href="_actions_8h.html#fa2feb19e38b31961682b03924731bcf">SW_NO_CURSOR</a>;
121
<a name="l00021"></a>00021 }
122
<a name="l00022"></a>00022 }
123
<a name="l00023"></a>00023
124
<a name="l00024"></a>00024 <span class="keywordflow">if</span>(pThis->Type >= <a class="code" href="_s_w_type_2_body_8h.html#6ad9458fa6e603ce35865007ed97f044">FIRST_SW_TYPE</a> && !<a class="code" href="class_new_s_w_type.html#6d958ce28c85b64691c52b374eec1bd3">NewSWType::GetNthItem</a>(pThis->Type)-><a class="code" href="class_new_s_w_type.html#83203d99b7a19172cc3e27ed5b3e2491">CanFireAt</a>(pMapCoords)) {
125
<a name="l00025"></a>00025 Action = <a class="code" href="_actions_8h.html#fa2feb19e38b31961682b03924731bcf">SW_NO_CURSOR</a>;
126
<a name="l00026"></a>00026 }
127
<a name="l00027"></a>00027
128
<a name="l00028"></a>00028 R->EAX(Action);
129
<a name="l00029"></a>00029
130
<a name="l00030"></a>00030 <span class="keywordflow">if</span>(Action == <a class="code" href="_actions_8h.html#3828d4bdcec55d055849f3503ab93410">SW_YES_CURSOR</a>) {
131
<a name="l00031"></a>00031 <a class="code" href="class_s_w_type_ext.html#37987e17a568804f2f22d1bdd9e2e8d5">SWTypeExt::CurrentSWType</a> = pThis;
132
<a name="l00032"></a>00032 <a class="code" href="class_actions.html#85baf38edafaf94b1ac44b03fe01f132">Actions::Set</a>(&pData-><a class="code" href="class_s_w_type_ext_1_1_ext_data.html#fae1c1d08642129069e7fd655e6993bb">SW_Cursor</a>, pData-><a class="code" href="class_s_w_type_ext_1_1_ext_data.html#bdd598d5c5eb2c9ecc274706985138de">SW_FireToShroud</a>);
133
<a name="l00033"></a>00033 } <span class="keywordflow">else</span> {
134
<a name="l00034"></a>00034 <a class="code" href="class_s_w_type_ext.html#37987e17a568804f2f22d1bdd9e2e8d5">SWTypeExt::CurrentSWType</a> = NULL;
135
<a name="l00035"></a>00035 <a class="code" href="class_actions.html#85baf38edafaf94b1ac44b03fe01f132">Actions::Set</a>(&pData-><a class="code" href="class_s_w_type_ext_1_1_ext_data.html#8ce6698a37b01fecf6d281ee5d8f47d2">SW_NoCursor</a>, pData-><a class="code" href="class_s_w_type_ext_1_1_ext_data.html#bdd598d5c5eb2c9ecc274706985138de">SW_FireToShroud</a>);
136
<a name="l00036"></a>00036 }
137
<a name="l00037"></a>00037 <span class="keywordflow">return</span> 0x6CEFD9;
138
<a name="l00038"></a>00038 }
139
<a name="l00039"></a>00039 <span class="keywordflow">return</span> 0;
140
<a name="l00040"></a>00040 }
147
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 18 03:51:08 2010 for Ares by
148
<a href="http://www.doxygen.org/index.html">
149
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>