ios stuff
This commit is contained in:
1 parent
4e695fe902
commit
6ec81a421e
11 files changed
+374
-9
No files matched your search
@@ -122,7 +122,7 @@ public:
|
||||
|
||||
virtual void OuterOnTapUp(vec2 p);
|
||||
|
||||
virtual void OuterOnTapUpAfterShift(vec2 p);
|
||||
virtual void OuterOnTapUpAfterMove(vec2 p);
|
||||
|
||||
virtual void OuterOnMove(vec2 shift);
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
|
||||
virtual void InnerOnTapUp(vec2 p) { }
|
||||
|
||||
virtual void InnerOnTapUpAfterShift(vec2 p) { }
|
||||
virtual void InnerOnTapUpAfterMove(vec2 p) { }
|
||||
|
||||
virtual void InnerOnMove(vec2 shift) { }
|
||||
|
||||
@@ -140,6 +140,8 @@ public:
|
||||
//To do on mouse wheel move
|
||||
|
||||
virtual void OnKeyPress(cardinal key) { } //Try not to override this. But if you need to override, call ancestor!
|
||||
|
||||
virtual void OnScale(float scale) { }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,21 @@ public:
|
||||
void CreateEngine();
|
||||
void DestroyEngine();
|
||||
|
||||
extern TApplication* App;
|
||||
|
||||
|
||||
template<typename APPTYPE>
|
||||
APPTYPE* AppInit(int width, int height)
|
||||
{
|
||||
CreateEngine();
|
||||
APPTYPE* result = new APPTYPE;
|
||||
App = result;
|
||||
App->OuterInit(width, height, static_cast<float>(width), static_cast<float>(height));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
} //namespace SE
|
||||
|
||||
|
||||
|
||||
@@ -22,4 +22,5 @@ std::string IosGetFilePathUserData(const std::string& filename);
|
||||
|
||||
void IosSwitchToScreen();
|
||||
|
||||
|
||||
} //namespace SE
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// Header.h
|
||||
// doublehitballs
|
||||
//
|
||||
// Created by vvv ооо on 15.07.12.
|
||||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
//All of them can be found in SalmonEngineIos.cpp
|
||||
//This header stores only declarations
|
||||
|
||||
namespace SE
|
||||
{
|
||||
|
||||
void AppDeinit();
|
||||
void AppUpdate(int dt);
|
||||
void AppDraw();
|
||||
void AppOnTapDown(int posx, int posy);
|
||||
void AppOnTapUp(int posx, int posy);
|
||||
void AppOnScroll(int shiftx, int shifty);
|
||||
void AppOnScale(float scale);
|
||||
void AppOnTapUpAfterMove(int posx, int posy);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// CustomGLKView.h
|
||||
// doublehitballs
|
||||
//
|
||||
// Created by vvv ооо on 15.07.12.
|
||||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <GLKit/GLKit.h>
|
||||
|
||||
@interface GLKViewTemplate : GLKView
|
||||
{
|
||||
|
||||
CGPoint touchBeganLocation;
|
||||
|
||||
bool touchMoved;
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
|
||||
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
|
||||
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// ViewController.h
|
||||
// doublehitballs
|
||||
//
|
||||
// Created by vvv ооо on 13.07.12.
|
||||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <GLKit/GLKit.h>
|
||||
|
||||
@interface ViewControllerTemplate : GLKViewController
|
||||
|
||||
|
||||
- (void) appInitCaller;
|
||||
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user