Difference between revisions of "BobscreenTest"
From Sega Retro
(fewer file reads = better performance) |
|||
Line 48: | Line 48: | ||
| 496 × 192 = yes <!--Master System (cropped)--> | | 496 × 192 = yes <!--Master System (cropped)--> | ||
| no | | no | ||
− | }}}}{{#if:{{{width|}}} | {{#vardefine:bswidth|{{{width|}}}}} {{#vardefine:bsheight|{{#expr:{{ | + | }}}}{{#if:{{{width|}}} | {{#vardefine:bswidth|{{{width|}}}}} {{#vardefine:bsheight|{{#expr:{{w2h|{{{1}}}|{{#expr:{{{width|}}}/{{#var:hscale}}}}}}*{{#var:vscale}}}}}} |
− | }}{{#if:{{{height|}}} | {{#vardefine:bsheight|{{{height|}}}}} {{#vardefine:bswidth|{{#expr:{{ | + | }}{{#if:{{{height|}}} | {{#vardefine:bsheight|{{{height|}}}}} {{#vardefine:bswidth|{{#expr:({{h2w|{{{1}}}|{{#expr:{{{height|}}}}}/{{#var:vscale}}}})*{{#var:hscale}}}}}} |
− | }}{{#if:{{{width|}}}{{{height|}}} || {{#ifexpr:({{# | + | }}{{#if:{{{width|}}}{{{height|}}} || {{#ifexpr:({{#mediawidth:{{{1}}}}}*{{#var:hscale}})<{{#ifeq:{{#var:is3d}}|yes|641|321}} |
− | | {{#vardefine:bswidth|{{#expr:{{# | + | | {{#vardefine:bswidth|{{#expr:{{#mediawidth:{{{1}}}}}*{{#var:hscale}}}}}}{{#vardefine:bsheight|{{#expr:{{#mediaheight:{{{1}}}}}*{{#var:vscale}}}}}} |
− | | {{#vardefine:bswidth|320}}{{#vardefine:bsheight|{{#expr:{{ | + | | {{#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]]</div></div></includeonly><noinclude> | ||
Line 61: | Line 61: | ||
returns | returns | ||
− | {{ | + | {{BobscreenTest|MagicalPuzzlePopils title.png}} |
This is how the game appears on an actual [[Sega Game Gear]]. The original image taken from an emulator is below: | This is how the game appears on an actual [[Sega Game Gear]]. The original image taken from an emulator is below: | ||
Line 67: | Line 67: | ||
===Options=== | ===Options=== | ||
− | <tt><nowiki>{{ | + | <tt><nowiki>{{BobscreenTest|MagicalPuzzlePopils title.png|width=120}}</nowiki></tt> |
returns | returns | ||
− | {{ | + | {{BobscreenTest|MagicalPuzzlePopils 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. | "width" also takes into account the adjusted aspect ratio, so the image appears 120 pixels wide even if the source image is not. | ||
Line 79: | Line 79: | ||
| <nowiki>{{bobscreen|Gain Ground Title.png|height=320}}</nowiki> | | <nowiki>{{bobscreen|Gain Ground Title.png|height=320}}</nowiki> | ||
| [[File:Gain Ground Title.png]] | | [[File:Gain Ground Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|Gain Ground Title.png|height=320}} |
|- | |- | ||
| <nowiki>{{bobscreen|Virtua Fighter Title.png}}</nowiki> | | <nowiki>{{bobscreen|Virtua Fighter Title.png}}</nowiki> | ||
| [[File:Virtua Fighter Title.png]] | | [[File:Virtua Fighter Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|Virtua Fighter Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|AlteredBeast PS2 title.png}}</nowiki> | | <nowiki>{{bobscreen|AlteredBeast PS2 title.png}}</nowiki> | ||
| [[File:AlteredBeast PS2 title.png]] | | [[File:AlteredBeast PS2 title.png]] | ||
− | | {{ | + | | {{BobscreenTest|AlteredBeast PS2 title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|BladeEagle title.png}}</nowiki> | | <nowiki>{{bobscreen|BladeEagle title.png}}</nowiki> | ||
| [[File:BladeEagle title.png]] | | [[File:BladeEagle title.png]] | ||
− | | {{ | + | | {{BobscreenTest|BladeEagle title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|OutRun3D title.png}}</nowiki> | | <nowiki>{{bobscreen|OutRun3D title.png}}</nowiki> | ||
| [[File:OutRun3D title.png]] | | [[File:OutRun3D title.png]] | ||
− | | {{ | + | | {{BobscreenTest|OutRun3D title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|Scd titlescreen.png}}</nowiki> | | <nowiki>{{bobscreen|Scd titlescreen.png}}</nowiki> | ||
| [[File:Scd titlescreen.png]] | | [[File:Scd titlescreen.png]] | ||
− | | {{ | + | | {{BobscreenTest|Scd titlescreen.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|WinterHeat title.png}}</nowiki> | | <nowiki>{{bobscreen|WinterHeat title.png}}</nowiki> | ||
| [[File:WinterHeat title.png]] | | [[File:WinterHeat title.png]] | ||
− | | {{ | + | | {{BobscreenTest|WinterHeat title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|Clockwork Knight Title.png}}</nowiki> | | <nowiki>{{bobscreen|Clockwork Knight Title.png}}</nowiki> | ||
| [[File:Clockwork Knight Title.png]] | | [[File:Clockwork Knight Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|Clockwork Knight Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|NiGHTS title.png}}</nowiki> | | <nowiki>{{bobscreen|NiGHTS title.png}}</nowiki> | ||
| [[File:NiGHTS title.png]] | | [[File:NiGHTS title.png]] | ||
− | | {{ | + | | {{BobscreenTest|NiGHTS title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|VirtuaFighter 32X Widescreen2.png|forcewidescreen=yes}}</nowiki> | | <nowiki>{{bobscreen|VirtuaFighter 32X Widescreen2.png|forcewidescreen=yes}}</nowiki> | ||
| [[File:VirtuaFighter 32X Widescreen2.png]] | | [[File:VirtuaFighter 32X Widescreen2.png]] | ||
− | | {{ | + | | {{BobscreenTest|VirtuaFighter 32X Widescreen2.png|forcewidescreen=yes}} |
|- | |- | ||
| <nowiki>{{bobscreen|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes}}</nowiki> | | <nowiki>{{bobscreen|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes}}</nowiki> | ||
| [[File:VirtuaFighter 32X Widescreen2 PAL.png]] | | [[File:VirtuaFighter 32X Widescreen2 PAL.png]] | ||
− | | {{ | + | | {{BobscreenTest|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes}} |
|- | |- | ||
| <nowiki>{{bobscreen|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes|width=200}}</nowiki> | | <nowiki>{{bobscreen|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes|width=200}}</nowiki> | ||
| [[File:VirtuaFighter 32X Widescreen2 PAL.png]] | | [[File:VirtuaFighter 32X Widescreen2 PAL.png]] | ||
− | | {{ | + | | {{BobscreenTest|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes|width=200}} |
|- | |- | ||
| <nowiki>{{bobscreen|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes|height=240}}</nowiki> | | <nowiki>{{bobscreen|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes|height=240}}</nowiki> | ||
| [[File:VirtuaFighter 32X Widescreen2 PAL.png]] | | [[File:VirtuaFighter 32X Widescreen2 PAL.png]] | ||
− | | {{ | + | | {{BobscreenTest|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes|height=240}} |
|- | |- | ||
| <nowiki>{{bobscreen|Deep Scan.png}}</nowiki> | | <nowiki>{{bobscreen|Deep Scan.png}}</nowiki> | ||
| [[File:Deep Scan.png]] | | [[File:Deep Scan.png]] | ||
− | | {{ | + | | {{BobscreenTest|Deep Scan.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|Deep Scan.png|height=320}}</nowiki> | | <nowiki>{{bobscreen|Deep Scan.png|height=320}}</nowiki> | ||
| [[File:Deep Scan.png]] | | [[File:Deep Scan.png]] | ||
− | | {{ | + | | {{BobscreenTest|Deep Scan.png|height=320}} |
|- | |- | ||
| <nowiki>{{bobscreen|Deep Scan.png|width=200}}</nowiki> | | <nowiki>{{bobscreen|Deep Scan.png|width=200}}</nowiki> | ||
| [[File:Deep Scan.png]] | | [[File:Deep Scan.png]] | ||
− | | {{ | + | | {{BobscreenTest|Deep Scan.png|width=200}} |
|- | |- | ||
| <nowiki>{{bobscreen|Alex Kidd in Miracle World Title.png}}</nowiki> | | <nowiki>{{bobscreen|Alex Kidd in Miracle World Title.png}}</nowiki> | ||
| [[File:Alex Kidd in Miracle World Title.png]] | | [[File:Alex Kidd in Miracle World Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|Alex Kidd in Miracle World Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|Outrun2spsdxscreen.png|width=320}}</nowiki> | | <nowiki>{{bobscreen|Outrun2spsdxscreen.png|width=320}}</nowiki> | ||
| [[File:Outrun2spsdxscreen.png|320px]] | | [[File:Outrun2spsdxscreen.png|320px]] | ||
− | | {{ | + | | {{BobscreenTest|Outrun2spsdxscreen.png|width=320}} |
|- | |- | ||
| <nowiki>{{bobscreen|OutRun IBMPC CGA Title.png|width=320}}</nowiki> | | <nowiki>{{bobscreen|OutRun IBMPC CGA Title.png|width=320}}</nowiki> | ||
| [[File:OutRun IBMPC CGA Title.png|320px]] | | [[File:OutRun IBMPC CGA Title.png|320px]] | ||
− | | {{ | + | | {{BobscreenTest|OutRun IBMPC CGA Title.png|width=320}} |
|- | |- | ||
| <nowiki>{{bobscreen|OutRun IBMPC Hercules Title.png|width=320}}</nowiki> | | <nowiki>{{bobscreen|OutRun IBMPC Hercules Title.png|width=320}}</nowiki> | ||
| [[File:OutRun IBMPC Hercules Title.png|320px]] | | [[File:OutRun IBMPC Hercules Title.png|320px]] | ||
− | | {{ | + | | {{BobscreenTest|OutRun IBMPC Hercules Title.png|width=320}} |
|- | |- | ||
| <nowiki>{{bobscreen|GoldenAxe IBMPC Hercules Title.png|width=320}}</nowiki> | | <nowiki>{{bobscreen|GoldenAxe IBMPC Hercules Title.png|width=320}}</nowiki> | ||
| [[File:GoldenAxe IBMPC Hercules Title.png|320px]] | | [[File:GoldenAxe IBMPC Hercules Title.png|320px]] | ||
− | | {{ | + | | {{BobscreenTest|GoldenAxe IBMPC Hercules Title.png|width=320}} |
|- | |- | ||
| <nowiki>{{bobscreen|SpaceHarrier Amiga title.png|width=320}}</nowiki> | | <nowiki>{{bobscreen|SpaceHarrier Amiga title.png|width=320}}</nowiki> | ||
| [[File:SpaceHarrier Amiga title.png|320px]] | | [[File:SpaceHarrier Amiga title.png|320px]] | ||
− | | {{ | + | | {{BobscreenTest|SpaceHarrier Amiga title.png|width=320}} |
|- | |- | ||
| <nowiki>{{bobscreen|FroggerII A8B Level1.png|width=320}}</nowiki> | | <nowiki>{{bobscreen|FroggerII A8B Level1.png|width=320}}</nowiki> | ||
| [[File:FroggerII A8B Level1.png|320px]] | | [[File:FroggerII A8B Level1.png|320px]] | ||
− | | {{ | + | | {{BobscreenTest|FroggerII A8B Level1.png|width=320}} |
|- | |- | ||
| <nowiki>{{bobscreen|AfterBurnerII PCE Title.png}}</nowiki> | | <nowiki>{{bobscreen|AfterBurnerII PCE Title.png}}</nowiki> | ||
| [[File:AfterBurnerII PCE Title.png]] | | [[File:AfterBurnerII PCE Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|AfterBurnerII PCE Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|Columns MSX2 Title2.png}}</nowiki> | | <nowiki>{{bobscreen|Columns MSX2 Title2.png}}</nowiki> | ||
| [[File:Columns MSX2 Title2.png]] | | [[File:Columns MSX2 Title2.png]] | ||
− | | {{ | + | | {{BobscreenTest|Columns MSX2 Title2.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|BuckRogers VIC20 Title.png}}</nowiki> | | <nowiki>{{bobscreen|BuckRogers VIC20 Title.png}}</nowiki> | ||
| [[File:BuckRogers VIC20 Title.png]] | | [[File:BuckRogers VIC20 Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|BuckRogers VIC20 Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|BuckRogers VIC20 Gameplay.png}}</nowiki> | | <nowiki>{{bobscreen|BuckRogers VIC20 Gameplay.png}}</nowiki> | ||
| [[File:BuckRogers VIC20 Gameplay.png]] | | [[File:BuckRogers VIC20 Gameplay.png]] | ||
− | | {{ | + | | {{BobscreenTest|BuckRogers VIC20 Gameplay.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|Frogger 2600 Gameplay.png}}</nowiki> | | <nowiki>{{bobscreen|Frogger 2600 Gameplay.png}}</nowiki> | ||
| [[File:Frogger 2600 Gameplay.png]] | | [[File:Frogger 2600 Gameplay.png]] | ||
− | | {{ | + | | {{BobscreenTest|Frogger 2600 Gameplay.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|SuperZaxxon AppleII Gameplay.png}}</nowiki> | | <nowiki>{{bobscreen|SuperZaxxon AppleII Gameplay.png}}</nowiki> | ||
| [[File:SuperZaxxon AppleII Gameplay.png]] | | [[File:SuperZaxxon AppleII Gameplay.png]] | ||
− | | {{ | + | | {{BobscreenTest|SuperZaxxon AppleII Gameplay.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|Carnival 2600 Gameplay.png}}</nowiki> | | <nowiki>{{bobscreen|Carnival 2600 Gameplay.png}}</nowiki> | ||
| [[File:Carnival 2600 Gameplay.png]] | | [[File:Carnival 2600 Gameplay.png]] | ||
− | | {{ | + | | {{BobscreenTest|Carnival 2600 Gameplay.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|GLOC Amiga Title.png}}</nowiki> | | <nowiki>{{bobscreen|GLOC Amiga Title.png}}</nowiki> | ||
| [[File:GLOC Amiga Title.png]] | | [[File:GLOC Amiga Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|GLOC Amiga Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|HotRod Amiga Title.png}}</nowiki> | | <nowiki>{{bobscreen|HotRod Amiga Title.png}}</nowiki> | ||
| [[File:HotRod Amiga Title.png]] | | [[File:HotRod Amiga Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|HotRod Amiga Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|SpaceHarrier X68 JP SSBoss.png}}</nowiki> | | <nowiki>{{bobscreen|SpaceHarrier X68 JP SSBoss.png}}</nowiki> | ||
| [[File:SpaceHarrier X68 JP SSBoss.png]] | | [[File:SpaceHarrier X68 JP SSBoss.png]] | ||
− | | {{ | + | | {{BobscreenTest|SpaceHarrier X68 JP SSBoss.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|BonanzaBros_X68_JP_SSTitle.png}}</nowiki> | | <nowiki>{{bobscreen|BonanzaBros_X68_JP_SSTitle.png}}</nowiki> | ||
| [[File:BonanzaBros_X68_JP_SSTitle.png]] | | [[File:BonanzaBros_X68_JP_SSTitle.png]] | ||
− | | {{ | + | | {{BobscreenTest|BonanzaBros_X68_JP_SSTitle.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|AlienSyndrome X68 JP SSIngame.png}}</nowiki> | | <nowiki>{{bobscreen|AlienSyndrome X68 JP SSIngame.png}}</nowiki> | ||
| [[File:AlienSyndrome X68 JP SSIngame.png]] | | [[File:AlienSyndrome X68 JP SSIngame.png]] | ||
− | | {{ | + | | {{BobscreenTest|AlienSyndrome X68 JP SSIngame.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|LastBattle Amiga Title.png}}</nowiki> | | <nowiki>{{bobscreen|LastBattle Amiga Title.png}}</nowiki> | ||
| [[File:LastBattle Amiga Title.png]] | | [[File:LastBattle Amiga Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|LastBattle Amiga Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|Doom SNES Title.png}}</nowiki> | | <nowiki>{{bobscreen|Doom SNES Title.png}}</nowiki> | ||
| [[File:Doom SNES Title.png]] | | [[File:Doom SNES Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|Doom SNES Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|Flashback Amiga Title.png}}</nowiki> | | <nowiki>{{bobscreen|Flashback Amiga Title.png}}</nowiki> | ||
| [[File:Flashback Amiga Title.png]] | | [[File:Flashback Amiga Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|Flashback Amiga Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|GhoulsnGhosts Arcade Title.png}}</nowiki> | | <nowiki>{{bobscreen|GhoulsnGhosts Arcade Title.png}}</nowiki> | ||
| [[File:GhoulsnGhosts Arcade Title.png]] | | [[File:GhoulsnGhosts Arcade Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|GhoulsnGhosts Arcade Title.png}} |
|- | |- | ||
| <nowiki>{{bobscreen|DarkCastle Amiga Title.png}}</nowiki> | | <nowiki>{{bobscreen|DarkCastle Amiga Title.png}}</nowiki> | ||
| [[File:DarkCastle Amiga Title.png]] | | [[File:DarkCastle Amiga Title.png]] | ||
− | | {{ | + | | {{BobscreenTest|DarkCastle Amiga Title.png}} |
|} | |} | ||
[[Category:Breakout box templates]] | [[Category:Breakout box templates]] | ||
</noinclude> | </noinclude> |
Revision as of 00:17, 9 December 2019
This template sets the maximum width of a screenshot to 320 pixels, and corrects its aspect ratio.
Usage
{{bobscreen|MagicalPuzzlePopils title.png}}
returns
This is how the game appears on an actual Sega Game Gear. The original image taken from an emulator is below:
Options
{{BobscreenTest|MagicalPuzzlePopils 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.