From 24cb8ae51694c1ebe57ec405c895cd1464ac8759 Mon Sep 17 00:00:00 2001
From: Michael <goldtextwitch@outlook.com>
Date: Thu, 1 Nov 2018 19:26:54 -0700
Subject: [PATCH] add mario tennis packs

---
 Enhancements/MarioTennis_Shadows/rules.txt |  40 ++
 Source/MarioTennis/rules.txt               | 474 +++++++++++++++++++++
 docs/_data/GameTitles.yml                  |   2 +-
 3 files changed, 515 insertions(+), 1 deletion(-)
 create mode 100644 Enhancements/MarioTennis_Shadows/rules.txt
 create mode 100644 Source/MarioTennis/rules.txt

diff --git a/Enhancements/MarioTennis_Shadows/rules.txt b/Enhancements/MarioTennis_Shadows/rules.txt
new file mode 100644
index 00000000..13ee1054
--- /dev/null
+++ b/Enhancements/MarioTennis_Shadows/rules.txt
@@ -0,0 +1,40 @@
+[Definition]
+titleIds = 00050000101A3500,00050000101A3600,0005000010199000
+name = Shadow Resolution
+path = "Mario Tennis: Ultra Smash/Graphics/Shadow Resolution"
+description = Note: Increasing shadow resolution is known to increase VRAM usage directly. Lowering this might give you a good boost in performance if you're limited on VRAM but makes shadows blockier. Medium is the original resolution.
+version = 3
+
+[Preset]
+name = Medium (1.00x, Default)
+$shadowRes = 1
+
+[Preset]
+name = Low (0.50x)
+$shadowRes = 0.5
+
+[Preset]
+name = High (2.00x)
+$shadowRes = 2
+
+[Preset]
+name = Ultra (4.00x)
+$shadowRes = 4
+
+[Preset]
+name = Extreme (8.00x)
+$shadowRes = 8
+
+[TextureRedefine] # Shadows
+width = 1024
+height = 1024
+formats = 0x005
+overwriteWidth = $shadowRes * 1024
+overwriteHeight = $shadowRes * 1024
+
+[TextureRedefine] # Performance Shadows
+width = 512
+height = 512
+formats = 0x005
+overwriteWidth = $shadowRes * 512
+overwriteHeight = $shadowRes * 512
diff --git a/Source/MarioTennis/rules.txt b/Source/MarioTennis/rules.txt
new file mode 100644
index 00000000..ed8af27b
--- /dev/null
+++ b/Source/MarioTennis/rules.txt
@@ -0,0 +1,474 @@
+[Definition]
+titleIds = 00050000101A3500,00050000101A3600,0005000010199000
+name = Resolution
+path = "Mario Tennis: Ultra Smash/Graphics/Resolution"
+description = Changes the games resolution. You cannot change resolutions on the fly.
+version = 3
+
+[Preset]
+name = 1280x720 (Default)
+$width = 1280
+$height = 720
+$gameWidth = 1280
+$gameHeight = 720
+
+// For [4:3] resolutions that are multiples of 320x180
+// Performance
+
+[Preset]
+name = 320x180
+$width = 320
+$height = 180
+$gameWidth = 1280
+$gameHeight = 720
+
+[Preset]
+name = 640x360
+$width = 640
+$height = 360
+$gameWidth = 1280
+$gameHeight = 720
+
+[Preset]
+name = 960x540
+$width = 960
+$height = 540
+$gameWidth = 1280
+$gameHeight = 720
+
+// Quality
+
+[Preset]
+name = 1920x1080
+$width = 1920
+$height = 1080
+$gameWidth = 1280
+$gameHeight = 720
+
+[Preset]
+name = 2560x1440
+$width = 2560
+$height = 1440
+$gameWidth = 1280
+$gameHeight = 720
+
+[Preset]
+name = 3200x1800
+$width = 3200
+$height = 1800
+$gameWidth = 1280
+$gameHeight = 720
+
+[Preset]
+name = 3840x2160
+$width = 3840
+$height = 2160
+$gameWidth = 1280
+$gameHeight = 720
+
+[Preset]
+name = 5120x2880
+$width = 5120
+$height = 2880
+$gameWidth = 1280
+$gameHeight = 720
+
+// Enthusiast
+
+[Preset]
+name = 7680x4320
+$width = 7680
+$height = 4320
+$gameWidth = 1280
+$gameHeight = 720
+
+[Preset]
+name = 10240x5760
+$width = 10240
+$height = 5760
+$gameWidth = 1280
+$gameHeight = 720
+
+// TV
+
+[TextureRedefine]
+width = 1280
+height = 720
+formatsExcluded = 0x431 # Format 0x41a fixes main menu backgrounds but breaks in-game graphics
+tileModesExcluded = 0x001
+overwriteWidth = ($width/$gameWidth) * 1280
+overwriteHeight = ($height/$gameHeight) * 720
+
+[TextureRedefine]
+width = 640
+height = 368
+overwriteWidth = ($width/$gameWidth) * 640
+overwriteHeight = ($height/$gameHeight) * 368
+
+[TextureRedefine]
+width = 640
+height = 360
+tileModesExcluded = 0x001
+overwriteWidth = ($width/$gameWidth) * 640
+overwriteHeight = ($height/$gameHeight) * 360
+
+[TextureRedefine]
+width = 320
+height = 192
+overwriteWidth = ($width/$gameWidth) * 320
+overwriteHeight = ($height/$gameHeight) * 192
+
+[TextureRedefine]
+width = 320
+height = 180
+overwriteWidth = ($width/$gameWidth) * 320
+overwriteHeight = ($height/$gameHeight) * 180
+
+[TextureRedefine]
+width = 160
+height = 96
+overwriteWidth = ($width/$gameWidth) * 160
+overwriteHeight = ($height/$gameHeight) * 96
+
+[TextureRedefine]
+width = 160
+height = 90
+overwriteWidth = ($width/$gameWidth) * 160
+overwriteHeight = ($height/$gameHeight) * 90
+
+[TextureRedefine]
+width = 96
+height = 48
+overwriteWidth = ($width/$gameWidth) * 96
+overwriteHeight = ($height/$gameHeight) * 48
+
+[TextureRedefine]
+width = 80
+height = 45
+overwriteWidth = ($width/$gameWidth) * 80
+overwriteHeight = ($height/$gameHeight) * 45
+
+[TextureRedefine]
+width = 64
+height = 32
+formats = 0x816
+overwriteWidth = ($width/$gameWidth) * 64
+overwriteHeight = ($height/$gameHeight) * 32
+
+[TextureRedefine]
+width = 40
+height = 22
+overwriteWidth = ($width/$gameWidth) * 40
+overwriteHeight = ($height/$gameHeight) * 22
+
+// Gamepad
+
+[TextureRedefine]
+width = 864
+height = 480
+overwriteWidth = ($width/$gameWidth) * 864
+overwriteHeight = ($height/$gameHeight) * 480
+
+[TextureRedefine]
+width = 854
+height = 480
+formatsExcluded = 0x41a
+overwriteWidth = ($width/$gameWidth) * 854
+overwriteHeight = ($height/$gameHeight) * 480
+
+// Character Select (1v1)
+
+[TextureRedefine]
+width = 384
+height = 448
+overwriteWidth = ($width/$gameWidth) * 384
+overwriteHeight = ($height/$gameHeight) * 448
+
+[TextureRedefine]
+width = 360
+height = 448
+overwriteWidth = ($width/$gameWidth) * 360
+overwriteHeight = ($height/$gameHeight) * 448
+
+[TextureRedefine]
+width = 192
+height = 224
+overwriteWidth = ($width/$gameWidth) * 192
+overwriteHeight = ($height/$gameHeight) * 224
+
+[TextureRedefine]
+width = 180
+height = 224
+overwriteWidth = ($width/$gameWidth) * 180
+overwriteHeight = ($height/$gameHeight) * 224
+
+[TextureRedefine]
+width = 96
+height = 112
+overwriteWidth = ($width/$gameWidth) * 96
+overwriteHeight = ($height/$gameHeight) * 112
+
+[TextureRedefine]
+width = 90
+height = 112
+overwriteWidth = ($width/$gameWidth) * 90
+overwriteHeight = ($height/$gameHeight) * 112
+
+[TextureRedefine]
+width = 45
+height = 56
+overwriteWidth = ($width/$gameWidth) * 45
+overwriteHeight = ($height/$gameHeight) * 56
+
+[TextureRedefine]
+width = 22
+height = 28
+overwriteWidth = ($width/$gameWidth) * 22
+overwriteHeight = ($height/$gameHeight) * 28
+
+[TextureRedefine]
+width = 11
+height = 14
+overwriteWidth = ($width/$gameWidth) * 11
+overwriteHeight = ($height/$gameHeight) * 14
+
+// Character Select (2v2)
+
+[TextureRedefine]
+width = 256
+height = 448
+overwriteWidth = ($width/$gameWidth) * 256
+overwriteHeight = ($height/$gameHeight) * 448
+
+[TextureRedefine]
+width = 224
+height = 448
+overwriteWidth = ($width/$gameWidth) * 224
+overwriteHeight = ($height/$gameHeight) * 448
+
+[TextureRedefine]
+width = 216
+height = 448
+overwriteWidth = ($width/$gameWidth) * 216
+overwriteHeight = ($height/$gameHeight) * 448
+
+[TextureRedefine]
+width = 27
+height = 56
+overwriteWidth = ($width/$gameWidth) * 27
+overwriteHeight = ($height/$gameHeight) * 56
+
+[TextureRedefine]
+width = 13
+height = 28
+overwriteWidth = ($width/$gameWidth) * 13
+overwriteHeight = ($height/$gameHeight) * 28
+
+[TextureRedefine]
+width = 6
+height = 14
+overwriteWidth = ($width/$gameWidth) * 6
+overwriteHeight = ($height/$gameHeight) * 14
+
+// Match Intro
+
+[TextureRedefine]
+width = 896
+height = 720
+overwriteWidth = ($width/$gameWidth) * 896
+overwriteHeight = ($height/$gameHeight) * 720
+
+[TextureRedefine]
+width = 832
+height = 720
+overwriteWidth = ($width/$gameWidth) * 832
+overwriteHeight = ($height/$gameHeight) * 720
+
+[TextureRedefine]
+width = 800
+height = 720
+overwriteWidth = ($width/$gameWidth) * 800
+overwriteHeight = ($height/$gameHeight) * 720
+
+[TextureRedefine]
+width = 416
+height = 368
+overwriteWidth = ($width/$gameWidth) * 416
+overwriteHeight = ($height/$gameHeight) * 368
+
+[TextureRedefine]
+width = 400
+height = 360
+overwriteWidth = ($width/$gameWidth) * 400
+overwriteHeight = ($height/$gameHeight) * 360
+
+[TextureRedefine]
+width = 224
+height = 192
+overwriteWidth = ($width/$gameWidth) * 224
+overwriteHeight = ($height/$gameHeight) * 192
+
+[TextureRedefine]
+width = 220
+height = 180
+overwriteWidth = ($width/$gameWidth) * 220
+overwriteHeight = ($height/$gameHeight) * 180
+
+[TextureRedefine]
+width = 128
+height = 96
+overwriteWidth = ($width/$gameWidth) * 128
+overwriteHeight = ($height/$gameHeight) * 96
+
+[TextureRedefine]
+width = 100
+height = 90
+overwriteWidth = ($width/$gameWidth) * 100
+overwriteHeight = ($height/$gameHeight) * 90
+
+[TextureRedefine]
+width = 64
+height = 48
+overwriteWidth = ($width/$gameWidth) * 64
+overwriteHeight = ($height/$gameHeight) * 48
+
+[TextureRedefine]
+width = 50
+height = 45
+overwriteWidth = ($width/$gameWidth) * 50
+overwriteHeight = ($height/$gameHeight) * 45
+
+[TextureRedefine]
+width = 32
+height = 32
+formats = 0x816
+overwriteWidth = ($width/$gameWidth) * 32
+overwriteHeight = ($height/$gameHeight) * 32
+
+[TextureRedefine]
+width = 25
+height = 22
+overwriteWidth = ($width/$gameWidth) * 25
+overwriteHeight = ($height/$gameHeight) * 22
+
+// Performance Scale
+
+#[TextureRedefine] # causes black screen for a single frame
+#width = 1184
+#height = 666
+#overwriteWidth = ($width/$gameWidth) * 1184
+#overwriteHeight = ($height/$gameHeight) * 666
+
+[TextureRedefine]
+width = 1088
+height = 624
+overwriteWidth = ($width/$gameWidth) * 1088
+overwriteHeight = ($height/$gameHeight) * 624
+
+[TextureRedefine]
+width = 1088
+height = 612
+overwriteWidth = ($width/$gameWidth) * 1088
+overwriteHeight = ($height/$gameHeight) * 612
+
+[TextureRedefine]
+width = 992
+height = 560
+overwriteWidth = ($width/$gameWidth) * 992
+overwriteHeight = ($height/$gameHeight) * 560
+
+[TextureRedefine]
+width = 992
+height = 558
+overwriteWidth = ($width/$gameWidth) * 992
+overwriteHeight = ($height/$gameHeight) * 558
+
+[TextureRedefine]
+width = 896
+height = 512
+overwriteWidth = ($width/$gameWidth) * 896
+overwriteHeight = ($height/$gameHeight) * 512
+
+[TextureRedefine]
+width = 896
+height = 504
+overwriteWidth = ($width/$gameWidth) * 896
+overwriteHeight = ($height/$gameHeight) * 504
+
+[TextureRedefine]
+width = 800
+height = 464
+overwriteWidth = ($width/$gameWidth) * 800
+overwriteHeight = ($height/$gameHeight) * 464
+
+[TextureRedefine]
+width = 800
+height = 450
+overwriteWidth = ($width/$gameWidth) * 800
+overwriteHeight = ($height/$gameHeight) * 450
+
+[TextureRedefine]
+width = 800
+height = 448
+overwriteWidth = ($width/$gameWidth) * 800
+overwriteHeight = ($height/$gameHeight) * 448
+
+[TextureRedefine]
+width = 736
+height = 416
+overwriteWidth = ($width/$gameWidth) * 736
+overwriteHeight = ($height/$gameHeight) * 416
+
+[TextureRedefine]
+width = 704
+height = 400
+overwriteWidth = ($width/$gameWidth) * 704
+overwriteHeight = ($height/$gameHeight) * 400
+
+[TextureRedefine]
+width = 704
+height = 396
+overwriteWidth = ($width/$gameWidth) * 704
+overwriteHeight = ($height/$gameHeight) * 396
+
+[TextureRedefine]
+width = 672
+height = 384
+overwriteWidth = ($width/$gameWidth) * 672
+overwriteHeight = ($height/$gameHeight) * 384
+
+[TextureRedefine]
+width = 608
+height = 352
+overwriteWidth = ($width/$gameWidth) * 608
+overwriteHeight = ($height/$gameHeight) * 352
+
+[TextureRedefine]
+width = 608
+height = 342
+overwriteWidth = ($width/$gameWidth) * 608
+overwriteHeight = ($height/$gameHeight) * 342
+
+[TextureRedefine]
+width = 608
+height = 336
+overwriteWidth = ($width/$gameWidth) * 608
+overwriteHeight = ($height/$gameHeight) * 336
+
+[TextureRedefine]
+width = 544
+height = 304
+overwriteWidth = ($width/$gameWidth) * 544
+overwriteHeight = ($height/$gameHeight) * 304
+
+[TextureRedefine]
+width = 480
+height = 272
+overwriteWidth = ($width/$gameWidth) * 480
+overwriteHeight = ($height/$gameHeight) * 272
+
+[TextureRedefine]
+width = 416
+height = 240
+overwriteWidth = ($width/$gameWidth) * 416
+overwriteHeight = ($height/$gameHeight) * 240
diff --git a/docs/_data/GameTitles.yml b/docs/_data/GameTitles.yml
index 541f310c..76ace57a 100644
--- a/docs/_data/GameTitles.yml
+++ b/docs/_data/GameTitles.yml
@@ -153,7 +153,7 @@
 - title: "Mario Tennis: Ultra Smash"
   nativeRes: 720
   compatLink: "http://compat.cemu.info/wiki/Mario_Tennis:_Ultra_Smash"
-  version3: false
+  version3: true
 - title: "Meme Run"
   nativeRes: 720
   compatLink: "http://compat.cemu.info/wiki/Meme_Run"