Skip to content

Commit

Permalink
Updated for 64-bit, started updating UI to modern conventions.
Browse files Browse the repository at this point in the history
  • Loading branch information
BradLarson committed Jul 7, 2018
1 parent b5816b8 commit 2584c8d
Show file tree
Hide file tree
Showing 19 changed files with 109 additions and 83 deletions.
4 changes: 3 additions & 1 deletion English.lproj/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2.10</string>
<string>2.20</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIFileSharingEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIStatusBarStyle</key>
Expand Down
4 changes: 2 additions & 2 deletions GLProgram.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ - (void)addAttribute:(NSString *)attributeName
{
[attributes addObject:attributeName];
glBindAttribLocation(program,
[attributes indexOfObject:attributeName],
(GLuint)[attributes indexOfObject:attributeName],
[attributeName UTF8String]);
}
}
// END:addattribute
// START:indexmethods
- (GLuint)attributeIndex:(NSString *)attributeName
{
return [attributes indexOfObject:attributeName];
return (GLuint)[attributes indexOfObject:attributeName];
}
- (GLuint)uniformIndex:(NSString *)uniformName
{
Expand Down
31 changes: 31 additions & 0 deletions LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="1ZP-Zf-vf2">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="fBP-e4-0If">
<objects>
<viewController id="1ZP-Zf-vf2" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="0fP-wn-px5"/>
<viewControllerLayoutGuide type="bottom" id="N5I-sN-zNQ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Rbf-xA-nZt">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="aAM-Y5-lOe" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-356" y="-140"/>
</scene>
</scenes>
</document>
31 changes: 13 additions & 18 deletions Molecules.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; };
28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; };
BC1175B220F1514C00CCEAC9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1175B120F1514C00CCEAC9 /* LaunchScreen.storyboard */; };
BC146A9B0EC9173000CE5E72 /* SLSMoleculeCustomDownloadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC146A9A0EC9173000CE5E72 /* SLSMoleculeCustomDownloadViewController.m */; };
BC157287136CBE9200EEFBEC /* 3QE5.pdb.gz in Resources */ = {isa = PBXBuildFile; fileRef = BC157286136CBE9200EEFBEC /* 3QE5.pdb.gz */; };
BC15728A136CC58A00EEFBEC /* SLSMoleculeLibraryTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC157289136CC58A00EEFBEC /* SLSMoleculeLibraryTableCell.m */; };
Expand Down Expand Up @@ -104,6 +105,7 @@
28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = English; path = English.lproj/Info.plist; sourceTree = "<group>"; };
BC1175B120F1514C00CCEAC9 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
BC146A990EC9173000CE5E72 /* SLSMoleculeCustomDownloadViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLSMoleculeCustomDownloadViewController.h; sourceTree = "<group>"; };
BC146A9A0EC9173000CE5E72 /* SLSMoleculeCustomDownloadViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLSMoleculeCustomDownloadViewController.m; sourceTree = "<group>"; };
BC157286136CBE9200EEFBEC /* 3QE5.pdb.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = 3QE5.pdb.gz; sourceTree = "<group>"; };
Expand Down Expand Up @@ -308,6 +310,7 @@
BCDFF57211546FB2005C984C /* RotationIconiPadCancel.png */,
BCDFF57F115473AD005C984C /* VisualizationIcon.png */,
BC54D56D151A3951003F4A41 /* [email protected] */,
BC1175B120F1514C00CCEAC9 /* LaunchScreen.storyboard */,
);
name = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -556,6 +559,7 @@
BC54D577151A4C91003F4A41 /* [email protected] in Resources */,
BC54D578151A4C91003F4A41 /* [email protected] in Resources */,
BCD4072F151D702600E622EA /* 98-palette.png in Resources */,
BC1175B220F1514C00CCEAC9 /* LaunchScreen.storyboard in Resources */,
BCD40730151D702600E622EA /* [email protected] in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -633,43 +637,39 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Molecules_Prefix.pch;
INFOPLIST_FILE = English.lproj/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = Molecules;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Molecules_Prefix.pch;
INFOPLIST_FILE = English.lproj/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = Molecules;
PROVISIONING_PROFILE = "";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
BC78D1AC0E1FDC0600BD9B0B /* Distribution */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
armv7,
armv6,
);
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
GCC_C_LANGUAGE_STANDARD = c99;
Expand All @@ -692,6 +692,7 @@
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
WARNING_CFLAGS = "";
};
name = Distribution;
Expand All @@ -700,28 +701,24 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Molecules_Prefix.pch;
INFOPLIST_FILE = English.lproj/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = Molecules;
PROVISIONING_PROFILE = "";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Distribution;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
armv7,
armv6,
);
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
Expand All @@ -745,17 +742,14 @@
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
WARNING_CFLAGS = "";
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
armv7,
armv6,
);
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
Expand All @@ -778,6 +772,7 @@
"PROVISIONING_PROFILE[sdk=*]" = "";
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
WARNING_CFLAGS = "";
};
name = Release;
Expand Down
12 changes: 6 additions & 6 deletions NSData+Gzip.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ - (id)initWithGzippedData: (NSData *)gzippedData;
{
if ([gzippedData length] == 0) return nil;

unsigned full_length = [gzippedData length];
unsigned half_length = [gzippedData length] / 2;
unsigned long full_length = [gzippedData length];
unsigned long half_length = [gzippedData length] / 2;

NSMutableData *decompressed = [[NSMutableData alloc] initWithLength:(full_length + half_length)];
BOOL done = NO;
int status;

z_stream strm;
strm.next_in = (Bytef *)[gzippedData bytes];
strm.avail_in = [gzippedData length];
strm.avail_in = (unsigned int)[gzippedData length];
strm.total_out = 0;
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
Expand All @@ -41,7 +41,7 @@ - (id)initWithGzippedData: (NSData *)gzippedData;
if (strm.total_out >= [decompressed length])
[decompressed increaseLengthBy: half_length];
strm.next_out = [decompressed mutableBytes] + strm.total_out;
strm.avail_out = [decompressed length] - strm.total_out;
strm.avail_out = (unsigned int)[decompressed length] - (unsigned int)strm.total_out;

// Inflate another chunk.
status = inflate (&strm, Z_SYNC_FLUSH);
Expand Down Expand Up @@ -70,7 +70,7 @@ - (NSData *)gzipDeflate
strm.opaque = Z_NULL;
strm.total_out = 0;
strm.next_in=(Bytef *)[self bytes];
strm.avail_in = [self length];
strm.avail_in = (unsigned int)[self length];

// Compresssion Levels:
// Z_NO_COMPRESSION
Expand All @@ -88,7 +88,7 @@ - (NSData *)gzipDeflate
[compressed increaseLengthBy: 16384];

strm.next_out = [compressed mutableBytes] + strm.total_out;
strm.avail_out = [compressed length] - strm.total_out;
strm.avail_out = (unsigned int)[compressed length] - (unsigned int)strm.total_out;

deflate(&strm, Z_FINISH);

Expand Down
2 changes: 1 addition & 1 deletion SLSAtomColorKeyController.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ - (void)viewDidLoad

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
self.contentSizeForViewInPopover = CGSizeMake(250.0f, 864.0f);
self.preferredContentSize = CGSizeMake(250.0f, 864.0f);
// self.contentSizeForViewInPopover = CGSizeMake(200.0f, 864.0f);
}

Expand Down
6 changes: 3 additions & 3 deletions SLSMolecule+SDF.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ - (BOOL)readFromSDFFileToDatabase:(NSError **)error;

NSString *atomElement = [[currentLine substringWithRange:NSMakeRange(31, 3)] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];

[atomCoordinates setObject:[NSValue valueWithBytes:&atomCoordinate objCType:@encode(SLS3DPoint)] forKey:[NSNumber numberWithInt:atomSerialNumber]];
[atomCoordinates setObject:[NSValue valueWithBytes:&atomCoordinate objCType:@encode(SLS3DPoint)] forKey:[NSNumber numberWithInteger:atomSerialNumber]];
atomSerialNumber++;

SLSAtomType processedAtomType;
Expand Down Expand Up @@ -202,8 +202,8 @@ - (BOOL)readFromSDFFileToDatabase:(NSError **)error;
NSUInteger indexForFirstAtom = [[currentLine substringWithRange:NSMakeRange(0, 3)] intValue];
NSUInteger indexForSecondAtom = [[currentLine substringWithRange:NSMakeRange(3, 3)] intValue];

NSValue *startValue = [atomCoordinates objectForKey:[NSNumber numberWithInt:indexForFirstAtom]];
NSValue *endValue = [atomCoordinates objectForKey:[NSNumber numberWithInt:indexForSecondAtom]];
NSValue *startValue = [atomCoordinates objectForKey:[NSNumber numberWithInteger:indexForFirstAtom]];
NSValue *endValue = [atomCoordinates objectForKey:[NSNumber numberWithInteger:indexForSecondAtom]];

[self addBondToDatabaseWithStartPoint:startValue endPoint:endValue bondType:SINGLEBOND structureNumber:1 residueKey:UNKNOWNRESIDUE];
}
Expand Down
Loading

0 comments on commit 2584c8d

Please sign in to comment.