QTfrontend/CocoaInitializer.mm
author smaxx
Tue, 03 Aug 2010 14:19:47 +0200
changeset 3717 d88719b0f0dc
parent 3697 d5b30d6373fc
child 5095 15dd764b728c
permissions -rw-r--r--
Engine: * Added a new weapon: Hammer: Crush half your enemies' health and let them break through thin floors! (Might need some visual improvements) * Removed orientation code from sticky mines due to their new graphics * Added an attachment sound to sticky mines Frontend: * Added the hammer to predefined weapon sets

/*
 * Copyright (C) 2008 Remko Troncon
 */

#include "CocoaInitializer.h"

#include <AppKit/AppKit.h>
#include <Cocoa/Cocoa.h>
#include <QtDebug>

class CocoaInitializer::Private
{
	public:
		NSAutoreleasePool* autoReleasePool_;
};

CocoaInitializer::CocoaInitializer()
{
	d = new CocoaInitializer::Private();
        c = new CocoaInitializer::Private();
	NSApplicationLoad();
        c->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
	d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
}

CocoaInitializer::~CocoaInitializer()
{
	[d->autoReleasePool_ release];
        [c->autoReleasePool_ release];
	delete c;
	delete d;
}