Rename functions

This commit is contained in:
Hajime Hoshi 2013-11-23 18:15:39 +09:00
parent 75a362d5b1
commit c3968a5aaa
3 changed files with 10 additions and 10 deletions

View File

@ -105,8 +105,8 @@ func (ui *UI) Draw(f func(graphics.Context)) {
C.EndDrawing()
}
//export ebiten_EbitenOpenGLView_Initialized
func ebiten_EbitenOpenGLView_Initialized() {
//export ebiten_Initialized
func ebiten_Initialized() {
if currentUI.graphicsDevice != nil {
panic("The graphics device is already initialized")
}
@ -116,8 +116,8 @@ func ebiten_EbitenOpenGLView_Initialized() {
currentUI.screenScale)
}
//export ebiten_EbitenOpenGLView_InputUpdated
func ebiten_EbitenOpenGLView_InputUpdated(inputType C.InputType, cx, cy C.int) {
//export ebiten_InputUpdated
func ebiten_InputUpdated(inputType C.InputType, cx, cy C.int) {
if inputType == C.InputTypeMouseUp {
currentUI.gameContext.inputState = ebiten.InputState{-1, -1}
return

View File

@ -3,7 +3,7 @@
#include "ebiten_content_view.h"
#include "input.h"
void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
void ebiten_InputUpdated(InputType inputType, int x, int y);
@implementation EbitenContentView {
}
@ -17,7 +17,7 @@ void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
fromView:nil];
int x = location.x;
int y = location.y;
ebiten_EbitenOpenGLView_InputUpdated(InputTypeMouseDown, x, y);
ebiten_InputUpdated(InputTypeMouseDown, x, y);
}
- (void)mouseUp:(NSEvent*)theEvent {
@ -26,7 +26,7 @@ void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
fromView:nil];
int x = location.x;
int y = location.y;
ebiten_EbitenOpenGLView_InputUpdated(InputTypeMouseUp, x, y);
ebiten_InputUpdated(InputTypeMouseUp, x, y);
}
- (void)mouseDragged:(NSEvent*)theEvent {
@ -34,7 +34,7 @@ void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
fromView:nil];
int x = location.x;
int y = location.y;
ebiten_EbitenOpenGLView_InputUpdated(InputTypeMouseDragged, x, y);
ebiten_InputUpdated(InputTypeMouseDragged, x, y);
}
@end

View File

@ -6,7 +6,7 @@
#import "ebiten_content_view.h"
void ebiten_EbitenOpenGLView_Initialized(void);
void ebiten_Initialized(void);
@implementation EbitenWindow
{
@ -61,7 +61,7 @@ void ebiten_EbitenOpenGLView_Initialized(void);
shareContext:nil];
[self->glContext_ setView:[self contentView]];
[self->glContext_ makeCurrentContext];
ebiten_EbitenOpenGLView_Initialized();
ebiten_Initialized();
[format release];