C6241AE51A570BE900EA35C2 /* ucb52.png in Resources */ = {isa = PBXBuildFile; fileRef = C6241AE11A570BE900EA35C2 /* ucb52.png */; };
C629F5EC18BD54C2001A42B0 /* アクセラレータ.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C629F5EB18BD54C2001A42B0 /* アクセラレータ.jpg */; };
C632BD8916C4B7A40087CDAA /* サトシ.png in Resources */ = {isa = PBXBuildFile; fileRef = C632BD8816C4B7A40087CDAA /* サトシ.png */; };
+ C633EC241C5F5DC200B9E0E5 /* Idle.m in Sources */ = {isa = PBXBuildFile; fileRef = C633EC231C5F5DC200B9E0E5 /* Idle.m */; };
C63622E21A57456B006A20BF /* ucb53.png in Resources */ = {isa = PBXBuildFile; fileRef = C63622DE1A57456B006A20BF /* ucb53.png */; };
C63622E31A57456B006A20BF /* ucb54.png in Resources */ = {isa = PBXBuildFile; fileRef = C63622DF1A57456B006A20BF /* ucb54.png */; };
C63622E41A57456B006A20BF /* ucb55.png in Resources */ = {isa = PBXBuildFile; fileRef = C63622E01A57456B006A20BF /* ucb55.png */; };
C6DDC78F16A1C5DA0093865D /* haik2.png in Resources */ = {isa = PBXBuildFile; fileRef = C6DDC78B16A1C5D90093865D /* haik2.png */; };
C6DDC79016A1C5DA0093865D /* img1.png in Resources */ = {isa = PBXBuildFile; fileRef = C6DDC78C16A1C5D90093865D /* img1.png */; };
C6DDC79116A1C5DA0093865D /* img2.png in Resources */ = {isa = PBXBuildFile; fileRef = C6DDC78D16A1C5DA0093865D /* img2.png */; };
+ C6E02F3C1C5FAF0D00B3304B /* FPS.m in Sources */ = {isa = PBXBuildFile; fileRef = C6E02F3B1C5FAF0D00B3304B /* FPS.m */; };
C6E8DA25167C85D200BFEC32 /* MapView.m in Sources */ = {isa = PBXBuildFile; fileRef = C6E8DA24167C85D200BFEC32 /* MapView.m */; };
C6E8DA29167C85EE00BFEC32 /* ChipView.m in Sources */ = {isa = PBXBuildFile; fileRef = C6E8DA28167C85EE00BFEC32 /* ChipView.m */; };
C6E8DA2C167C860B00BFEC32 /* SeedView.m in Sources */ = {isa = PBXBuildFile; fileRef = C6E8DA2B167C860B00BFEC32 /* SeedView.m */; };
C6241AE11A570BE900EA35C2 /* ucb52.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ucb52.png; sourceTree = "<group>"; };
C629F5EB18BD54C2001A42B0 /* アクセラレータ.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "アクセラレータ.jpg"; sourceTree = "<group>"; };
C632BD8816C4B7A40087CDAA /* サトシ.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "サトシ.png"; sourceTree = "<group>"; };
+ C633EC221C5F5DC200B9E0E5 /* Idle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Idle.h; sourceTree = "<group>"; };
+ C633EC231C5F5DC200B9E0E5 /* Idle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Idle.m; sourceTree = "<group>"; };
C63622DE1A57456B006A20BF /* ucb53.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ucb53.png; sourceTree = "<group>"; };
C63622DF1A57456B006A20BF /* ucb54.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ucb54.png; sourceTree = "<group>"; };
C63622E01A57456B006A20BF /* ucb55.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ucb55.png; sourceTree = "<group>"; };
C6DDC78B16A1C5D90093865D /* haik2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = haik2.png; sourceTree = "<group>"; };
C6DDC78C16A1C5D90093865D /* img1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img1.png; sourceTree = "<group>"; };
C6DDC78D16A1C5DA0093865D /* img2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img2.png; sourceTree = "<group>"; };
+ C6E02F3A1C5FAF0D00B3304B /* FPS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FPS.h; sourceTree = "<group>"; };
+ C6E02F3B1C5FAF0D00B3304B /* FPS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FPS.m; sourceTree = "<group>"; };
C6E8DA23167C85D200BFEC32 /* MapView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapView.h; sourceTree = "<group>"; };
C6E8DA24167C85D200BFEC32 /* MapView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapView.m; sourceTree = "<group>"; };
C6E8DA27167C85EE00BFEC32 /* ChipView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChipView.h; sourceTree = "<group>"; };
C679EB461671B577001EB662 /* StartMenu.h */,
C679EB491671B587001EB662 /* ContinueMenu.h */,
C679EB4A1671B587001EB662 /* ContinueMenu.m */,
+ C6E02F3A1C5FAF0D00B3304B /* FPS.h */,
+ C6E02F3B1C5FAF0D00B3304B /* FPS.m */,
+ C633EC221C5F5DC200B9E0E5 /* Idle.h */,
+ C633EC231C5F5DC200B9E0E5 /* Idle.m */,
C69C3ED716D2350A00FA2D1B /* Game */,
C6E8DA33167C988C00BFEC32 /* MapEditor */,
C68DD4A51686E0CE009CE3AE /* Scenario */,
C6AA2925188489520083001C /* LoadChipList.m in Sources */,
C69C3EDA16D2356200FA2D1B /* EventScene.m in Sources */,
C69C3EDD16D2358500FA2D1B /* EventView.m in Sources */,
+ C633EC241C5F5DC200B9E0E5 /* Idle.m in Sources */,
+ C6E02F3C1C5FAF0D00B3304B /* FPS.m in Sources */,
C67E1F8C16D6CB570085009B /* FieldScene.m in Sources */,
C67E1F9016D6CB6F0085009B /* FieldView.m in Sources */,
C67AA7D616FDBB5A0091C9A8 /* BattleView.m in Sources */,
[TFcostMe setIntValue:BC[clickIndex].Emoney];
[TFWTE setIntValue:BC[clickIndex].S_M.WTE];
[TFWTN setIntValue:BC[clickIndex].S_M.WTN];
- [BC[clickIndex].img setFlipped:NO];
+ //[BC[clickIndex].img setFlipped:NO];
[IVimg setImage:BC[clickIndex].img];
[IVimgBig setImage:BC[clickIndex].imgb];
[PUPtype selectItemAtIndex:BC[clickIndex].type];
int SLindexU;
int SLindexL;
+
+
@interface ChipView : NSView
{
NSTimer *time;
-(NSImage*)LoadImage:(NSString*)name;
-(void)DrawImage:(NSImage*)image x:(float)x y:(float)y cx:(int)cx cy:(int)cy;
+-(void)EventLoopChipView;
+
@end
+
+ChipView *ChipViewInst;
\ No newline at end of file
{
self = [super initWithFrame:frame];
if (self) {
+ /*
time = [NSTimer
- scheduledTimerWithTimeInterval:0.05f
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoop:)
userInfo:nil
repeats:YES
- ];
+ ];*/
+
+ ChipViewInst = self;
+
chip = [[self LoadImage:@"マス.png"] retain];
chip2 = [[self LoadImage:@"セレクター.png"] retain];
chipA = [[self LoadImage:@"cc旗青.png"] retain];
return self;
}
--(void)EventLoop:(NSTimer*)time{
+-(void)EventLoopChipView{
SLindex = (SLy*3 + SLx)+(MapChipListIndex-1)*24;
SLindexB = (SLy*3 + SLx)+(BuildChipListIndex-1)*24;
-(NSImage*)LoadImage:(NSString*)name;
-(void)DrawImage:(NSImage*)image x:(float)x y:(float)y cx:(int)cx cy:(int)cy;
+-(void)EventLoopCommandView;
@end
+
+CommandView *CommandViewInst;
\ No newline at end of file
{
self = [super initWithFrame:frame];
if (self) {
+ /*
time = [NSTimer
- scheduledTimerWithTimeInterval:0.05f
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoop:)
userInfo:nil
repeats:YES
- ];
+ ];*/
chip = [[self LoadImage:@"マス.png"] retain];
chip2 = [[self LoadImage:@"ccなし.png"] retain];
return self;
}
--(void)EventLoop:(NSTimer*)time{
+-(void)EventLoopCommandView{
[self setNeedsDisplay:YES];
}
#import "StringText.h"
#import "MapView.h"
#import "MapEditor.h"
+#import "FPS.h"
bool evMouseClicked;
bool evMouseDowned;
-(IBAction)btn9:(id)sender;
+-(void)EventFunc;
+
@end
[super init];
if (self) {
timer = [NSTimer
- scheduledTimerWithTimeInterval:0.1
+ scheduledTimerWithTimeInterval:1.0/30
target:self selector:@selector(EventLoopES:)
userInfo:nil repeats:YES
];
-(void)EventLoopES:(NSTimer *)timer{
+
+ [self EventFunc];
+}
+
+
+-(void)EventFunc{
+
if(!startES) return;
ST = NULL;
self = [super initWithFrame:frame];
if (self) {
time = [NSTimer
- scheduledTimerWithTimeInterval:0.001f
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoopEV:)
userInfo:nil
--- /dev/null
+//
+// FPS.h
+// Awars III
+//
+// Created by 桐谷 諭史 on 2016/02/01.
+// Copyright © 2016年 Killery. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <Cocoa/Cocoa.h>
+
+
+@interface FPS : NSObject
+{
+ NSTimer *timer;
+}
+
+bool CtrlFPS(double num);
+int GetFrameRate();
+int GetFrameRateMAX();
+@end
--- /dev/null
+//
+// FPS.m
+// Awars III
+//
+// Created by 桐谷 諭史 on 2016/02/01.
+// Copyright © 2016年 Killery. All rights reserved.
+//
+
+#import "FPS.h"
+
+@implementation FPS
+
+-(id)init{
+
+
+ timer = [NSTimer
+ scheduledTimerWithTimeInterval:1.0/30
+ target:self
+ selector:@selector(FPSFnc:)
+ userInfo:nil
+ repeats:YES];
+
+
+
+
+
+
+ return self;
+
+
+}
+
+
+-(void)FPSFnc:(id)sender{
+
+ GetFrameRate();
+
+}
+
+int GetFrameRateMAX(){
+
+ static CFTimeInterval lastTime = 0;
+ static int fps = 0;
+ static bool fpsInit = false;
+
+ if(!fpsInit){
+ lastTime = CFAbsoluteTimeGetCurrent();
+ fpsInit = true;
+ }
+
+ CFTimeInterval currentTime = CFAbsoluteTimeGetCurrent();
+ fps++;
+ if(currentTime - lastTime >= 1){
+ NSLog(@"MAXFPS = %d", fps);
+ fps = 0;
+ lastTime = currentTime;
+ }
+
+ return fps;
+}
+
+int GetFrameRate(){
+
+ static CFTimeInterval lastTime = 0;
+ static int fps = 0;
+ static bool fpsInit = false;
+
+ if(!fpsInit){
+ lastTime = CFAbsoluteTimeGetCurrent();
+ fpsInit = true;
+ }
+
+ CFTimeInterval currentTime = CFAbsoluteTimeGetCurrent();
+ fps++;
+ if(currentTime - lastTime >= 1){
+ NSLog(@"FPS = %d", fps);
+ fps = 0;
+ lastTime = currentTime;
+ }
+
+ return fps;
+}
+
+@end
if(self){
time = [NSTimer
- scheduledTimerWithTimeInterval:0.015
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoopFS:)
userInfo:nil
U = U->next;
}
- if(Utarget) NSLog(@"PX %d PY %d UX %d UY %d", possionX, possionY, Utarget->x, Utarget->y);
+ //if(Utarget) NSLog(@"PX %d PY %d UX %d UY %d", possionX, possionY, Utarget->x, Utarget->y);
U = UTop;
}
double hi = U->C.S_C.LUK - U2->C.S_C.LUK;
if(hi < 0) hi = 0;
- hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi+1)*hit2/hit*10;
+ hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi/10+1)*hit2/hit*10;
if(battleDod2Flag) hit = hit / 2;
hit = floor(hit);
double hi = U->C.S_C.LUK - U2->C.S_C.LUK;
if(hi < 0) hi = 0;
- hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi+1)*hit2/hit*10;
+ hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi/10+1)*hit2/hit*10;
if(battleDod1Flag) hit /= 2;
hit = floor(hit);
double hi = U->C.S_C.LUK - U2->C.S_C.LUK;
if(hi < 0) hi = 0;
- hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi+1)*hit2/hit*10;
+ hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi/10+1)*hit2/hit*10;
if(battleDod2Flag) hit = hit / 2;
hit = floor(hit);
double hi = U->C.S_C.LUK - U2->C.S_C.LUK;
if(hi < 0) hi = 0;
- hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi+1)*hit2/hit*10;
+ hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi/10+1)*hit2/hit*10;
if(battleDod1Flag) hit /= 2;
hit = floor(hit);
double hi = U->C.S_C.LUK - U2->C.S_C.LUK;
if(hi < 0) hi = 0;
- hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi+1)*hit2/hit*10;
+ hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi/10+1)*hit2/hit*10;
if(hit > 100) hit = 100;
if(hit < 0) hit = 0;
if(U2A->D->sort == 1){
}else if(extentBattleFlag2){
DUNnum++;
messageProcess = 1;
- if(DUN[DUNnum] == -1){
+ if(DUN[DUNnum] <= 0){
DUNnum = 1;
messageProcess++;
messageProcess++;
hi = U->C.S_C.LUK - U2->C.S_C.LUK;
if(hi < 0) hi = 0;
- hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi+1)*hit2/hit*10;
+ hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi/10+1)*hit2/hit*10;
if(hit > 100) hit = 100;
if(hit < 0) hit = 0;
double hi = U->C.S_C.LUK - U2->C.S_C.LUK;
if(hi < 0) hi = 0;
- hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi+1)*hit2/hit*10;
+ hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi/10+1)*hit2/hit*10;
if(hit > 100) hit = 100;
if(U2A->D->sort == 1){
hit = 100;
}else if(extentBattleFlag2){
DUNnum++;
messageProcess = 1;
- if(DUN[DUNnum] == -1){
+ if(DUN[DUNnum] <= 0){
DUNnum = 1;
messageProcess++;
messageProcess++;
double hi = U->C.S_C.LUK - U2->C.S_C.LUK;
if(hi < 0) hi = 0;
- hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi+1)*hit2/hit*10;
+ hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi/10+1)*hit2/hit*10;
if(hit > 100) hit = 100;
battleDod1Flag = false;
{
self = [super initWithFrame:frame];
if (self) {
+
time = [NSTimer
- scheduledTimerWithTimeInterval:0.01
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoopFV:)
userInfo:nil
if(stanbyFlag){
- if(!submitFlag) movePlus += 4;
- if( i0 < g_shallowDepth && movePlus >= 32 && !submitFlag)
+ if(!submitFlag) movePlus += 1;
+ if( i0 < g_shallowDepth && movePlus >= 3 && !submitFlag)
{
cPosX = g_moveRoute[i0][1]*32;
cPosY = g_moveRoute[i0][0]*32;
//if(unitBreak->CPU) cpuTurnEndFlag = false;
- if(!cpuTurnEndFlag && wtRdy){
+ if(!cpuTurnEndFlag && wtRdy && unitBreak->C.S_C.WT == 0){
[self modeCPUturn];
}
if(unitBreak){
- if(unitBreak->dead){
+ if(unitBreak->dead && unitBreak->C.S_C.WT != 999999){
unitNum[unitBreak->x][unitBreak->y] = -1;
unitBreak->C.S_C.WT = 999999;
- //wtRdy = false;
+ wtRdy = false;
stanbyFlag = true;
}
if(coolTime)
return;
+ /*
if(cpuAImodeflag)
- return;
+ return;*/
if(P[1].type == 1){
switch (cpuMODE) {
case MODE_CPU_IDLE:
+
+
if(coolTime)
return;
+
if(stanbyFlag)
return;
wtRdy = true;
unitMoveEndFlag = false;
+ cpuAtkExtendFlag = false;
+ cpuAtkExtendFlag2 = false;
+ extentBattleFlag2 = false;
CPUAttackFlag = false;
CPUAttackFlag2 = false;
if(cpuAImodeflag && unitBreak->C.nameID)
else NSLog(@"Utarg NULL");
cpuModeMOVEflag = true;
if(unitNoMoveStanbyFlag){
- static int waitTimer = 50;
+ static int waitTimer = 30;
cpuModeATTACKflag = true;
if (waitTimer > 0) {
waitTimer--;
return;
}else{
- waitTimer = 50;
+ waitTimer = 30;
unitNoMoveFlag = true;
U = UTop;
if(cpuModeBATTLEendFlag){
- static int waitTimer0 = 50;
+ static int waitTimer0 = 30;
if (waitTimer0 > 0) {
waitTimer0--;
return;
}else{
- waitTimer0 = 50;
+ waitTimer0 = 30;
pushStanbyFlag = true;
cpuModeMOVEflag = false;
}
else if((CPUAttackFlag && unitMoveEndFlag )|| CPUAttackFlag2){
- static int waitTimer = 50;
+ static int waitTimer = 30;
if (waitTimer > 0) {
waitTimer--;
return;
}else{
- waitTimer = 50;
+ waitTimer = 30;
wtAttackedFlag = true;
if(!cpuAtkExtendFlag){
CPUAttackSubmitFlag = true;
}
}else if((CPUAttackFlag && !unitMoveEndFlag)){
- static int waitTimer = 50;
+ static int waitTimer = 30;
if (waitTimer > 0) {
waitTimer--;
return;
}else{
- waitTimer = 50;
+ waitTimer = 30;
wtAttackedFlag = true;
if(!cpuAtkExtendFlag){
CPUAttackSubmitFlag = true;
if(!Utarget){
CPUAttackFlag = false;
+ cpuAtkExtendFlag = false;
}
if(!CPUAttackFlag){
wtRdy = false;
pushStanbyFlag = true;
+
cpuModeMOVEflag = false;
cpuModeATTACKflag = false;
cpuAImodeflag = false;
pushStanbyFlag = true;
+
cpuModeMOVEflag = false;
cpuModeATTACKflag = false;
cpuAImodeflag = false;
--- /dev/null
+//
+// Idle.h
+// Awars III
+//
+// Created by 桐谷 諭史 on 2016/02/01.
+// Copyright © 2016年 Killery. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "FPS.h"
+#import "EventScene.h"
+
+
+@interface Idle : NSObject
+{
+ NSTimer *Timer;
+}
+@end
--- /dev/null
+//
+// Idle.m
+// Awars III
+//
+// Created by 桐谷 諭史 on 2016/02/01.
+// Copyright © 2016年 Killery. All rights reserved.
+//
+
+#import "Idle.h"
+
+@implementation Idle
+-(id)init{
+
+ if(self){
+ /*
+ Timer = [NSTimer
+ scheduledTimerWithTimeInterval:0.00000001
+ target:self
+ selector:@selector(EventLoop:)
+ userInfo:nil
+ repeats:YES
+ ];
+
+
+
+ ESh = [EventScene new];
+ [[NSBundle mainBundle] loadNibNamed:@"Event Scene" owner:ESh topLevelObjects:nil];
+ */
+ }
+
+
+ return self;
+}
+
+-(void)EventLoop:(id)sender{
+
+ //[self Idling];
+
+}
+
+-(void)Idling{
+ /*
+ GetFrameRateMAX();
+ if(!CtrlFPS(60))
+ return;
+ GetFrameRate();
+ setNeedsDisplayFlag = true;
+ */
+
+ //[ESh EventFunc];
+
+
+
+}
+@end
-(id)init{
-
+/*
LCLtime = [NSTimer
- scheduledTimerWithTimeInterval:0.01f
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoopLCL:)
userInfo:nil
repeats:YES
- ];
+ ];*/
chipNumb = 23;
[self initFileDirectory];
[super init];
if (self) {
+ /*
MCLtime = [NSTimer
- scheduledTimerWithTimeInterval:0.05f
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoopMCL:)
userInfo:nil
repeats:YES
];
+ */
[self initFileDirectory];
[self initMapChipList];
MapChipMax = (int)chipNumb/25+1;
[TFchu setIntValue:MC[clickIndex].chu];
[TFsora setIntValue:MC[clickIndex].sora];
[TFtype selectItemAtIndex:MC[clickIndex].type];
- [MC[clickIndex].img setFlipped:NO];
+ //[MC[clickIndex].img setFlipped:NO];
[IVimg setImage:MC[clickIndex].img];
}
NSString *imgName = @"mc";
imgName = [imgName stringByAppendingFormat:@"%d", i+1];
MC[i].img = [[NSImage imageNamed:imgName] retain];
- [MC[i].img setFlipped:NO];
+ //[MC[i].img setFlipped:NO];
NSString *imagePath = @"data/MapChip/img/";
imagePath = [imagePath stringByAppendingString:MC[i].iName];
int fileNumb;
+NSTimer *timeMapEditor;
+
@interface MapEditor : NSObject
{
- NSTimer *time0;
+
IBOutlet NSImageView *topIV;
IBOutlet NSTextField *topName;
-(id)init{
if (self) {
- time0 = [NSTimer
- scheduledTimerWithTimeInterval:0.05
+ timeMapEditor = [NSTimer
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoop0:)
userInfo:nil
-(void)EventLoop0:(NSTimer*)time{
+
+
+ [MapViewInst EventLoopMapView];
+ [ChipViewInst EventLoopChipView];
+ [SeedViewInst EventLoopSeedView];
+ [CommandViewInst EventLoopCommandView];
+
/*
if(doubleClickedFlag && EDbranchPlaceTenFlag){
NSLog(@"omg", MSDTOPP);
int MSDPONOFFFlagNum;
+
+
@interface MapView : NSView
{
NSTimer *time0;
-(void)loadMapChip;
+-(void)EventLoopMapView;
@end
+
+MapView *MapViewInst;
{
self = [super initWithFrame:frame];
if (self) {
- time0 = [NSTimer
- scheduledTimerWithTimeInterval:0.05f
+
+ /*time0 = [NSTimer
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoop00:)
userInfo:nil
repeats:YES
- ];
+ ];*/
+
+ MapViewInst = self;
+
chip = [[self LoadImage:@"マス.png"] retain];
chip2 = [[self LoadImage:@"セレクター.png"] retain];
return self;
}
--(void)EventLoop00:(NSTimer*)time{
+-(void)EventLoopMapView{
if(saveMapChipFlag){saveMapChipFlag = false;
[self saveMapChip];
-(NSImage*)LoadImage:(NSString*)name;
-(void)DrawImage:(NSImage*)image x:(float)x y:(float)y cx:(int)cx cy:(int)cy;
+-(void)EventLoopSeedView;
@end
+
+
+SeedView *SeedViewInst;
\ No newline at end of file
{
self = [super initWithFrame:frame];
if (self) {
+ /*
time = [NSTimer
- scheduledTimerWithTimeInterval:0.05f
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoop:)
userInfo:nil
repeats:YES
- ];
+ ];*/
+ SeedViewInst = self;
+
chip = [[self LoadImage:@"マス.png"] retain];
chip2 = [[self LoadImage:@"地形.png"] retain];
chip3 = [[self LoadImage:@"建物.png"] retain];
return self;
}
--(void)EventLoop:(NSTimer*)time{
+-(void)EventLoopSeedView{
[self setNeedsDisplay:YES];
}
bool frameRunFlag;
bool ATalphaFlag;
+bool attackEffectPreviewBtnFlag;
+
+
@interface UnitChipList : NSObject
{
NSTimer *UCLtime;
-(void)initFileDirectoryAttack2;
-(void)setTotalDamage2:(int)i row:(int)r;
+
+
+
+
+
+
+-(void)aniTFChanged;
@end
+UnitChipList *UnitChipListInst;
@interface UnitChipListEV : NSView
{
if (self) {
UCLtime = [NSTimer
- scheduledTimerWithTimeInterval:0.01f
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoopUCL:)
userInfo:nil
repeats:YES
];
- [[NSRunLoop currentRunLoop] addTimer: UCLtime forMode:NSDefaultRunLoopMode];
-
+ /*
aniTimer = [NSTimer
- scheduledTimerWithTimeInterval:0.015
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoopANI:)
userInfo:nil
repeats:YES
- ];
- [[NSRunLoop currentRunLoop] addTimer: aniTimer forMode:NSDefaultRunLoopMode];
+ ];*/
+ UnitChipListInst = self;
[self initFileDirectoryItem];
[self initItemList];
-(IBAction)attackEffectPreviewBtn:(id)sender{
+
+
+
+
ATTACK *A;
if(EQmodeFlag){
}
}
[ATEffectAniWindow makeKeyAndOrderFront:nil];
+ attackEffectPreviewBtnFlag = true;
+ [UCLtime invalidate];
}
}
-(IBAction)attackEffectAniCloseBtn:(id)sender{
frameRunFlag = false;
+ UCLtime = [NSTimer
+ scheduledTimerWithTimeInterval:1.0/30
+ target:self
+ selector:@selector(EventLoopUCL:)
+ userInfo:nil
+ repeats:YES
+ ];
[ATEffectAniWindow close];
}
-(void)EventLoopANI:(NSTimer*)time{
- static int frameCnt = 0;
-
- if(!frameRunFlag){
- frameCnt = 0;
- return;
- }
-
- ATTACK *A;
-
- if(EQmodeFlag){
- A = EQ[clickIndexEQ].A;
- }else{
- if(!loadChipSideFlag){
- A = UC[clickIndex].A;
- }else{
- A = LC[cil].A;
- }
-
- }
- atkTop = A;
-
- for(int i = 0;i < clickIndexAL;i++){
- A = A->next;
- }
-
- if(frameCnt == 0){
-
- ani = A->AN.ANI;
- ANI *aniTop = ani;
-
- for (int i = 0; i < frameNum-1;i++) {
- ani = ani->next;
- }
-
- if(ani->snd){
- [ani->snd setCurrentTime:0];
- [ani->snd play];
- ani->snd.loops = NO;
- }
- ani = aniTop;
-
- A->AN.ANI = ani;
- }
-
- if(frameCnt < A->AN.frame){
- frameCnt++;
- }else{
-
- frameCnt = 0;
-
- if(frameNum < frameMax){
- frameNum++;
- }else{
- frameNum = 1;
-
- A->AN.ANI = ani;
- }
- [ATframeCntTF setStringValue:[NSString stringWithFormat:@"%d/%d", frameNum, frameMax]];
-
- }
-
- A = atkTop;
-
- if(EQmodeFlag){
- EQ[clickIndexEQ].A = atkTop;
- }else{
- if(!loadChipSideFlag){
- UC[clickIndex].A = atkTop;
- }else{
- LC[cil].A = atkTop;
- }
- }
}
-(IBAction)attackEffectRun:(id)sender{
}
-
+-(void)aniTFChanged{
+ [ATframeCntTF setStringValue:[NSString stringWithFormat:@"%d/%d", frameNum, frameMax]];
+}
if (self) {
timer = [NSTimer
- scheduledTimerWithTimeInterval:0.015f
+ scheduledTimerWithTimeInterval:1.0/30
target:self
selector:@selector(EventLoopAN:)
userInfo:nil
}
-(void)EventLoopAN:(NSTimer*)timer{
+ static int frameCnt = 0;
+
+ if(!frameRunFlag){
+ frameCnt = 0;
+ return;
+ }
+
+ ATTACK *A;
+
+ if(EQmodeFlag){
+ A = EQ[clickIndexEQ].A;
+ }else{
+ if(!loadChipSideFlag){
+ A = UC[clickIndex].A;
+ }else{
+ A = LC[cil].A;
+ }
+
+ }
+ atkTop = A;
+
+ for(int i = 0;i < clickIndexAL;i++){
+ A = A->next;
+ }
+
+ if(frameCnt == 0){
+
+ ani = A->AN.ANI;
+ ANI *aniTop = ani;
+
+ for (int i = 0; i < frameNum-1;i++) {
+ ani = ani->next;
+ }
+
+ if(ani->snd){
+ [ani->snd setCurrentTime:0];
+ [ani->snd play];
+ ani->snd.loops = NO;
+ }
+ ani = aniTop;
+
+ A->AN.ANI = ani;
+ }
+
+ if(frameCnt < A->AN.frame){
+ frameCnt++;
+ }else{
+
+ frameCnt = 0;
+
+ if(frameNum < frameMax){
+ frameNum++;
+ }else{
+ frameNum = 1;
+
+ A->AN.ANI = ani;
+ }
+ [UnitChipListInst aniTFChanged];
+
+ }
+
+ A = atkTop;
+
+ if(EQmodeFlag){
+ EQ[clickIndexEQ].A = atkTop;
+ }else{
+ if(!loadChipSideFlag){
+ UC[clickIndex].A = atkTop;
+ }else{
+ LC[cil].A = atkTop;
+ }
+
+ }
+
[self setNeedsDisplay:YES];
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9531" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9532" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
- <plugIn identifier="com.apple.AVKitIBPlugin" version="9531"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9531"/>
+ <plugIn identifier="com.apple.AVKitIBPlugin" version="9532"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9532"/>
<capability name="box content view" minToolsVersion="7.0"/>
</dependencies>
<objects>
- <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
+ <customObject id="-2" userLabel="File's Owner" customClass="Idle">
<connections>
<outlet property="delegate" destination="494" id="495"/>
</connections>
</connections>
</customObject>
<customObject id="420" customClass="NSFontManager"/>
+ <customObject id="263-Vk-nul" customClass="Idle"/>
+ <customObject id="vWh-oC-VAv" customClass="FPS"/>
<customObject id="1697" customClass="Title">
<connections>
<outlet property="ContinueWindow" destination="702" id="1699"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" id="ZbX-lt-I6z">
- <rect key="frame" x="0.0" y="0.0" width="238" height="17"/>
+ <rect key="frame" x="0.0" y="0.0" width="402" height="17"/>
<autoresizingMask key="autoresizingMask"/>
</tableHeaderView>
</scrollView>