Development/zh: Difference between revisions
Created page with "截至目前,处于一下原因,我们强烈建议使用Linux环境在DDNet中开发: * 大多数DDNet贡献者实际上使用Linux来贡献。 * 更容易的软件包管理,您可以轻松地安装所有需要的库并开始贡献。 * 本文还没有Windows版本,主要关注Linux。" |
Updating to match new version of source page |
||
Line 93: | Line 93: | ||
==== 服务器 ==== | ==== 服务器 ==== | ||
<div class="mw-translate-fuzzy"> | |||
这个游戏使用自己的[https://en.wikipedia.org/wiki/Entity_component_system 实体组件系统],所有其他实体派生到的主类是<code>CEntity</code>,位于<code>src/game/server/Entity.h</code>中。 | 这个游戏使用自己的[https://en.wikipedia.org/wiki/Entity_component_system 实体组件系统],所有其他实体派生到的主类是<code>CEntity</code>,位于<code>src/game/server/Entity.h</code>中。 | ||
</div> | |||
这些实体由位于此处的游戏世界管理<code>src/game/server/gameworld.h</code> | 这些实体由位于此处的游戏世界管理<code>src/game/server/gameworld.h</code> | ||
Line 166: | Line 168: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Must be prefixed by <code>C</code> (for legacy reasons this is ignored for structs in some places, such as in graphics code) or <code>I</code> for interfaces. | Must be prefixed by <code>C</code> (for legacy reasons this is ignored for structs in some places, such as in graphics code) or <code>I</code> for interfaces. New <code>struct</code>s should be prefixed by <code>S</code>. | ||
</div> | </div> | ||
Line 228: | Line 230: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
* <code>m</code> for member variables: <code>m_MyVariable</code>. | * <code>m</code> for member variables: <code>m_MyVariable</code>. | ||
* <code>s</code> for static variables: <code>s_MyStaticVariable</code>. | * <code>s</code> for static variables: <code>s_MyStaticVariable</code>, <code>ms_MyStaticMemberVariable</code>. | ||
* <code>g</code> for global variables with external linkage: <code>gs_MyGlobalStaticVar</code>. | * <code>g</code> for global variables with external linkage: <code>gs_MyGlobalStaticVar</code>. | ||
</div> | </div> | ||
Line 240: | Line 242: | ||
* <code>p</code> for pointers: <code>pMyPointer</code>, <code>m_pCharacter</code>, <code>ppMyPointerToPointer</code>. | * <code>p</code> for pointers: <code>pMyPointer</code>, <code>m_pCharacter</code>, <code>ppMyPointerToPointer</code>. | ||
* <code>a</code> for arrays: <code>aMyArray</code>, <code>aBuf</code>. | * <code>a</code> for arrays: <code>aMyArray</code>, <code>aBuf</code>. | ||
* <code>v</code> for <code>std::vector</code>s: <code>vMyVector</code>, <code>vpvMyVectorOfPointersToVectors</code>. | |||
* <code>fn</code> for functions: <code>pfnMyCallback</code>, <code>m_papfnMyPointerToArrayOfCallbacks</code>. | * <code>fn</code> for functions: <code>pfnMyCallback</code>, <code>m_papfnMyPointerToArrayOfCallbacks</code>. | ||
</div> | </div> |