Skip to content

Commit

Permalink
Dust this project off and get it to compile with Xcode 11. Bring up t…
Browse files Browse the repository at this point in the history
…o date with the latest Windows code. Enable Retina display support and base localization. Increase the frame rate to 60 FPS and indicate that we do support running on the integrated GPU. Add a thumbnail for System Preferences.
  • Loading branch information
nickzman committed May 25, 2020
1 parent 279484c commit 972aa32
Show file tree
Hide file tree
Showing 62 changed files with 16,490 additions and 16,068 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ profile
# Ignore leftovers from other SCM systems:
CVS
.svn
Skyrocket.xcodeproj/project.xcworkspace/xcuserdata
Skyrocket.xcodeproj/xcuserdata
452 changes: 452 additions & 0 deletions Base.lproj/ConfigureSheet.xib

Large diffs are not rendered by default.

54 changes: 0 additions & 54 deletions English.lproj/ConfigureSheet.nib/classes.nib

This file was deleted.

16 changes: 0 additions & 16 deletions English.lproj/ConfigureSheet.nib/info.nib

This file was deleted.

Binary file removed English.lproj/ConfigureSheet.nib/objects.nib
Binary file not shown.
54 changes: 0 additions & 54 deletions French.lproj/ConfigureSheet.nib/classes.nib

This file was deleted.

16 changes: 0 additions & 16 deletions French.lproj/ConfigureSheet.nib/info.nib

This file was deleted.

Binary file removed French.lproj/ConfigureSheet.nib/objects.nib
Binary file not shown.
12 changes: 6 additions & 6 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>Skyrocket</string>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.reallyslick.Skyrocket</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.4</string>
<key>NSPrincipalClass</key>
<string>RSSSkyrocketView</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>
54 changes: 0 additions & 54 deletions Japanese.lproj/ConfigureSheet.nib/classes.nib

This file was deleted.

16 changes: 0 additions & 16 deletions Japanese.lproj/ConfigureSheet.nib/info.nib

This file was deleted.

Binary file removed Japanese.lproj/ConfigureSheet.nib/objects.nib
Binary file not shown.
33 changes: 11 additions & 22 deletions RSSSkyrocketSaverView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#import "RSSSkyrocketSaverView.h"
#include "Skyrocket.h"
#include "resource.h"
#include <sys/time.h>
#import <OpenGL/OpenGL.h>

Expand Down Expand Up @@ -35,30 +34,25 @@ - (id)initWithFrame:(NSRect)frameRect isPreview:(BOOL) preview

if (self)
{
#ifdef __ppc__
long osVersion;

Gestalt(gestaltSystemVersion, &osVersion);
soundDisabled_ = (osVersion < 0x1050);
#else
soundDisabled_ = NO;
#endif
if (mainScreenOnly_!=NSOnState || mainScreen_==YES)
{
NSOpenGLPixelFormatAttribute attribs[] =
{
NSOpenGLPFAAccelerated, (NSOpenGLPixelFormatAttribute)YES,
NSOpenGLPFADoubleBuffer, (NSOpenGLPixelFormatAttribute)YES,
NSOpenGLPFAMinimumPolicy, (NSOpenGLPixelFormatAttribute)YES,
NSOpenGLPFAAccelerated,
NSOpenGLPFADoubleBuffer,
NSOpenGLPFAMinimumPolicy,
NSOpenGLPFAAllowOfflineRenderers,
(NSOpenGLPixelFormatAttribute)0
};

NSOpenGLPixelFormat *format = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attribs] autorelease];
NSOpenGLPixelFormat *format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];

if (format!=nil)
{
_view = [[[NSOpenGLView alloc] initWithFrame:NSZeroRect pixelFormat:format] autorelease];
_view = [[NSOpenGLView alloc] initWithFrame:NSZeroRect pixelFormat:format];
[self addSubview:_view];
_view.wantsBestResolutionOpenGLSurface = YES; // enable Retina support

settings_.frameTime=0;

Expand All @@ -68,8 +62,7 @@ - (id)initWithFrame:(NSRect)frameRect isPreview:(BOOL) preview
{
[self readDefaults:defaults];
}

[self setAnimationTimeInterval:0.03];
self.animationTimeInterval = 1.0/60.0;
}
}
}
Expand Down Expand Up @@ -98,8 +91,6 @@ - (void) drawRect:(NSRect) inFrame

tAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont systemFontOfSize:[NSFont systemFontSize]],NSFontAttributeName,[NSColor whiteColor],NSForegroundColorAttributeName,tParagraphStyle,NSParagraphStyleAttributeName,nil];

[tParagraphStyle release];

tString=NSLocalizedStringFromTableInBundle(@"Minimum OpenGL requirements\rfor this Screen Effect\rnot available\ron your graphic card.",@"Localizable",[NSBundle bundleForClass:[self class]],@"No comment");

tStringFrame.origin=NSZeroPoint;
Expand Down Expand Up @@ -169,7 +160,7 @@ - (void)startAnimation
{
if (mainScreenOnly_!=NSOnState || mainScreen_==YES)
{
NSSize tSize;
NSSize tSize = [_view convertSizeToBacking:_view.frame.size];
struct timeval tTime;
int i;
GLint interval = 1;
Expand All @@ -183,15 +174,13 @@ - (void)startAnimation
CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &interval); // don't allow screen tearing
[[_view openGLContext] flushBuffer];

tSize=[_view frame].size;

//cleanSettings(&settings_);

initSaver((int) tSize.width,(int) tSize.height,&settings_);

for(i=0;i<10;i++)
{
times[i]=0.03f;
times[i] = self.animationTimeInterval;
}

timeindex = 0;
Expand Down Expand Up @@ -365,7 +354,7 @@ - (NSWindow*)configureSheet

if (IBconfigureSheet_ == nil)
{
[NSBundle loadNibNamed:@"ConfigureSheet" owner:self];
[[NSBundle bundleWithIdentifier:@"com.reallyslick.Skyrocket"] loadNibNamed:@"ConfigureSheet" owner:self topLevelObjects:NULL];

[IBversion_ setStringValue:[[[NSBundle bundleForClass:[self class]] infoDictionary] objectForKey:@"CFBundleVersion"]];

Expand Down
Loading

0 comments on commit 972aa32

Please sign in to comment.