Actions

Template

Difference between revisions of "Bobscreen"

From Sonic Retro

(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
| 224 × 224 = (320/224) <!--Bank Panic-->
 
| 224 × 224 = (320/224) <!--Bank Panic-->
 
| 240 × 224 = (320/240) <!--Super Locomotive-->
 
| 240 × 224 = (320/240) <!--Super Locomotive-->
 +
| 256 × 240 = 1.25 <!--X68000-->
 
| 288 × 224 = 1 <!--Flashgal, appears to use square pixels.-->
 
| 288 × 224 = 1 <!--Flashgal, appears to use square pixels.-->
 
| 384 × 496 = (372/384) <!--Vertical arcade (e.g. Gain Ground)-->
 
| 384 × 496 = (372/384) <!--Vertical arcade (e.g. Gain Ground)-->
Line 30: Line 31:
 
| {{#vardefine:bswidth|{{#expr:{{#mediawidth:{{{1}}}}}*{{#var:hscale}}}}}}{{#vardefine:bsheight|{{#expr:{{#mediaheight:{{{1}}}}}*{{#var:vscale}}}}}}
 
| {{#vardefine:bswidth|{{#expr:{{#mediawidth:{{{1}}}}}*{{#var:hscale}}}}}}{{#vardefine:bsheight|{{#expr:{{#mediaheight:{{{1}}}}}*{{#var:vscale}}}}}}
 
| {{#vardefine:bswidth|320}}{{#vardefine:bsheight|{{#expr:{{w2h|{{{1}}}|{{#expr:320/{{#var:hscale}}}}}}*{{#var:vscale}}}} }}}}
 
| {{#vardefine:bswidth|320}}{{#vardefine:bsheight|{{#expr:{{w2h|{{{1}}}|{{#expr:320/{{#var:hscale}}}}}}*{{#var:vscale}}}} }}}}
}}{{#vardefine:rawwidth|{{#expr:trunc({{#var:bswidth}}/{{#var:hscale}})}}}}{{#ifeq:{{#var:is3d}}|yes|{{#vardefine:bswidth|{{#expr:{{#var:bswidth}}/2}}}}}}<div class="bobscreen" style="width:{{#var:bswidth}}px; height:{{#var:bsheight}}px; display:inline-block; text-align:center; overflow:hidden;"><div style="transform:scale({{#var:hscale}},{{#var:vscale}}); transform-origin:0% 0%; width:{{#var:rawwidth}}px !important;">[[File:{{{1}}}|{{#var:rawwidth}}px]]</div></div></includeonly><noinclude>
+
}}{{#vardefine:rawwidth|{{#expr:trunc({{#var:bswidth}}/{{#var:hscale}})}}}}{{#ifeq:{{#var:is3d}}|yes|{{#vardefine:bswidth|{{#expr:{{#var:bswidth}}/2}}}}}}<div class="bobscreen" style="width:{{#var:bswidth}}px; height:{{#var:bsheight}}px; display:inline-block; text-align:center; overflow:hidden;"><div style="transform:scale({{#var:hscale}},{{#var:vscale}}); transform-origin:0% 0%; width:{{#var:rawwidth}}px !important;">[[File:{{{1}}}|{{#var:rawwidth}}px{{#if:{{{link|}}}|{{!}}link={{{link|}}}|}}]]</div></div></includeonly><noinclude>
 
==Usage==
 
==Usage==
 
<tt><nowiki>{{bobscreen|Sonic Chaos title GG.png}}</nowiki></tt>
 
<tt><nowiki>{{bobscreen|Sonic Chaos title GG.png}}</nowiki></tt>
Line 36: Line 37:
 
returns
 
returns
 
{{bobscreen|Sonic Chaos title GG.png}}
 
{{bobscreen|Sonic Chaos title GG.png}}
 +
{{bobscreen|Sonic Chaos title GG.png|link=Sonic Triple Trouble}}
  
 
[[Category:Breakout box templates]]</noinclude>
 
[[Category:Breakout box templates]]</noinclude>

Revision as of 12:59, 19 September 2019

Usage

{{bobscreen|Sonic Chaos title GG.png}}

returns

Sonic Chaos title GG.png
Sonic Chaos title GG.png