Skip to content

Commit

Permalink
Lots of patches and junk.
Browse files Browse the repository at this point in the history
  • Loading branch information
EmeraldLoc committed Mar 21, 2022
1 parent 34b5552 commit 4ba875a
Show file tree
Hide file tree
Showing 10 changed files with 233 additions and 60 deletions.
24 changes: 16 additions & 8 deletions sm_osx.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,29 @@
/* Begin PBXBuildFile section */
960D46F627D6850D0056E393 /* BuildingSteps.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960D46F527D6850D0056E393 /* BuildingSteps.swift */; };
9669DC5C27D5565000DE5FAB /* sm_osxApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9669DC5B27D5565000DE5FAB /* sm_osxApp.swift */; };
9669DC5E27D5565000DE5FAB /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9669DC5D27D5565000DE5FAB /* ContentView.swift */; };
9669DC6027D5565100DE5FAB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9669DC5F27D5565100DE5FAB /* Assets.xcassets */; };
9669DC6327D5565100DE5FAB /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9669DC6227D5565100DE5FAB /* Preview Assets.xcassets */; };
9669DC6B27D5581F00DE5FAB /* Repos.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9669DC6A27D5581F00DE5FAB /* Repos.swift */; };
9669DC6D27D55CD200DE5FAB /* Patches.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9669DC6C27D55CD200DE5FAB /* Patches.swift */; };
9669DC6F27D55D5300DE5FAB /* PatchesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9669DC6E27D55D5300DE5FAB /* PatchesView.swift */; };
9669DC7127D55F4700DE5FAB /* RomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9669DC7027D55F4700DE5FAB /* RomView.swift */; };
96BB22E327E274F700057915 /* RepoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BB22E227E274F700057915 /* RepoView.swift */; };
96CF3D4227DBD8C7008A26F5 /* CompilationSpeed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CF3D4127DBD8C7008A26F5 /* CompilationSpeed.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
960D46F527D6850D0056E393 /* BuildingSteps.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuildingSteps.swift; sourceTree = "<group>"; };
9669DC5827D5565000DE5FAB /* sm_osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = sm_osx.app; sourceTree = BUILT_PRODUCTS_DIR; };
9669DC5B27D5565000DE5FAB /* sm_osxApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = sm_osxApp.swift; sourceTree = "<group>"; };
9669DC5D27D5565000DE5FAB /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
9669DC5F27D5565100DE5FAB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
9669DC6227D5565100DE5FAB /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
9669DC6427D5565100DE5FAB /* sm_osx.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = sm_osx.entitlements; sourceTree = "<group>"; };
9669DC6A27D5581F00DE5FAB /* Repos.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Repos.swift; sourceTree = "<group>"; };
9669DC6C27D55CD200DE5FAB /* Patches.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Patches.swift; sourceTree = "<group>"; };
9669DC6E27D55D5300DE5FAB /* PatchesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PatchesView.swift; sourceTree = "<group>"; };
9669DC7027D55F4700DE5FAB /* RomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RomView.swift; sourceTree = "<group>"; };
96BB22E227E274F700057915 /* RepoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepoView.swift; sourceTree = "<group>"; };
96CF3D4127DBD8C7008A26F5 /* CompilationSpeed.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompilationSpeed.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -63,7 +65,6 @@
isa = PBXGroup;
children = (
9669DC5B27D5565000DE5FAB /* sm_osxApp.swift */,
9669DC5D27D5565000DE5FAB /* ContentView.swift */,
9669DC5F27D5565100DE5FAB /* Assets.xcassets */,
9669DC6427D5565100DE5FAB /* sm_osx.entitlements */,
9669DC6127D5565100DE5FAB /* Preview Content */,
Expand All @@ -72,6 +73,8 @@
9669DC6E27D55D5300DE5FAB /* PatchesView.swift */,
9669DC7027D55F4700DE5FAB /* RomView.swift */,
960D46F527D6850D0056E393 /* BuildingSteps.swift */,
96CF3D4127DBD8C7008A26F5 /* CompilationSpeed.swift */,
96BB22E227E274F700057915 /* RepoView.swift */,
);
path = sm_osx;
sourceTree = "<group>";
Expand Down Expand Up @@ -114,7 +117,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1320;
LastUpgradeCheck = 1320;
LastUpgradeCheck = 1330;
TargetAttributes = {
9669DC5727D5565000DE5FAB = {
CreatedOnToolsVersion = 13.2.1;
Expand Down Expand Up @@ -159,11 +162,12 @@
buildActionMask = 2147483647;
files = (
9669DC6D27D55CD200DE5FAB /* Patches.swift in Sources */,
96CF3D4227DBD8C7008A26F5 /* CompilationSpeed.swift in Sources */,
9669DC7127D55F4700DE5FAB /* RomView.swift in Sources */,
960D46F627D6850D0056E393 /* BuildingSteps.swift in Sources */,
9669DC6F27D55D5300DE5FAB /* PatchesView.swift in Sources */,
9669DC6B27D5581F00DE5FAB /* Repos.swift in Sources */,
9669DC5E27D5565000DE5FAB /* ContentView.swift in Sources */,
96BB22E327E274F700057915 /* RepoView.swift in Sources */,
9669DC5C27D5565000DE5FAB /* sm_osxApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -222,6 +226,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = NO;
INFOPLIST_KEY_UIStatusBarHidden = NO;
MACOSX_DEPLOYMENT_TARGET = 12.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
Expand Down Expand Up @@ -277,6 +283,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = NO;
INFOPLIST_KEY_UIStatusBarHidden = NO;
MACOSX_DEPLOYMENT_TARGET = 12.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
Expand All @@ -298,7 +306,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"sm_osx/Preview Content\"";
DEVELOPMENT_TEAM = 25RK3JMVLT;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
Expand All @@ -307,7 +315,7 @@
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.0;
ONLY_ACTIVE_ARCH = YES;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.CubingStudios.sm-osx";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand All @@ -327,7 +335,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"sm_osx/Preview Content\"";
DEVELOPMENT_TEAM = 25RK3JMVLT;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
Expand Down
12 changes: 8 additions & 4 deletions sm_osx.xcodeproj/xcshareddata/xcschemes/sm_osx.xcscheme
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1320"
version = "1.3">
LastUpgradeVersion = "1330"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -23,15 +23,15 @@
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
Expand All @@ -50,6 +50,10 @@
ReferencedContainer = "container:sm_osx.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<LocationScenarioReference
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
referenceType = "1">
</LocationScenarioReference>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
2 changes: 1 addition & 1 deletion sm_osx/BuildingSteps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ enum CompilationProcess: String {
case copyingFiles = "Copying Files..."
case compiling = "Compiling, this may take a while, please be patient."
case finishingUp = "Finishing Up..."
case finished = "Finshied!"
case finished = "Finshed!"
case nothing = ""
case error = "Error!"
case rosetta = "Make sure you are runing this app with rosetta"
Expand Down
15 changes: 15 additions & 0 deletions sm_osx/CompilationSpeed.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// CompilationSpeed.swift
// sm_osx
//
// Created by Caleb Elmasri on 3/11/22.
//

import Foundation

enum Speed: String {
case slow = ""
case fast = "-j2"
case veryFast = "-j4"
case fastest = "-j8"
}
4 changes: 4 additions & 0 deletions sm_osx/Patches.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import Foundation
enum Patches: String {
case omm = "https://github.com/PeachyPeachSM64/sm64pc-omm.git"
case highfps = "60Fps"
case extMoveset = "Extended Moveset"
case bettercam = "Better Camera"
case drawdistance = "No Draw Distance"
case extData = "External Data"
case timeTrials = "Time Trials"
case captainToadStars = "Captain Toad Stars"
case nothing = ""
}
78 changes: 70 additions & 8 deletions sm_osx/PatchesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ struct PatchesView: View {

var repo: Repo
@State var isOmm = false
@State var isToadStars = false
@State var extMoveset = false
@State var isFPS = false
@State var isCam = false
@State var isDist = false
@State var extData = false
@State var timeTrials = false
@State var patches = [Patches]()

var body: some View {
Expand All @@ -40,6 +44,34 @@ struct PatchesView: View {
}
}

Toggle(isOn: $timeTrials) {
Text("Time Trial")
}.onChange(of: timeTrials) { _ in

if timeTrials {
patches.append(.timeTrials)
}
else {
if let i = patches.firstIndex(of: .timeTrials) {
patches.remove(at: i)
}
}
}

Toggle(isOn: $isToadStars) {
Text("\(Patches.captainToadStars.rawValue)")
}.onChange(of: isToadStars) { _ in

if isToadStars {
patches.append(.captainToadStars)
}
else {
if let i = patches.firstIndex(of: .captainToadStars) {
patches.remove(at: i)
}
}
}

Toggle(isOn: $isOmm) {
Text("Oddysey Mario Moveset")
}.onChange(of: isOmm) { _ in
Expand All @@ -53,8 +85,36 @@ struct PatchesView: View {
}
}
}

Toggle(isOn: $extMoveset) {
Text("External Moveset")
}.onChange(of: extMoveset) { _ in

if extMoveset {
patches.append(.extMoveset)
}
else {
if let i = patches.firstIndex(of: .extMoveset) {
patches.remove(at: i)
}
}
}

Toggle(isOn: $isDist) {
Text("No Draw Distance")
}.onChange(of: isDist) { _ in

if isDist {
patches.append(.drawdistance)
}
else {
if let i = patches.firstIndex(of: .drawdistance) {
patches.remove(at: i)
}
}
}
}
if repo == .sm64ex || repo == .sm64ex_coop {
if repo == .sm64ex || repo == .sm64ex_coop || repo == .render96ex {
Toggle(isOn: $isCam) {
Text("Better Camera")
}.onChange(of: isCam) { _ in
Expand All @@ -69,21 +129,23 @@ struct PatchesView: View {
}
}

Toggle(isOn: $isDist) {
Text("No Draw Distance")
}.onChange(of: isDist) { _ in
Toggle(isOn: $extData) {
Text("External Data")
}.onChange(of: extData) { _ in

if isDist {
patches.append(.drawdistance)
if extData {
patches.append(.extData)
}
else {
if let i = patches.firstIndex(of: .drawdistance) {
if let i = patches.firstIndex(of: .extData) {
patches.remove(at: i)
}
}
}
}

if repo == .sm64ex || repo == .render96ex {

}

NavigationLink(destination:RomView(patch: patches, repo: repo)) {
Text("Next")
Expand Down
16 changes: 11 additions & 5 deletions sm_osx/ContentView.swift → sm_osx/RepoView.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//
// ContentView.swift
// RepoView.swift
// sm_osx
//
// Created by Caleb Elmasri on 3/6/22.
// Created by Caleb Elmasri on 3/16/22.
//

import SwiftUI

struct ContentView: View {
struct RepoView: View {

@State var shell = RomView(patch: [Patches](), repo: .sm64ex)

Expand All @@ -28,6 +28,12 @@ struct ContentView: View {
Text("sm64ex-coop (Runs via Rosetta)")
.lineLimit(nil)
}

NavigationLink(destination: PatchesView(repo: .render96ex)) {

Text("Render96ex")
.lineLimit(nil)
}
}
Spacer()

Expand All @@ -42,8 +48,8 @@ struct ContentView: View {
}
}

struct ContentView_Previews: PreviewProvider {
struct RepoView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
RepoView()
}
}
1 change: 1 addition & 0 deletions sm_osx/Repos.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ import Foundation

enum Repo: String {
case sm64ex = "https://github.com/EmeraldLoc/sm64ex.git"
case render96ex = "https://github.com/EmeraldLoc/sm64ex.git --branch alpha"
case sm64ex_coop = "https://github.com/djoslin0/sm64ex-coop.git"
}
Loading

0 comments on commit 4ba875a

Please sign in to comment.