Difference between revisions of "Bobscreen"
From NEC Retro
(10 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly>{{#if:{{{noresize|}}}|[[File:{{{1|}}}{{#if:{{{width|}}}{{{height|}}}|{{!}}}}{{#if:{{{width|}}}|{{{width|}}}}}{{#if:{{{height|}}}|x{{{height|}}}}}{{#if:{{{width|}}}{{{height|}}}|px}}]]|{{let|imagedim={{#replace:{{#mediadimensions:{{{1|}}}}}|,|}}}}{{let|imagew={{#explode:{{#var:imagedim}}|×|0}}|imageh={{#explode:{{#var:imagedim}}|×|1}}}} |
− | {{# | + | {{let|bsparams={{#switch:{{#var:imagedim}} |
− | {{ | + | <!--thumbnail width, display width, display height, crop (top, bottom, left, right)--> |
− | {{ | + | | 256 × 192 = 256,{{#switch:{{{smsgg|}}}|yes=192,144|256,192}},0,0,0,0 <!--Master System--> |
− | {{# | + | | 248 × 192 = 248,248,192,0,0,0,0 <!--Master System (cropped)--> |
− | {{# | + | | 512 × 192 = 512,512,192,0,0,0,256 <!--Master System 3D--> |
− | {{# | + | | 496 × 192 = 496,496,192,0,0,0,248 <!--Master System 3D (cropped)--> |
− | {{# | + | | 256 × 224 = 256,320,224,0,0,0,0 <!--Mega Drive--> |
− | {{# | + | | 256 × 240 = 256,320,240,0,0,0,0 <!--Mega Drive PAL; X68000--> |
− | {{# | + | | 640 × 480 |
− | {{# | + | | 320 × 480 = 320,320,240,0,0,0,0 <!--Mega Drive PAL interlaced--> |
− | {{# | + | | 160 × 144 = 160,192,144,0,0,0,0 <!--Game Gear--> |
− | + | | 352 × 224 | |
+ | | 704 × 448 = 352,320,224,0,0,0,0 <!--Saturn--> | ||
+ | | 352 × 240 | ||
+ | | 352 × 256 | ||
+ | | 704 × 480 = 352,320,240,0,0,0,0 <!--Saturn PAL--> | ||
+ | | 224 × 224 = 224,320,224,0,0,0,0 <!--Bank Panic--> | ||
+ | | 240 × 224 = 240,320,224,0,0,0,0 <!--Super Locomotive--> | ||
+ | | 288 × 224 = 288,288,224,0,0,0,0 <!--Flashgal, appears to use square pixels.--> | ||
+ | | 384 × 496 = 384,224,320,0,0,0,0 <!--Vertical arcade (e.g. Gain Ground)--> | ||
+ | | 384 × 224 = 384,320,224,0,0,0,0 <!-- Capcom arcade --> | ||
+ | | 416 × 224 = 416,320,224,0,0,0,0 <!-- Burning Rival --> | ||
+ | | 224 × 320 = 224,224,320,0,0,0,0 <!--Vertical arcade (e.g. Time Scanner)--> | ||
+ | | 224 × 256 = 224,224,320,0,0,0,0 <!--Vertical arcade (e.g. Deep Scan)--> | ||
+ | | 240 × 256 = 240,240,320,0,0,0,0 <!--Vertical arcade (e.g. Angel Kids)--> | ||
+ | | 208 × 256 = 208,208,277,0,0,0,0 <!--Vertical arcade (e.g. Bull Fighter)--> | ||
+ | | 224 × 240 = 224,224,320,0,0,0,0 <!--Vertical arcade (e.g. Water Match)--> | ||
+ | | 480 × 640 = 240,240,320,0,0,0,0 <!--Vertical arcade (e.g. Ikaruga)--> | ||
+ | | 512 × 480 = 320,320,240,0,0,0,0 <!--Astron Belt--> | ||
+ | | 224 × 288 = 224,224,288,0,0,0,0 <!--Pengo, square pixels.--> | ||
+ | | 496 × 384 = 320,320,240,0,0,0,0 <!--Model 1/2 (e.g. Virtua Fighter)--> | ||
+ | | 400 × 254 = 400,320,240,0,0,0,0 <!-- Midway arcade --> | ||
+ | | 288 × 216 = 288,320,240,0,0,0,0 <!--Rabio Lepus--> | ||
+ | | 248 × 224 = 248,320,224,0,0,0,0 <!-- PC Engine --> | ||
+ | | 512 × 239 = 512,320,239,0,0,0,0 <!--SNES--> | ||
+ | | 512 × 478 | ||
+ | | 256 × 239 = 256,320,239,0,0,0,0 <!--NES/SNES--> | ||
+ | | 512 × 224 = 512,320,224,0,0,0,0 <!--SNES--> | ||
+ | | 512 × 448 = 320,320,224,0,0,0,0 <!--SNES; PlayStation 2--> | ||
+ | | 240 × 160 = 240,240,160,0,0,0,0 <!--GBA--> | ||
+ | | 256 × 384 = 256,256,384,0,0,0,0 <!--Nintendo DS--> | ||
+ | | 400 × 480 = 320,320,384,0,0,0,0 <!--Nintendo 3DS--> | ||
+ | <!--| 800 × 480 = 640,640,384,0,0,0,320 <!--Nintendo 3DS 3D--> needs a rethink because Android--> | ||
+ | | 480 × 272 = 320,320,181,0,0,0,0 <!--PlayStation Portable--> | ||
+ | | 960 × 544 = 320,320,181,0,0,0,0 <!--PlayStation Vita--> | ||
+ | | 800 × 480 = 320,320,192,0,0,0,0 <!--Android--> | ||
+ | | 480 × 800 = 240,240,400,0,0,0,0 <!--Android; vertical--> | ||
+ | | 1792 × 828 = 320,320,147.857,0,0,0,0 <!--iOS --> | ||
+ | | 160 × 152 = 160,160,152,0,0,0,0 <!--NGPC--> | ||
+ | | 240 × 192 = 240,240,192,0,0,0,0 <!-- MSX --> | ||
+ | | 256 × 212 = 256,283,212,0,0,0,0 <!-- MSX2 --> | ||
+ | | 192 × 184 = 192,245.333,184,0,0,0,0 <!-- RX-78 --> | ||
+ | | 320 × 256 = 320,320,240,0,0,0,0 <!-- Amiga --> | ||
+ | | 304 × 224 = 304,320,224,0,0,0,0 <!-- Amiga --> | ||
+ | | 352 × 200 = 352,320,240,0,0,0,0 <!-- Amiga --> | ||
+ | | 320 × 199 | ||
+ | | 320 × 208 | ||
+ | | 320 × 192 = 320,320,240,0,0,0,0 <!-- Amiga --> | ||
+ | | 312 × 192 = 312,312,234,0,0,0,0 <!-- Amiga --> | ||
+ | | 256 × 232 = 256,309,232,0,0,0,0 <!--X68000--> | ||
+ | | 320 × 200 | ||
+ | | 640 × 400 | ||
+ | | 640 × 350 = 320,320,240,0,0,0,0 <!--IBM PC--> | ||
+ | | 640 × 300 | ||
+ | | 720 × 348 = 320,320,240,0,0,0,0 <!--IBM PC (Hercules)--> | ||
+ | | 336 × 240 = 336,320,240,0,0,0,0 <!-- Atari 8-bit --> | ||
+ | | 352 × 184 = 352,320,240,0,0,0,0 <!-- VIC-20 --> | ||
+ | | 360 × 230 = 360,320,240,0,0,0,0 <!-- PC-6001 --> | ||
+ | | 360 × 240 = 360,320,240,0,0,0,0 <!-- VIC-20 --> | ||
+ | | 320 × 210 | ||
+ | | 320 × 214 = 320,320,240,0,0,0,0 <!-- Atari 2600 --> | ||
+ | | 280 × 192 = 280,280,210,0,0,0,0 <!-- Apple II --> | ||
+ | | 768 × 400 = 320,320,240,0,0,0,0 <!-- X68000 (Bonanza Bros.)--> | ||
+ | | 200 × 160 = 200,200,160,0,0,0,0 <!-- Game.com --> | ||
+ | | 176 × 208 = 176,176,208,0,0,0,0 <!-- N-Gage --> | ||
+ | | 1280 × 720 | ||
+ | | 1920 × 1080 | ||
+ | | 2560 × 1440 | ||
+ | | 3840 × 2160 = 320,320,180,0,0,0,0 <!-- HD --> | ||
+ | | 720 × 1280 | ||
+ | | 1080 × 1920 | ||
+ | | 1440 × 2560 | ||
+ | | 2160 × 3840 = 320,180,320,0,0,0,0 <!--HD; vertical--> | ||
+ | | 320,320,224,0,0,0,0 <!--Default is Mega Drive NTSC--> | ||
+ | }}}}{{let | ||
+ | |thumbw={{#explode:{{#var:bsparams}}|,|0}} | ||
+ | |bsw={{#explode:{{#var:bsparams}}|,|1}} | ||
+ | |bsh={{#expr:{{#explode:{{#var:bsparams}}|,|2}}*{{#switch:{{{forcewidescreen|}}}|yes=0.8|1}}}} | ||
+ | |bst={{#explode:{{#var:bsparams}}|,|3}} | ||
+ | |bsb={{#explode:{{#var:bsparams}}|,|4}} | ||
+ | |bsl={{#explode:{{#var:bsparams}}|,|5}} | ||
+ | |bsr={{#explode:{{#var:bsparams}}|,|6}} | ||
+ | }}{{getdim|actual={{#var:imagedim}}|w={{#var:thumbw}}|output=h|var=thumbh}}{{let | ||
+ | |scale={{#if:{{{width|}}}|{{#expr:{{{width|}}}/{{#var:bsw}}}}|{{#if:{{{height|}}}|{{#expr:{{{height|}}}/{{#var:bsh}}}}|1}}}} | ||
+ | |hscale={{#expr:{{#var:bsw}}/{{#var:thumbw}}}} | ||
+ | |vscale={{#expr:{{#var:bsh}}/{{#var:thumbh}}}} | ||
+ | }} | ||
+ | <div style="overflow:hidden; display:inline-block; | ||
+ | width:{{#expr:({{#var:bsw}}-{{#var:bsl}}-{{#var:bsr}})*{{#var:scale}}}}px; | ||
+ | height:{{#expr:({{#var:bsh}}-{{#var:bst}}-{{#var:bsb}})*{{#var:scale}}}}px; | ||
+ | "> | ||
+ | <div class="bobtransform" style="transform:scale({{#var:hscale}},{{#var:vscale}}); transform-origin:0% 0%; !important;"> | ||
+ | <div style="position:relative; width:{{#expr:{{#var:thumbw}}*{{#var:scale}}}}px; height:{{#expr:{{#var:thumbh}}*{{#var:scale}}}}px; | ||
+ | top:-{{#expr:{{#var:bst}}*{{#var:scale}}}}px | ||
+ | left:-{{#expr:{{#var:bsl}}*{{#var:scale}}}}px | ||
+ | "> | ||
+ | [[File:{{{1|}}}|{{#expr:trunc({{#var:thumbw}}*{{#var:scale}})}}px|link={{{link|File:{{{1|}}}}}}]] | ||
+ | </div> | ||
+ | </div> | ||
+ | </div>}}</includeonly><noinclude> | ||
+ | |||
+ | This template sets the maximum width of a screenshot to 320 pixels, and corrects its aspect ratio. | ||
+ | |||
+ | ==Usage== | ||
+ | <tt><nowiki>{{bobscreen|BariBariDensetsu PCE title.png}}</nowiki></tt> | ||
+ | |||
+ | returns | ||
+ | {{bobscreen|BariBariDensetsu PCE title.png}} | ||
+ | This is how the game appears on an actual [[PC Engine]]. The original image taken from an emulator is below: | ||
+ | |||
+ | [[File:BariBariDensetsu PCE title.png]] | ||
+ | |||
+ | ===Options=== | ||
+ | <tt><nowiki>{{bobscreen|BariBariDensetsu PCE title.png|width=120}}</nowiki></tt> | ||
+ | |||
+ | returns | ||
+ | {{bobscreen|BariBariDensetsu PCE title.png|width=120}} | ||
+ | "width" also takes into account the adjusted aspect ratio, so the image appears 120 pixels wide even if the source image is not. | ||
+ | |||
+ | ==Examples== | ||
+ | {|class="prettytable" | ||
+ | ! Code || Raw image || Output | ||
+ | |- | ||
+ | |<nowiki>{{bobscreen|MagneticField PC6001 Title.png}}</nowiki> | ||
+ | |[[File:MagneticField PC6001 Title.png]] | ||
+ | |{{bobscreen|MagneticField PC6001 Title.png}} | ||
+ | |- | ||
+ | |<nowiki>{{bobscreen|MrHeli title.png}}</nowiki> | ||
+ | |[[File:MrHeli title.png]] | ||
+ | |{{bobscreen|MrHeli title.png}} | ||
+ | |- | ||
+ | |<nowiki>{{bobscreen|PuyoPuyoCDTsuu SCDROM2 SystemCardError.png}}</nowiki> | ||
+ | |[[File:PuyoPuyoCDTsuu SCDROM2 SystemCardError.png]] | ||
+ | |{{bobscreen|PuyoPuyoCDTsuu SCDROM2 SystemCardError.png}} | ||
+ | |- | ||
+ | |<nowiki>{{bobscreen|RabioLepus Arcade Title.png}}</nowiki> | ||
+ | |[[File:RabioLepus Arcade Title.png]] | ||
+ | |{{bobscreen|RabioLepus Arcade Title.png}} | ||
+ | |- | ||
+ | |<nowiki>{{bobscreen|Cannon Ball RX-78 Title.png}}</nowiki> | ||
+ | |[[File:Cannon Ball RX-78 Title.png]] | ||
+ | |{{bobscreen|Cannon Ball RX-78 Title.png}} | ||
+ | |- | ||
+ | |<nowiki>{{bobscreen|CannonBall Spectrum Title.png}}</nowiki> | ||
+ | |[[File:CannonBall Spectrum Title.png]] | ||
+ | |{{bobscreen|CannonBall Spectrum Title.png}} | ||
+ | |} | ||
[[Category:Breakout box templates]] | [[Category:Breakout box templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 06:47, 10 June 2024
This template sets the maximum width of a screenshot to 320 pixels, and corrects its aspect ratio.
Usage
{{bobscreen|BariBariDensetsu PCE title.png}}
returns
This is how the game appears on an actual PC Engine. The original image taken from an emulator is below:
Options
{{bobscreen|BariBariDensetsu PCE title.png|width=120}}
returns
"width" also takes into account the adjusted aspect ratio, so the image appears 120 pixels wide even if the source image is not.