https://powdertoy.co.uk/Wiki/index.php?action=history&feed=atom&title=Variables%2FkoVariables/ko - Revision history2024-11-25T02:52:59ZRevision history for this page on the wikiMediaWiki 1.30.0https://powdertoy.co.uk/Wiki/index.php?title=Variables/ko&diff=7297&oldid=prevAwsomedrack: Added the languages box.2019-03-10T08:37:24Z<p>Added the languages box.</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 08:37, 10 March 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{Languages|Variables}}</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>이곳은 소스 코드에서의 유용한 변수와 변수의 사용법에 대한 목록입니다.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>이곳은 소스 코드에서의 유용한 변수와 변수의 사용법에 대한 목록입니다.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>- 아직 완벽히 번역되지 못하였습니다.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>- 아직 완벽히 번역되지 못하였습니다.</div></td></tr>
<!-- diff cache key mediawiki-pw_:diff:version:1.11a:oldid:5725:newid:7297 -->
</table>Awsomedrackhttps://powdertoy.co.uk/Wiki/index.php?title=Variables/ko&diff=5725&oldid=prevkiwiyou: Created page with "이곳은 소스 코드에서의 유용한 변수와 변수의 사용법에 대한 목록입니다. - 아직 완벽히 번역되지 못하였습니다. === 일반 === {| class=..."2015-08-17T10:57:49Z<p>Created page with "이곳은 소스 코드에서의 유용한 변수와 변수의 사용법에 대한 목록입니다. - 아직 완벽히 번역되지 못하였습니다. === 일반 === {| class=..."</p>
<p><b>New page</b></p><div>이곳은 소스 코드에서의 유용한 변수와 변수의 사용법에 대한 목록입니다.<br />
- 아직 완벽히 번역되지 못하였습니다.<br />
<br />
<br />
=== 일반 ===<br />
{| class="wikitable"<br />
! 변수명 || 값<br />
|-<br />
| pmap[y][x] || 입자 맵.(pmap[y][x]&0xFF)은 (x, y) 좌표에 있는 물질의 타입을 나타냅니다. (pmap[y][x]>>8)은 (x, y)좌표에 있는 물질의 번호를 나타냅니다. 에너지 타입의 물질은 이곳에 저장되지 않으므로, photons 맵을 사용해야 합니다.<br />
|-<br />
| sim->photons[y][x] || Photon 맵. 이것은 pmap과 같은 역할을 하지만, PHOT, NEUT, ELEC, PROT만이(에너지 타입의 모든 입자) 이곳에 저장됩니다.<br />
|-<br />
| sim->bmap[y][x] || Block-map. Returns wall at [y][x]. Wall constants are defined in src/simulation/SimulationData.h<br />
|-<br />
| sim->emap[y][x] || Electronics-map. Used for conductive walls. If it is 1, that means the wall at that location is conducting.<br />
|-<br />
| r || usually preset to pmap[y][x]<br />
|-<br />
| parts[i] || the particle that has index i<br />
|-<br />
| sim->pv[y/CELL][x/CELL] || The pressure at x,y. Pressure is on a 4x4 grid like walls. Is a float(0.0f for 0).<br />
|-<br />
| sim->vx[y/CELL][x/CELL] || The air velocity in the x direction at x,y. Uses a 4x4 grid like walls. Is a float(0.0f for 0).<br />
|-<br />
| sim->vy[y/CELL][x/CELL] || The air velocity in the y direction at x,y. Uses a 4x4 grid like walls. Is a float(0.0f for 0).<br />
|-<br />
| sim->hv[y/CELL][x/CELL] || The ambient heat at x,y. It is on a 4x4 grid like walls and pressure. Is a float(0.0f for 0).<br />
|-<br />
| t || Current particle type in some places. ex. PT_DUST<br />
|}<br />
<br />
=== Particle ===<br />
To get information from a particle, use parts[i].<sup>1</sup>, where i is the particle index. The index may also be stored as r>>8 instead of i. This is normally used in the update functions for particles. i is the index of the particle that is being updated, and r>>8 is the index of a particle surrounding it that it might react with or modify. To get the type of the particle from the variable r, use (r&0xFF).<br />
<br />
=== Particle Information ===<br />
{| class="wikitable"<br />
! Variable || What it returns<br />
|-<br />
| parts[<sup>2</sup>].type || Contains the particle's current type. <br />
|-<br />
| parts[<sup>2</sup>].ctype || Contains the particle's previous type (for example LAVA/SPRK) or the type of particle it is cloning (CLNE/...) usually.<br />
|-<br />
| parts[<sup>2</sup>].life || Contains the particle's life.<br />
|- <br />
| parts[<sup>2</sup>].temp || Contains the particle's temperature. It's a float(0.0f for 0K, which is -273.15C). All temps are stored in Kelvins.<br />
|-<br />
| parts[<sup>2</sup>].tmp || Contains a value which can be used for anything. Most particles don't use it. <br />
|-<br />
| parts[<sup>2</sup>].tmp2 || Contains another value. Even less particles use this.<br />
|-<br />
| parts[<sup>2</sup>].dcolour || Contains the particle's decoration color, 32bit ARGB<br />
|-<br />
| parts[<sup>2</sup>].x || Contains the particle's x coordinate. It is not an integer, it's a float. To get the exact coordinate, add .5 to it before changing it to an int.<br />
|-<br />
| parts[<sup>2</sup>].y || Contains the particle's y coordinate. It is not an integer, it's a float. To get the exact coordinate, add .5 to it before changing it to an int.<br />
|-<br />
| parts[<sup>2</sup>].vx || Contains the particle's x velocity. It is a float. <br />
|-<br />
| parts[<sup>2</sup>].vy || Contains the particle's y velocity. It is a float<br />
|-<br />
|}<br />
<br />
<sup>1</sup> - use either type, ctype, life, temp or tmp<br />
<br />
<sup>2</sup> - use either r>>8 or i. See above (Particle) for more info.<br />
<br />
[[Category:Development]]</div>kiwiyou