Skip to content

Commit

Permalink
Original iOS5 project
Browse files Browse the repository at this point in the history
  • Loading branch information
rsodre committed Dec 3, 2015
0 parents commit 2619333
Show file tree
Hide file tree
Showing 716 changed files with 47,267 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
#Pods/
28 changes: 28 additions & 0 deletions Maya3D/Classes/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// AppDelegate.h
// Maya3D
//
// Created by Roger on 05/11/08.
// Copyright Studio Avante 2008. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TzGlobal.h"

// Globals
TzGlobal *global;


@interface AppDelegate : NSObject <UIApplicationDelegate, UINavigationControllerDelegate> {
UIWindow *window;
// No Interface Builder, o App Delegate eh associado a este TabBarControler...
UINavigationController *navigationController;
// No Interface Builder, o o Tab Bar eh associado a este...
UITabBarController *tabBarController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;

@end
152 changes: 152 additions & 0 deletions Maya3D/Classes/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
//
// AppDelegate.m
// Maya3D
//
// Created by Roger on 05/11/08.
// Copyright Studio Avante 2008. All rights reserved.
//

#import "AppDelegate.h"
#import "TzCalendar.h"


@implementation AppDelegate

@synthesize window;
@synthesize navigationController;
@synthesize tabBarController;


- (void)dealloc {
// Roger
[global release];
// system
[window release];
[super dealloc];
}


// INITIALIZE APP
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
#ifdef LITE
AvLog(@">>> THIS IS LITE VERSION!");
#endif
// GLOBALS
global = [[TzGlobal alloc] init];

// Configura Tab Bar - isso nao funciona mais no OS 3.0
//self.tabBarController.selectedIndex = TAB_INIT;

// Guarda para TzClock
global.theTabBar = self.tabBarController;
global.theNavController = self.navigationController;

// Configura nomes dos tabs
if (global.theTabBar)
{
UIViewController *vc;
vc = (UIViewController*) [global.theTabBar.viewControllers objectAtIndex:TAB_MAYA3D];
vc.tabBarItem.title = LOCAL(@"TAB_MAYA3D");
vc = (UIViewController*) [global.theTabBar.viewControllers objectAtIndex:TAB_ORACLE];
vc.tabBarItem.title = LOCAL(@"TAB_ORACLE");
vc = (UIViewController*) [global.theTabBar.viewControllers objectAtIndex:TAB_EXPLORER];
vc.tabBarItem.title = LOCAL(@"TAB_EXPLORER");
vc = (UIViewController*) [global.theTabBar.viewControllers objectAtIndex:TAB_DATEBOOK];
vc.tabBarItem.title = LOCAL(@"TAB_DATEBOOK");
// Oracle: depende de configuracoes
//[global switchViewMode: global.prefMayaDreamspell];

// GLYPH: usa botao correto no tab
[global updateGlyphTab];
}

// Configura Navigation Controller
#ifdef LITE
[window addSubview:self.navigationController.view];
#else
// NEW ios6
//[window addSubview:self.tabBarController.view];
[self.window setRootViewController:self.tabBarController];
#endif
[window makeKeyAndVisible];
}

// TERMINATE APP
- (void)applicationWillTerminate:(UIApplication *)application
{
[global updatePreferences];
}
// SLEEP APP
- (void)applicationWillResignActive:(UIApplication *)application
{
[global updatePreferences];
}

- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
{
AvLog(@"!!!!!! MEMORY WARNING !!!!!!!!");

// Super - nao tem no super!
//[super applicationDidReceiveMemoryWarning:application];
}

/*
// Optional UITabBarControllerDelegate method
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
}
*/

/*
// Optional UITabBarControllerDelegate method
- (void)tabBarController:(UITabBarController *)tabBarController didEndCustomizingViewControllers:(NSArray *)viewControllers changed:(BOOL)changed {
}
*/

@end

#pragma mark AVANTE

void AvLog(NSString *format, ...)
{
// debug?
if (DEBUG_LEVEL == 0)
return;
// debug!
va_list args;
va_start(args, format);
NSLogv(format, args);
va_end(args );
}

//
// LOG FREE MEMORY
//
#import <sys/sysctl.h>
#import <mach/mach_host.h>
void AvLogMemory(NSString *msg)
{
size_t length;
int mib[6];
int pagesize;
mib[0] = CTL_HW;
mib[1] = HW_PAGESIZE;
length = sizeof(pagesize);
sysctl(mib, 2, &pagesize, &length, NULL, 0);

mach_msg_type_number_t count = HOST_VM_INFO_COUNT;

vm_statistics_data_t vmstat;
host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t)&vmstat, &count);
double total = vmstat.wire_count + vmstat.active_count + vmstat.inactive_count + vmstat.free_count;
double free = vmstat.free_count / total;

int percentFree = (int)(free * 100.0);
int available = ((vmstat.wire_count + vmstat.active_count + vmstat.inactive_count + vmstat.free_count) * pagesize) / 0x100000;
int remaining = ((vmstat.free_count * pagesize) / 0x100000);

AvLog(@"MEMORY :: %@ :: %%Free[%d] available[%d] remaining[%d]", msg, percentFree, available, remaining);
}



26 changes: 26 additions & 0 deletions Maya3D/Classes/Avante/AvanteKinButton.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// AvanteKinButton.h
// Maya3D
//
// Created by Roger on 08/04/09.
// Copyright 2009 Studio Avante. All rights reserved.
//

#import <UIKit/UIKit.h>

@class TzCalTzolkinMoon;

@interface AvanteKinButton : UIImageView {
int kinType;
TzCalTzolkinMoon *tzolkin;
UINavigationController *myVC;
UIButton *button;
}

@property (nonatomic) int kinType;
@property (nonatomic, assign) TzCalTzolkinMoon *tzolkin;
@property (nonatomic, assign) UINavigationController *myVC;

- (void)tap;

@end
77 changes: 77 additions & 0 deletions Maya3D/Classes/Avante/AvanteKinButton.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
//
// AvanteKinButton.m
// Maya3D
//
// Created by Roger on 08/04/09.
// Copyright 2009 Studio Avante. All rights reserved.
//

#import "AvanteKinButton.h"
#import "TzCalTzolkinMoon.h"
#import "Tzolkin.h"
#import "TzGlobal.h"
#import "KinDecodeVC.h"
#import "MayaGlyphVC.h"
#import "MayaOracleVC.h"

@implementation AvanteKinButton

@synthesize kinType;
@synthesize tzolkin;
@synthesize myVC;


- (void)dealloc {
//[button release];
[super dealloc];
}

- (id)initWithFrame:(CGRect)frame {
// super init
if ( (self = [super initWithFrame:frame]) == nil)
return nil;

// Enable button
self.userInteractionEnabled = YES;

// Create button
button = [UIButton buttonWithType:UIButtonTypeInfoLight];
frame.origin.x = 0.0;
frame.origin.y = 0.0;
button.frame = frame;
button.backgroundColor = [UIColor clearColor];
[button setImage:nil forState:UIControlStateNormal];
[button addTarget:self action:@selector(tap) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button];

// ok!
return self;
}

// TOUCH!
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
AvLog(@"AvanteKinButton: TOUCH!! type[%d]",kinType);
//[self tap];
}

// TOUCH!
- (void)tap
{
AvLog(@"AvanteKinButton: TAP! type[%d]",kinType);
if (kinType == ORACLE_DESTINY)
{
global.theTabBar.selectedIndex = TAB_ORACLE;
//[(MayaOracleVC*)global.currentVC scrollToKin];
}
else
{
[(MayaGlyphVC*)myVC goDecode:self];
}
}





@end
82 changes: 82 additions & 0 deletions Maya3D/Classes/Avante/AvanteKinView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
//
// AvanteKinView.h
// Maya3D
//
// Created by Roger on 08/04/09.
// Copyright 2009 Studio Avante. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AvanteView.h"

// GENERIC
#define SPACER 2.0
#define SPACER_GAP 6.0
#define ACTUAL_VIEW_HEIGHT (kActiveLessNavTab - kRollerVerticalHeight)
#define FONT_SIZE_NAME 18.0
#define FONT_SIZE_TEXT 14.0
#define FONT_SIZE_AFFIRM 12.0
#define FONT_SIZE_HELP 13.0
#define FONT_SIZE_LABEL 13.0

// MAYA
#define GLYPH_SIZE 60.0
#define GLYPH_SIZE_MED 50.0
#define GLYPH_SIZE_SMALL 40.0
#define GLYPH_SIZE_NUM 30.0
#define GLYPH_SIZE_NUM_MED 25.0
#define GLYPH_SIZE_NUM_SMALL 20.0
#define THUMB_SIZE 28.0
#define NEWS_SIZE 80.0

// DREAMSPELL
#define TONE_SIZE 40.0
#define TONE_GAP (40.0-24.0)
#define SEAL_SIZE 40.0
#define PLASMA_SIZE 28.0
#define PORTAL_SIZE 28.0
#define MOON_FASE_SIZE 40.0
#define ORACLE_SIZE 60.0



@class AvanteTextLabel;
@class AvanteViewStack;
@class AvanteKinButton;
@class TzCalTzolkinMoon;

@interface AvanteKinView : AvanteView {
// KIN VIEWS
AvanteViewStack *kinStack;
AvanteView *kinView1;
AvanteView *kinView2;
AvanteView *kinView3;
int destinyKin;
// KIN UI - Kin
UIImageView *dreamspellTzolkinNum;
UIImageView *dreamspellTzolkinNum2;
UIImageView *dreamspellTzolkinGlyph;
UIImageView *dreamspellTzolkinGlyph2;
UIImageView *dreamspellTzolkinNews;
AvanteTextLabel *dreamspellTzolkinKin;
AvanteTextLabel *dreamspellTzolkinNumName;
AvanteTextLabel *dreamspellTzolkinNumDesc;
AvanteTextLabel *dreamspellTzolkinGlyphLabel;
AvanteTextLabel *dreamspellTzolkinGlyphName;
AvanteTextLabel *dreamspellTzolkinGlyphFrase;
AvanteTextLabel *dreamspellTzolkinGlyphTags;
AvanteTextLabel *dreamspellTzolkinGlyphDesc;
AvanteTextLabel *dreamspellTzolkinName;
AvanteTextLabel *dreamspellTzolkinColor;
AvanteTextLabel *dreamspellColorDesc;
AvanteTextLabel *dreamspellColorTags;
AvanteTextLabel *dreamspellColorPurpose;
AvanteTextLabel *dreamspellColorElement;
}

- (id)initWithFrame:(CGRect)frame destinyKin:(int)dkin;
- (CGFloat)setupView;
- (CGFloat)setupView:(int)kinType;
- (void)updateView:(TzCalTzolkinMoon*)tzolkin;

@end
Loading

0 comments on commit 2619333

Please sign in to comment.