OSDN Git Service

ステータス決定のスクリプト追加、実戦にもセーブデータにも対応
[awarsiii/AwarsIV.git] / Awars III / MapEditor.h
index 2c95ca2..84a4c42 100644 (file)
 #import "MapView.h"
 #import "LoadChipList.h"
 
-typedef struct _BGMUSIC{
-
-    NSString *name;
-    NSString *fName;
-    NSSound *snd;
-
-}BGMUSIC;
-
-typedef struct _SEFFECT{
-    
-    NSString *name;
-    NSString *fName;
-    NSSound *snd;
-    
-}SEFFECT;
-
-typedef struct _GAMEOVER{
-
-    NSString *fNname;
-    NSImage *img;
-    bool gaovFlag;
-    bool edcdFlag;
-
-}GAMEOVER;
-
-typedef struct _STAGECLEAR{
-
-    bool scFlag;
-    bool edcdFlag;
-
-}STAGECLEAR;
-
-struct _MAPSCRIPT0;
-
-typedef struct _ENDGAMECONDITION{
-    
-    int endType1;
-    int endType2;
-    
-    NSString *etValue1[64];
-    NSString *etValue2[64];
-    
-}ENDGAMECONDITION;
-typedef struct _MAPSCRIPT1{
-    //文章スクリプト
-    NSString *name;
-    NSString *str;
-    NSImage *img;
-    NSString *iName;
-    NSString *nameID;
-
-}MAPSCRIPT1;
-
-typedef struct _MAPSCRIPT2A{
-
-    struct _MAPSCRIPT2A *next;
-    
-    struct _MAPSCRIPT0 *P;
-    
-}MAPSCRIPT2A;
-
-typedef struct _MAPSCRIPT2{
-    //文章選択肢スクリプト
-    
-    struct _MAPSCRIPT2 *next;
-    
-    NSString *selection;
-    NSString *labelJump;
-    
-    
-}MAPSCRIPT2;
-
-typedef struct _MAPSCRIPT3{
-
-    struct _MAPSCRIPT3 *next;
-    
-    int x;
-    int y;
-    bool flag;
-    
-    int type;
-    int team;
-    
-    UNITCHIP U;
-    int unitNum;
-
-    int loadInt;
-}MAPSCRIPT3;
-
-typedef struct _MAPSCRIPT5{
-    
-    struct _MAPSCRIPT5 *next;
-    
-    int x;
-    int y;
-    
-    int type;
-    int team;
-    
-    UNITCHIP U;
-    int unitNum;
-    
-    int saveInt;
-}MAPSCRIPT5;
-
-typedef struct _PLACEMENT{
-
-    struct _PLACEMENT *next;
-    
-    int type;
-    int x;
-    int y;
-    int z;
-    int x2;
-    int y2;
-
-}PLACEMENT;
-
-typedef struct _UNIT2{
-
-    struct _UNIT2 *next;
-    UNITCHIP C;
-    
-    int team;
-    int x;
-    int y;
-
-}UNIT2;
-
-typedef struct _BUILD2{
-    
-    struct _BUILD2 *next;
-    struct _BUILDCHIP *C;
-    
-    int team;
-    int x;
-    int y;
-    
-}BUILD2;
-
-typedef struct _MAPSCRIPT4{
-    
-    NSString *COMPrabel;
-    NSString *FAILrabel;
-    
-    bool suicchiFlag;
-    int *suicchi;
-    bool suicchiONOFF;
-    
-    bool hensuFlag;
-    int hensu1;
-    bool teisuFlag;
-    int teisuValue;
-    bool hensu2flag;
-    int hensu2;
-    int hensuType;
-    
-    bool timerFlag;
-    int timerMin;
-    int timerSec;
-    int timerType;
-    
-    bool unitNumFlag;
-    int team;
-    int unitNum;
-    int unitType;
-    bool unitTypeFlag;
-    UNIT2 *subj;
-    bool placeFlag;
-    PLACEMENT *wayp;
-    bool unitCMDflag;
-    int unitCMD;
-    bool objeFlag;
-    UNIT2 *obje;
-    int objeRange;
-    bool buildFlag;
-    BUILD2 *build;
-    
-    
-}MAPSCRIPT4;
-
-typedef struct _MAPSCRIPT6{
-    
-    int team;
-    
-    bool RCsupply;
-    bool RCfood;
-    bool RCmoney;
-    
-    bool RCsupplyAdd;
-    bool RCfoodAdd;
-    bool RCmoneyAdd;
-    
-    int RCsupplyValue;
-    int RCfoodValue;
-    int RCmoneyValue;
-    
-    int RCsupplySelect;
-    int RCfoodSelect;
-    int RCmoneySelect;
-    
-    bool RCsupplyS;
-    bool RCfoodS;
-    bool RCmoneyS;
-}MAPSCRIPT6;
-
-
-typedef struct _MAPSCRIPT0{
-    struct _MAPSCRIPT0 *next;
-    
-    bool endFlag;
-    
-    int type;
-    bool succeessfulFlag;
-    struct _MAPSCRIPT1 S1;
-    struct _MAPSCRIPT2 *S2;
-    struct _MAPSCRIPT3 *S3;
-    struct _MAPSCRIPT4 S4;
-    struct _MAPSCRIPT5 *S5;
-    struct _MAPSCRIPT6 S6;
-    int indent;
-    
-    NSString *label;
-    NSString *labelJump;
-    NSString *memo;
-    
-    int *switch1;
-    int *switch2;
-    
-    int val;
-    int valCnt;
-    
-    int timerMin;
-    int timerSec;
-    int timerEntire;
-    bool timerFlag;
-    bool timerVisible;
-    bool timerRun;
-    bool timerMode;
-    double wait;
-    
-    UNITCHIP U;
-    int unitAction;
-    
-    BGMUSIC BGM;
-    SEFFECT SE;
-    
-    bool titleBack;
-    
-    STAGECLEAR sc;
-    GAMEOVER gaov;
-    
-}MAPSCRIPT0;
-
-typedef struct _MAPSCRIPTD{
-
-    struct _MAPSCRIPTD *next;
-    struct _MAPSCRIPT0 *P;
-    int index;
-    int x;
-    int y;
-    int type;
-    bool endFlag;
-    double ET1;
-    double ET2;
-    double ET3;
-    int ETtype;
-    
-    int *switch1;
-    int *switch2;
-    bool switch1f;
-    bool switch2f;
-    NSMutableArray *SCRPT;
-    
-}MAPSCRIPTD;
-
-typedef struct _MAPSCRIPT{
-    
-    ENDGAMECONDITION EGClight;
-    ENDGAMECONDITION EGCdark;
-    
-    int playerSet1;
-    int playerSet2;
-    bool battleSetMode;
-    
-    NSMutableArray *SCRPTname;
-    struct _MAPSCRIPTD *D;
-    
-}MAPSCRIPT;
-
-typedef struct _MAPFILE{
-
-    NSString *fileName;
-
-    MAPSCRIPT MS;
-
-}MAPFILE;
-
-typedef struct _EVENTIMAGE{
-
-    struct _EVENTIMAGE *next;
-    
-    NSString *name;
-    
-    NSImage *img;
-
-}EVENTIMAGE;
-
 bool loadChipSideFlag;
 
-MAPFILE MF[512];
-ENDGAMECONDITION EGC[2];
-EVENTIMAGE *EIMG;
-EVENTIMAGE *EIMGtop;
 NSString *CEIMG;
 int EIMGN;
 
@@ -379,9 +67,6 @@ NSInteger EDselRow;
 
 bool mapLoadFlagForMSD;
 bool mapLoadFlagForMSD2;
-MAPSCRIPTD *MSDTOPP;//一番もとの先頭
-MAPSCRIPTD *MSDTOP;//一番先頭
-MAPSCRIPTD *msdtop;//スクリプト上の先頭
 
 
 bool Suicchi[9999];
@@ -414,6 +99,14 @@ bool EQmodeFlag;
 bool battleSetMode;
 int playerSet1;
 int playerSet2;
+bool scenarioSetMode;
+int scenarioNumbCrnt;
+int scenarioNumbNext;
+bool employAllowedFlag;
+bool buildAllowedFlag;
+bool summonAllowedFlag;
+
+
 NSRect scCenter;
 NSInteger headerFrame;
 
@@ -426,15 +119,9 @@ bool EDdissappearFlag;
 bool EDdissappearPosFlag;
 int EDdissappearListRow;
 
-MAPSCRIPT0 *MS0T;
-MAPSCRIPT3 *MS3T;
-MAPSCRIPT5 *MS5T;
-
 int EDBGMListRow;
 int EDSEListRow;
 
-BGMUSIC BGM[999];
-SEFFECT SE[9999];
 int bgmNum;
 int seNum;
 
@@ -461,10 +148,23 @@ bool EDresourceflag1;
 bool EDresourceflag2;
 bool EDresourceflag3;
 
+bool EDstatusFlag;
+int EDstatusRow1;
+int EDstatusRow2;
+int EDstatusRow3;
+bool EDstatusS1Flag;
+bool EDstatusS2Flag;
+bool EDstatusS3Flag;
+
 bool fuckingRetardedBtnPushed1;
 
 int fileNumb;
 
+int eventGuildListRow;
+bool eventGUildListFlag;
+
+bool oopsIsRightFlag;
+
 NSTimer *timeMapEditor;
 
 @interface MapEditor : NSObject
@@ -486,7 +186,7 @@ NSTimer *timeMapEditor;
     IBOutlet NSTextField *EDeventTimeTF1;
     IBOutlet NSTextField *EDeventTimeTF2;
     IBOutlet NSPopUpButton *EDeventTrigger;
-    
+    IBOutlet NSButton *EDeventTriggerDeley;
     
     IBOutlet NSTextField *TFcurrentChipIndex;
     
@@ -893,11 +593,116 @@ NSTimer *timeMapEditor;
     IBOutlet NSTableView *EDdissappearTV;
     IBOutlet NSWindow *EDdissappearSubmitWindow;
     
+    IBOutlet NSButton *eventScenarioModeBtn;
+    IBOutlet NSTextField *eventScenarioCrntTF;
+    IBOutlet NSTextField *eventScenarioNextTF;
+    
+    
+    IBOutlet NSWindow *eventGuildListWindow;
+
+    NSMutableArray *eventGuildListMA;
+    IBOutlet NSArrayController *eventGuildListAC;
+    IBOutlet NSTableView *eventGuildListTV;
+    IBOutlet NSTextField *eventGuildTF1;
+    IBOutlet NSTextField *eventGuildTF2;
+    IBOutlet NSButtonCell *eventGuildBC1;
+    IBOutlet NSButtonCell *eventGuildBC2;
+    IBOutlet NSButton *eventGuildBTN;
+    
+    
+    IBOutlet NSWindow *EDhpFixWindow;
+    
+    IBOutlet NSPopUpButton *EDhpFixPUB;
+    IBOutlet NSButtonCell *EDhpFixBC1;
+    IBOutlet NSButtonCell *EDhpFixBC2;
+    IBOutlet NSButtonCell *EDhpFixBC3;
+    IBOutlet NSButtonCell *EDhpFixBC4;
+    IBOutlet NSTextField *EDhpFixTF1;
+    IBOutlet NSTextField *EDhpFixTF2;
+    IBOutlet NSButton *EDhpFixBtn;
+    
+    NSMutableArray *EDhpFixListMA1;
+    IBOutlet NSArrayController *EDhpFixListAC1;
+    IBOutlet NSTableView *EDhpFixListTV1;
+    NSMutableArray *EDhpFixListMA2;
+    IBOutlet NSArrayController *EDhpFixListAC2;
+    IBOutlet NSTableView *EDhpFixListTV2;
+    NSMutableArray *EDhpFixListMA3;
+    IBOutlet NSArrayController *EDhpFixListAC3;
+    IBOutlet NSTableView *EDhpFixListTV3;
+    
+    IBOutlet NSButton *eventEmployFlagBTN;
+    IBOutlet NSButton *eventBuildFlagBTN;
+    IBOutlet NSButton *eventSummonFlagBTN;
+    
+    
+    IBOutlet NSWindow *EDstatusWindow;
+    IBOutlet NSPopUpButton *EDstatusPB;
+    IBOutlet NSButton *EDstatusCB1;
+    IBOutlet NSButton *EDstatusCB2;
+    IBOutlet NSButton *EDstatusCB3;
+    IBOutlet NSButton *EDstatusCB4;
+    IBOutlet NSButton *EDstatusCB5;
+    IBOutlet NSButton *EDstatusCB6;
+    IBOutlet NSButtonCell *EDstatusBC11;
+    IBOutlet NSButtonCell *EDstatusBC12;
+    IBOutlet NSButtonCell *EDstatusBC13;
+    IBOutlet NSButtonCell *EDstatusBC21;
+    IBOutlet NSButtonCell *EDstatusBC22;
+    IBOutlet NSTextField *EDstatusTF1;
+    IBOutlet NSTextField *EDstatusTF2;
+    NSMutableArray *EDstatusMA1;
+    IBOutlet NSArrayController *EDstatusAC1;
+    IBOutlet NSTableView *EDstatusTV1;
+    NSMutableArray *EDstatusMA2;
+    IBOutlet NSArrayController *EDstatusAC2;
+    IBOutlet NSTableView *EDstatusTV2;
+    NSMutableArray *EDstatusMA3;
+    IBOutlet NSArrayController *EDstatusAC3;
+    IBOutlet NSTableView *EDstatusTV3;
+    
+    
+    IBOutlet NSWindow *EDequipWindow;
+    IBOutlet NSButtonCell *EDequipBC1;
+    IBOutlet NSButtonCell *EDequipBC2;
+    IBOutlet NSButton *EDequipCB1;
+    IBOutlet NSButton *EDequipCB2;
+    IBOutlet NSButton *EDequipCB3;
+    NSMutableArray *EDequipMA1;
+    IBOutlet NSArrayController *EDequipAC1;
+    IBOutlet NSTableView *EDequipTV1;
+    NSMutableArray *EDequipMA2;
+    IBOutlet NSArrayController *EDequipAC2;
+    IBOutlet NSTableView *EDequipTV2;
+    NSMutableArray *EDequipMA3;
+    IBOutlet NSArrayController *EDequipAC3;
+    IBOutlet NSTableView *EDequipTV3;
     
-    
-
 }
 
+-(IBAction)EDequipSubmit:(id)sender;
+-(IBAction)EDequipCancel:(id)sender;
+-(IBAction)EDequipPlaceAdd:(id)sender;
+-(IBAction)EDequipValueAdd:(id)sender;
+-(IBAction)EDequipPlaceDel:(id)sender;
+-(IBAction)EDequipValueDel:(id)sender;
+
+-(IBAction)EDstatusSubmit:(id)sender;
+-(IBAction)EDstatusCancel:(id)sender;
+-(IBAction)EDstatusPlaceAdd:(id)sender;
+-(IBAction)EDstatusValueAdd:(id)sender;
+-(IBAction)EDstatusPlaceDel:(id)sender;
+-(IBAction)EDstatusValueDel:(id)sender;
+
+-(IBAction)EDhpFixPlace:(id)sender;
+-(IBAction)EDhpFixValue:(id)sender;
+-(IBAction)EDhpFixSubmit:(id)sender;
+-(IBAction)EDhpFixCancel:(id)sender;
+
+-(IBAction)eventGuildBtnCell:(id)sender;
+-(IBAction)eventGuildBtn:(id)sender;
+-(IBAction)eventGuildBtnSubmit:(id)sender;
+
 -(IBAction)EDSWOKbtn:(id)sender;
 -(IBAction)EDSWCancelbtn:(id)sender;
 
@@ -1037,9 +842,6 @@ NSTimer *timeMapEditor;
 -(IBAction)EDmpSubmit:(id)sender;
 -(IBAction)EDmpCancel:(id)sender;
 
--(IBAction)EDstatusSubmit:(id)sender;
--(IBAction)EDstatusCancel:(id)sender;
-
 -(IBAction)setBattleModeBtn:(id)sender;
 -(IBAction)playerSetBtn1:(id)sender;
 -(IBAction)playerSetBtn2:(id)sender;
@@ -1109,8 +911,12 @@ NSTimer *timeMapEditor;
 -(IBAction)EDdissapearMapSubmit:(id)sender;
 -(IBAction)EDdissapearUnitSubmit:(id)sender;
 -(IBAction)EDdissapearSubmitCancel:(id)sender;
-@end
 
+-(void)saveMapTFset;
+-(void)initFileDirectoryOthers;
+-(void)initEventGuildList;
+@end
+MapEditor *mapEditor;