Difference between revisions of "Development:API"

From PCGamingWiki, the wiki about fixing PC games
(Cargo? Cargo!)
(added DOS modes vardefine for "unknown")
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
 
|DOS_video_modes=List (,) of String
 
|DOS_video_modes=List (,) of String
 
|Shader_Model_versions=List (,) of String
 
|Shader_Model_versions=List (,) of String
|Windows_32-bit_executable=String
+
|Windows_16bit_executable=String
|Windows_64-bit_executable=String
+
|Windows_32bit_executable=String
 +
|Windows_64bit_executable=String
 
|Windows_ARM_app=String
 
|Windows_ARM_app=String
 
|Mac_OS_X_PowerPC_app=String
 
|Mac_OS_X_PowerPC_app=String
|macOS_Intel_32-bit_app=String
+
|macOS_Intel_32bit_app=String
|macOS_Intel_64-bit_app=String
+
|macOS_Intel_64bit_app=String
 
|macOS_ARM_app=String
 
|macOS_ARM_app=String
 
|Linux_PowerPC_app=String
 
|Linux_PowerPC_app=String
|Linux_32-bit_executable=String
+
|Linux_32bit_executable=String
|Linux_64-bit_executable=String
+
|Linux_64bit_executable=String
 
|Linux_ARM_app=String
 
|Linux_ARM_app=String
 
}}</noinclude><includeonly>{{#switch:{{#var:section}}
 
}}</noinclude><includeonly>{{#switch:{{#var:section}}
Line 46: Line 47:
 
<td class="table-api-body-support">{{#switch:{{lc:{{{direct3d versions|}}}}}
 
<td class="table-api-body-support">{{#switch:{{lc:{{{direct3d versions|}}}}}
 
|true
 
|true
|unknown={{Tickcross|{{{direct3d versions|}}}|Direct3D versions|unknown}}
+
|unknown={{Tickcross|{{{direct3d versions|}}}||unknown}}
|hackable={{Tickcross|hackable|Direct3D versions|{{{direct3d notes|}}}}}
+
|hackable={{Tickcross|hackable||{{{direct3d notes|}}}}}
 
|#default={{#arraymaptemplate:{{{direct3d versions}}}|API/switch Direct3D|,|,&#32;}} }}</td>
 
|#default={{#arraymaptemplate:{{{direct3d versions}}}|API/switch Direct3D|,|,&#32;}} }}</td>
 
<td class="table-api-body-notes">{{{direct3d notes|}}}</td>
 
<td class="table-api-body-notes">{{{direct3d notes|}}}</td>
Line 59: Line 60:
 
<td class="table-api-body-support">{{#switch:{{lc:{{{directdraw versions|}}}}}
 
<td class="table-api-body-support">{{#switch:{{lc:{{{directdraw versions|}}}}}
 
|true
 
|true
|unknown={{Tickcross|{{{directdraw versions|}}}|DirectDraw versions|unknown}}
+
|unknown={{Tickcross|{{{directdraw versions|}}}||unknown}}
|hackable={{Tickcross|hackable|DirectDraw versions|{{{directdraw notes|}}}}}
+
|hackable={{Tickcross|hackable||{{{directdraw notes|}}}}}
|#default={{{directdraw versions|}}}{{#arraymap:{{{directdraw versions|}}}|,|var|[[DirectDraw versions::var| ]]|&#32;}} }}</td>
+
|#default={{{directdraw versions|}}}
 +
}}</td>
 
<td class="table-api-body-notes">{{{directdraw notes|}}}</td>
 
<td class="table-api-body-notes">{{{directdraw notes|}}}</td>
 
</tr>
 
</tr>
Line 72: Line 74:
 
<tr class="template-infotable-body table-api-body-row">
 
<tr class="template-infotable-body table-api-body-row">
 
<th scope="row" class="table-api-body-parameter">WinG</th>
 
<th scope="row" class="table-api-body-parameter">WinG</th>
<td class="table-api-body-support">{{Tickcross|{{{wing|}}}|WinG|{{{wing notes|}}}}}</td>
+
<td class="table-api-body-support">{{Tickcross|{{{wing|}}}||{{{wing notes|}}}}}</td>
 
<td class="table-api-body-notes">{{{wing notes|}}}</td>
 
<td class="table-api-body-notes">{{{wing notes|}}}</td>
 
</tr>
 
</tr>
Line 85: Line 87:
 
<td class="table-api-body-support">{{#switch:{{lc:{{{opengl versions|}}}}}
 
<td class="table-api-body-support">{{#switch:{{lc:{{{opengl versions|}}}}}
 
|true
 
|true
|unknown={{Tickcross|{{{opengl versions|}}}|OpenGL versions|unknown}}
+
|unknown={{Tickcross|{{{opengl versions|}}}||unknown}}
|hackable={{Tickcross|hackable|OpenGL versions|{{{opengl notes|}}}}}
+
|hackable={{Tickcross|hackable||{{{opengl notes|}}}}}
|#default={{{opengl versions|}}}{{#arraymap:{{{opengl versions|}}}|,|var|[[OpenGL versions::var| ]]|&#32;}} }}</td>
+
|#default={{{opengl versions|}}}
 +
}}</td>
 
<td class="table-api-body-notes">{{{opengl notes|}}}</td>
 
<td class="table-api-body-notes">{{{opengl notes|}}}</td>
 
</tr>
 
</tr>
Line 99: Line 102:
 
|true
 
|true
 
|unknown
 
|unknown
|hackable={{Tickcross|{{{glide versions|}}}|Glide versions|{{{glide notes|}}}}}
+
|hackable={{Tickcross|{{{glide versions|}}}||{{{glide notes|}}}}}
|#default={{{glide versions|}}}{{#arraymap:{{{glide versions|}}}|,|var|[[Glide versions::var| ]]|&#32;}} }}</td>
+
|#default={{{glide versions|}}}
 +
}}</td>
 
<td class="table-api-body-notes">{{{glide notes|}}}</td>
 
<td class="table-api-body-notes">{{{glide notes|}}}</td>
 
</tr>
 
</tr>
Line 110: Line 114:
 
<tr class="template-infotable-body table-api-body-row">
 
<tr class="template-infotable-body table-api-body-row">
 
<th scope="row" class="table-api-body-parameter">Software renderer</th>
 
<th scope="row" class="table-api-body-parameter">Software renderer</th>
<td class="table-api-body-support">{{Tickcross|{{{software mode|}}}|Software renderer|{{{software mode notes|}}}}}</td>
+
<td class="table-api-body-support">{{Tickcross|{{{software mode|}}}||{{{software mode notes|}}}}}</td>
 
<td class="table-api-body-notes">{{{software mode notes|}}}</td>
 
<td class="table-api-body-notes">{{{software mode notes|}}}</td>
 
</tr>
 
</tr>
Line 122: Line 126:
 
<tr class="template-infotable-body table-api-body-row">
 
<tr class="template-infotable-body table-api-body-row">
 
<th scope="row" class="table-api-body-parameter"><abbr title="Only supported on compatible AMD video cards">Mantle support</abbr></th>
 
<th scope="row" class="table-api-body-parameter"><abbr title="Only supported on compatible AMD video cards">Mantle support</abbr></th>
<td class="table-api-body-support">{{Tickcross|{{{mantle support|}}}|Mantle support|{{{mantle support notes|}}}}}{{#vardefine:Warnings|true}}</td>
+
<td class="table-api-body-support">{{Tickcross|{{{mantle support|}}}||{{{mantle support notes|}}}}}{{#vardefine:Warnings|true}}</td>
 
<td class="table-api-body-notes">{{#if:{{{mantle support notes|}}}|{{{mantle support notes|}}}|''Requires an AMD video card with a driver version earlier than 19.5.1 (2019).''<ref name="Mantle support"/>}}</td>
 
<td class="table-api-body-notes">{{#if:{{{mantle support notes|}}}|{{{mantle support notes|}}}|''Requires an AMD video card with a driver version earlier than 19.5.1 (2019).''<ref name="Mantle support"/>}}</td>
 
</tr>
 
</tr>
Line 134: Line 138:
 
<tr class="template-infotable-body table-api-body-row">
 
<tr class="template-infotable-body table-api-body-row">
 
<th scope="row" class="table-api-body-parameter"><abbr title="Only supported on macOS (OS X)">Metal support</abbr></th>
 
<th scope="row" class="table-api-body-parameter"><abbr title="Only supported on macOS (OS X)">Metal support</abbr></th>
<td class="table-api-body-support">{{Tickcross|{{{metal support|}}}|Metal support|{{{metal support notes|}}}}}</td>
+
<td class="table-api-body-support">{{Tickcross|{{{metal support|}}}||{{{metal support notes|}}}}}</td>
 
<td class="table-api-body-notes">{{{metal support notes|}}}</td>
 
<td class="table-api-body-notes">{{{metal support notes|}}}</td>
 
</tr>
 
</tr>
Line 147: Line 151:
 
<th scope="row" class="table-api-body-parameter">Vulkan</th>
 
<th scope="row" class="table-api-body-parameter">Vulkan</th>
 
<td class="table-api-body-support">{{#switch:{{lc:{{{vulkan versions|}}}}}
 
<td class="table-api-body-support">{{#switch:{{lc:{{{vulkan versions|}}}}}
|true={{Tickcross|true|Vulkan versions|true}}
+
|true={{Tickcross|true||true}}{{#vardefine:Vulkan versions|true}}
|hackable={{Tickcross|hackable|Vulkan versions|{{{vulkan notes|}}}}}
+
|hackable={{Tickcross|hackable||{{{vulkan notes|}}}}}{{#vardefine:Vulkan versions|hackable}}
 
|#default={{#arraymaptemplate:{{{vulkan versions}}}|API/switch Vulkan|,|,&#32;}} }}</td>
 
|#default={{#arraymaptemplate:{{{vulkan versions}}}|API/switch Vulkan|,|,&#32;}} }}</td>
 
<td class="table-api-body-notes">{{{vulkan notes|}}}</td>
 
<td class="table-api-body-notes">{{{vulkan notes|}}}</td>
Line 158: Line 162:
 
<tr class="template-infotable-body table-api-body-row">
 
<tr class="template-infotable-body table-api-body-row">
 
<th scope="row" class="table-api-body-parameter"><abbr title="Only applies to DOS and/or PC booter versions">DOS video modes</abbr></th>
 
<th scope="row" class="table-api-body-parameter"><abbr title="Only applies to DOS and/or PC booter versions">DOS video modes</abbr></th>
<td class="table-api-body-support">{{#if: {{{dos modes|}}} | {{#ifeq: {{{dos modes|}}} | unknown | {{tickcross|unknown|DOS video modes}} | {{#arraymaptemplate:{{{dos modes}}}|API/switch DOS|,|,&#32;}} }} | {{tickcross|unknown|DOS video modes}} }}</td></td>
+
<td class="table-api-body-support">{{#if: {{{dos modes|}}} | {{#ifeq: {{{dos modes|}}} | unknown | {{tickcross|unknown}}{{#vardefine:DOS modes|unknown}} | {{#arraymaptemplate:{{{dos modes}}}|API/switch DOS|,|,&#32;}} }} | {{tickcross|unknown}}{{#vardefine:DOS modes|unknown}} }}</td></td>
 
<td class="table-api-body-notes">{{{dos modes notes|}}}</td>
 
<td class="table-api-body-notes">{{{dos modes notes|}}}</td>
 
</tr>
 
</tr>
Line 201: Line 205:
 
-->{{#if:{{#var:powerpc app}}|<td class="table-api-body-support">{{Tickcross-na|n/a}}</td>}}<!--
 
-->{{#if:{{#var:powerpc app}}|<td class="table-api-body-support">{{Tickcross-na|n/a}}</td>}}<!--
 
-->{{#if:{{#var:Windows 3.x native}}|<td class="table-api-body-support">{{Tickcross|true}}</td>}}
 
-->{{#if:{{#var:Windows 3.x native}}|<td class="table-api-body-support">{{Tickcross|true}}</td>}}
<td class="table-api-body-support">{{Tickcross|{{{windows 32-bit exe|}}}|Windows 32-bit executable|{{{windows exe notes|}}}}}</td>
+
<td class="table-api-body-support">{{Tickcross|{{{windows 32-bit exe|}}}||{{{windows exe notes|}}}}}</td>
<td class="table-api-body-support">{{Tickcross|{{{windows 64-bit exe|}}}|Windows 64-bit executable|{{{windows exe notes|}}}}}</td><!--
+
<td class="table-api-body-support">{{Tickcross|{{{windows 64-bit exe|}}}||{{{windows exe notes|}}}}}</td><!--
-->{{#if:{{#var:arm app}}|<td class="table-api-body-support">{{Tickcross|{{{windows arm app|}}}|Windows ARM app|{{{windows exe notes|}}}}}</td>}}
+
-->{{#if:{{#var:arm app}}|<td class="table-api-body-support">{{Tickcross|{{{windows arm app|}}}||{{{windows exe notes|}}}}}</td>}}
 
<td class="table-api-body-notes">{{#if: {{{windows exe notes|}}}|{{{windows exe notes|}}}|{{#if:{{#var:Windows 3.x native}}|''Windows 3.x version might be playable on a 64-bit OS using {{#if:{{#var:ScummVM}}|[[ScummVM]]|[https://github.com/otya128/winevdm winevdm]}}.''}}}}</td>
 
<td class="table-api-body-notes">{{#if: {{{windows exe notes|}}}|{{{windows exe notes|}}}|{{#if:{{#var:Windows 3.x native}}|''Windows 3.x version might be playable on a 64-bit OS using {{#if:{{#var:ScummVM}}|[[ScummVM]]|[https://github.com/otya128/winevdm winevdm]}}.''}}}}</td>
 
</tr>
 
</tr>
Line 212: Line 216:
 
<tr class="template-infotable-body table-api-body-row">
 
<tr class="template-infotable-body table-api-body-row">
 
<th scope="row" class="table-api-body-parameter">macOS (OS X)</th><!--
 
<th scope="row" class="table-api-body-parameter">macOS (OS X)</th><!--
-->{{#if:{{#var:powerpc app}}|<td class="table-api-body-support">{{Tickcross|{{{mac os x powerpc app|}}}|Mac OS X PowerPC app|{{{macos app notes|}}}}}</td><!--
+
-->{{#if:{{#var:powerpc app}}|<td class="table-api-body-support">{{Tickcross|{{{mac os x powerpc app|}}}||{{{macos app notes|}}}}}</td><!--
 
-->{{#ifeq:{{{mac os x powerpc app|}}}{{{macos intel 32-bit app|}}}{{{macos 32-bit app|}}}{{{macos intel 64-bit app|}}}{{{macos 64-bit app|}}}|truefalsefalse|{{#ifeq:{{{macos arm app|}}}|true||{{#vardefine:Warnings|true}}}}}}}}<!--
 
-->{{#ifeq:{{{mac os x powerpc app|}}}{{{macos intel 32-bit app|}}}{{{macos 32-bit app|}}}{{{macos intel 64-bit app|}}}{{{macos 64-bit app|}}}|truefalsefalse|{{#ifeq:{{{macos arm app|}}}|true||{{#vardefine:Warnings|true}}}}}}}}<!--
 
-->{{#if:{{#var:Windows 3.x native}}|<td class="table-api-body-support">{{Tickcross-na|n/a}}</td>}}
 
-->{{#if:{{#var:Windows 3.x native}}|<td class="table-api-body-support">{{Tickcross-na|n/a}}</td>}}
 
<td class="table-api-body-support">{{Tickcross|{{{macos intel 32-bit app|{{{macos 32-bit app|}}}}}}|macOS Intel 32-bit app|{{{macos app notes|}}}}}</td>
 
<td class="table-api-body-support">{{Tickcross|{{{macos intel 32-bit app|{{{macos 32-bit app|}}}}}}|macOS Intel 32-bit app|{{{macos app notes|}}}}}</td>
 
<td class="table-api-body-support">{{Tickcross|{{{macos intel 64-bit app|{{{macos 64-bit app|}}}}}}|macOS Intel 64-bit app|{{{macos app notes|}}}}}</td><!--
 
<td class="table-api-body-support">{{Tickcross|{{{macos intel 64-bit app|{{{macos 64-bit app|}}}}}}|macOS Intel 64-bit app|{{{macos app notes|}}}}}</td><!--
-->{{#if:{{#var:arm app}}|<td class="table-api-body-support">{{Tickcross|{{{macos arm app|}}}|MacOS ARM app|{{{macos app notes|}}}}}</td>}}
+
-->{{#if:{{#var:arm app}}|<td class="table-api-body-support">{{Tickcross|{{{macos arm app|}}}||{{{macos app notes|}}}}}</td>}}
 
<td class="table-api-body-notes">{{#ifeq:{{{macos intel 32-bit app|{{{macos 32-bit app|}}}}}}{{{macos intel 64-bit app|{{{macos 64-bit app|}}}}}}|truefalse|{{#ifeq:{{{macos arm app|}}}|true||{{#if:{{{macos app notes|}}}{{{macos arm notes|}}}|{{{macos app notes|}}} {{{macos arm notes|}}}|''This 32-bit-only macOS game '''does not work''' on macOS Catalina (10.15) or later.''}}}}|{{{macos app notes|}}} {{{macos arm notes|}}}}}</td>
 
<td class="table-api-body-notes">{{#ifeq:{{{macos intel 32-bit app|{{{macos 32-bit app|}}}}}}{{{macos intel 64-bit app|{{{macos 64-bit app|}}}}}}|truefalse|{{#ifeq:{{{macos arm app|}}}|true||{{#if:{{{macos app notes|}}}{{{macos arm notes|}}}|{{{macos app notes|}}} {{{macos arm notes|}}}|''This 32-bit-only macOS game '''does not work''' on macOS Catalina (10.15) or later.''}}}}|{{{macos app notes|}}} {{{macos arm notes|}}}}}</td>
 
</tr>
 
</tr>
Line 230: Line 234:
 
<tr class="template-infotable-body table-api-body-row">
 
<tr class="template-infotable-body table-api-body-row">
 
<th scope="row" class="table-api-body-parameter">Linux</th><!--
 
<th scope="row" class="table-api-body-parameter">Linux</th><!--
-->{{#if:{{#var:powerpc app}}|<td class="table-api-body-support">{{Tickcross|{{{linux powerpc app|}}}|Linux PowerPC app|{{{linux executable notes|}}}}}</td>}}<!--
+
-->{{#if:{{#var:powerpc app}}|<td class="table-api-body-support">{{Tickcross|{{{linux powerpc app|}}}||{{{linux executable notes|}}}}}</td>}}<!--
 
-->{{#if:{{#var:Windows 3.x native}}|<td class="table-api-body-support">{{Tickcross-na|n/a}}</td>}}
 
-->{{#if:{{#var:Windows 3.x native}}|<td class="table-api-body-support">{{Tickcross-na|n/a}}</td>}}
<td class="table-api-body-support">{{Tickcross|{{{linux 32-bit executable|}}}|Linux 32-bit executable|{{{linux executable notes|}}}}}</td>
+
<td class="table-api-body-support">{{Tickcross|{{{linux 32-bit executable|}}}||{{{linux executable notes|}}}}}</td>
<td class="table-api-body-support">{{Tickcross|{{{linux 64-bit executable|}}}|Linux 64-bit executable|{{{linux executable notes|}}}}}</td><!--
+
<td class="table-api-body-support">{{Tickcross|{{{linux 64-bit executable|}}}||{{{linux executable notes|}}}}}</td><!--
-->{{#if:{{#var:arm app}}|<td class="table-api-body-support">{{Tickcross|{{{linux arm app|}}}|Linux ARM app|{{{linux executable notes|}}}}}</td>}}
+
-->{{#if:{{#var:arm app}}|<td class="table-api-body-support">{{Tickcross|{{{linux arm app|}}}||{{{linux executable notes|}}}}}</td>}}
 
<td class="table-api-body-notes">{{{linux executable notes|}}}</td>
 
<td class="table-api-body-notes">{{{linux executable notes|}}}</td>
 
</tr>
 
</tr>
Line 253: Line 257:
 
|DOS_video_modes={{#var:DOS modes}}
 
|DOS_video_modes={{#var:DOS modes}}
 
|Shader_Model_versions={{{shader model versions|}}}
 
|Shader_Model_versions={{{shader model versions|}}}
|Windows_32-bit_executable={{{windows 32-bit exe|}}}
+
|Windows_16bit_executable={{#var:Windows 3.x}}
|Windows_64-bit_executable={{{windows 64-bit exe|}}}
+
|Windows_32bit_executable={{{windows 32-bit exe|}}}
 +
|Windows_64bit_executable={{{windows 64-bit exe|}}}
 
|Windows_ARM_app={{{windows arm app|}}}
 
|Windows_ARM_app={{{windows arm app|}}}
 
|Mac_OS_X_PowerPC_app={{{mac os x powerpc app|}}}
 
|Mac_OS_X_PowerPC_app={{{mac os x powerpc app|}}}
|macOS_Intel_32-bit_app={{{macos intel 32-bit app|}}}
+
|macOS_Intel_32bit_app={{{macos intel 32-bit app|}}}
|macOS_Intel_64-bit_app={{{macos intel 64-bit app|}}}
+
|macOS_Intel_64bit_app={{{macos intel 64-bit app|}}}
 
|macOS_ARM_app={{{macos arm app|}}}
 
|macOS_ARM_app={{{macos arm app|}}}
 
|Linux_PowerPC_app={{{linux powerpc app|}}}
 
|Linux_PowerPC_app={{{linux powerpc app|}}}
|Linux_32-bit_executable={{{linux 32-bit executable|}}}
+
|Linux_32bit_executable={{{linux 32-bit executable|}}}
|Linux_64-bit_executable={{{linux 64-bit executable|}}}
+
|Linux_64bit_executable={{{linux 64-bit executable|}}}
 
|Linux_ARM_app={{{linux arm app|}}}
 
|Linux_ARM_app={{{linux arm app|}}}
 
}}}}|{{ii}} ''No API information; <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span> to add it.''}}{{#if: {{{vulkan support|}}} |[[Category:Invalid template usage (API)]]}}</includeonly><noinclude>{{Documentation}}</noinclude>
 
}}}}|{{ii}} ''No API information; <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span> to add it.''}}{{#if: {{{vulkan support|}}} |[[Category:Invalid template usage (API)]]}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 02:10, 3 October 2021

Error: #cargo_declare must be called from a template page.
Documentation for the above template (sometimes hidden from view).