OSDN Git Service

クラッシュしたので一部修正
authorKillery <Killery@kiritani-no-Mac-mini.local>
Tue, 21 Jul 2015 08:45:48 +0000 (17:45 +0900)
committerKillery <Killery@kiritani-no-Mac-mini.local>
Tue, 21 Jul 2015 08:45:48 +0000 (17:45 +0900)
Awars III/FieldScene.m
Awars III/MapEditor.h
Awars III/MapEditor.m
Awars III/en.lproj/MainMenu.xib

index 3fd6e67..7811fba 100755 (executable)
@@ -2447,8 +2447,8 @@ w000p:
     U->C.A = calloc(1, sizeof(ATTACK));
     UAtop = U->C.A;
     
-    bool ow1;
-    bool ow2;
+    bool ow1 = false;
+    bool ow2 = false;
     
     while(UC[UN].eHandR.A != NULL){ow1 = true;
         *U->C.A = *UC[UN].eHandR.A;
@@ -2459,8 +2459,9 @@ w000p:
         U->C.attackListNum++;
     }
     UC[UN].eHandR.A = AtopE2;
+    
+    
     if(ow1) {
-        U->C.A->next = calloc(1, sizeof(ATTACK));
         U->C.A = U->C.A->next;
         ow1 = false;
     }
@@ -2473,10 +2474,10 @@ w000p:
         U->C.attackListNum++;
     }
     UC[UN].eHandL.A = AtopE1;
+    
     if(ow2) {
-        U->C.A->next = calloc(1, sizeof(ATTACK));
         U->C.A = U->C.A->next;
-        ow1 = false;
+        ow2 = false;
     }
     while(UC[UN].A != NULL){
         *U->C.A = *UC[UN].A;
index 45cb05e..224c520 100644 (file)
 #import "MapView.h"
 #import "LoadChipList.h"
 
+
+typedef struct _BGMUSIC{
+
+    NSString *name;
+    NSString *fName;
+    NSSound *snd;
+
+}BGMUSIC;
+
 struct _MAPSCRIPT0;
 
 typedef struct _ENDGAMECONDITION{
@@ -252,7 +261,11 @@ int EDappearListRow2;
 MAPSCRIPT0 *MS0T;
 MAPSCRIPT3 *MS3T;
 
+BGMUSIC BGM[999];
+int bgmNum;
+
 bool fuckingRetardedBtnPushed1;
+
 @interface MapEditor : NSObject
 {
     NSTimer *time0;
@@ -578,6 +591,11 @@ bool fuckingRetardedBtnPushed1;
     
     IBOutlet NSWindow *EDWaitWindow;
     IBOutlet NSTextField *EDWaitTF;
+    
+    IBOutlet NSWindow *EDBGMWindow;
+    NSMutableArray *EDBGMMA;
+    IBOutlet NSArrayController *EDBGMAC;
+    IBOutlet NSTableView *EDBGMTV;
 }
 
 -(IBAction)EDSWOKbtn:(id)sender;
@@ -743,5 +761,10 @@ bool fuckingRetardedBtnPushed1;
 -(IBAction)EDwaitSubmit:(id)sender;
 -(IBAction)EDwaitClost:(id)sender;
 
+-(IBAction)EDBGMSubmit:(id)sender;
+-(IBAction)EDBGMClose:(id)sender;
+-(IBAction)EDBGMRun:(id)sender;
+-(IBAction)EDBGMStop:(id)sender;
+
 
 @end
index e309e56..5c5e1b7 100755 (executable)
                  repeats:YES
                  ];
         
+        [self loadBGM];
+        
         scCenter.origin.x = [NSScreen mainScreen].frame.size.width/2 - 640/2;
         scCenter.origin.y = [NSScreen mainScreen].frame.size.height/2 - 480/2;
         headerFrame = 20;
 }
 
 
+-(IBAction)EDBGMSubmit:(id)sender{
+
+}
+-(IBAction)EDBGMClose:(id)sender{
+
+}
+-(IBAction)EDBGMRun:(id)sender{
+
+}
+-(IBAction)EDBGMStop:(id)sender{
+
+}
+
+-(void)loadBGM{
+    
+    NSString * directoryPath = [[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent];
+    [[NSFileManager defaultManager] changeCurrentDirectoryPath:directoryPath];
+    
+    NSString *pathBGM = @"data/BGM";
+    NSData *InitialData = [NSData dataWithContentsOfFile:@"data/BGM/preset.txt"];
+    NSString *pathBGMP = @"data/BGM/preset.txt";
+    NSString *fileData = nil;
+    
+    if(!InitialData){
+        [[NSFileManager defaultManager] createDirectoryAtPath:pathBGM withIntermediateDirectories:YES attributes:nil error:nil];
+        [[NSFileManager defaultManager] createFileAtPath:pathBGMP contents:nil attributes:nil];
+    }
+    fileData = [NSString stringWithContentsOfFile:pathBGMP encoding:NSUTF8StringEncoding error:nil];
+    NSArray *bgmDataArray = [fileData componentsSeparatedByString:@"\n"];
+    bgmNum = (int)[bgmDataArray count];
+    
+    for(int i = 0;i < bgmNum;i++){
+        
+        BGM[i].name = [[bgmDataArray objectAtIndex:0] retain];
+        BGM[i].fName = [[bgmDataArray objectAtIndex:1] retain];
+        
+        NSString *string = @"";
+        
+        string = [string stringByAppendingFormat:@"%@/%@", pathBGM, BGM[i].fName];
+        
+        BGM[i].snd = [[[NSSound alloc] initWithContentsOfURL:[NSURL fileURLWithPath:string] byReference:NO] retain];
+    }
+}
 
 @end
index 519b22f..43e3327 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.AVKitIBPlugin" version="7702"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7702"/>
+        <plugIn identifier="com.apple.AVKitIBPlugin" version="7706"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/>
     </dependencies>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
                 <outlet property="EDAppearBC2" destination="1BM-Hq-M3p" id="qiZ-yx-hRC"/>
                 <outlet property="EDAppearT1V" destination="tdc-xg-y6U" id="YdA-9T-yts"/>
                 <outlet property="EDAppearWindow" destination="nNk-dn-uy1" id="aHk-gN-fhi"/>
+                <outlet property="EDBGMTV" destination="dni-q7-lOB" id="R1z-Ac-ozf"/>
+                <outlet property="EDBGMWindow" destination="1E8-im-drr" id="Fwj-Xk-I7a"/>
                 <outlet property="EDSWOFF" destination="gug-pq-8d3" id="xDG-Wr-Aif"/>
                 <outlet property="EDSWON" destination="6bt-lO-Y4I" id="eep-9x-5OL"/>
                 <outlet property="EDSWTF" destination="y9V-vr-e4v" id="RoT-KM-KrN"/>
                     </button>
                 </subviews>
             </view>
-            <point key="canvasLocation" x="962" y="2518"/>
+            <point key="canvasLocation" x="893" y="2484"/>
+        </window>
+        <window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="1E8-im-drr" userLabel="ウェイト時間">
+            <windowStyleMask key="styleMask" titled="YES"/>
+            <rect key="contentRect" x="196" y="207" width="480" height="480"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/>
+            <view key="contentView" id="83u-gD-yZr">
+                <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="yXr-e3-57C">
+                        <rect key="frame" x="23" y="443" width="75" height="17"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="BGMの決定" id="Wop-OH-Gxa">
+                            <font key="font" size="13" name="HiraKakuProN-W3"/>
+                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
+                    <button verticalHuggingPriority="750" id="7rQ-6K-7mA">
+                        <rect key="frame" x="361" y="13" width="105" height="32"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <buttonCell key="cell" type="push" title="キャンセル" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="kxL-Aq-cXK">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" size="13" name="AquaKana"/>
+                        </buttonCell>
+                        <connections>
+                            <action selector="EDBGMClose:" target="3826" id="4Ik-SR-U0p"/>
+                        </connections>
+                    </button>
+                    <button verticalHuggingPriority="750" id="bfW-Qf-jOa">
+                        <rect key="frame" x="295" y="13" width="66" height="32"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <buttonCell key="cell" type="push" title="決定" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="BaX-jv-wee">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" size="13" name="AquaKana"/>
+                        </buttonCell>
+                        <connections>
+                            <action selector="EDBGMSubmit:" target="3826" id="4Eo-Ai-fm8"/>
+                        </connections>
+                    </button>
+                    <scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="tFT-gd-dWj">
+                        <rect key="frame" x="25" y="117" width="346" height="313"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <clipView key="contentView" id="PWl-8w-vmT">
+                            <rect key="frame" x="1" y="17" width="344" height="295"/>
+                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            <subviews>
+                                <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" headerView="bvi-Yr-ewa" viewBased="YES" id="dni-q7-lOB">
+                                    <rect key="frame" x="0.0" y="0.0" width="417" height="295"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <size key="intercellSpacing" width="3" height="2"/>
+                                    <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                    <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
+                                    <tableColumns>
+                                        <tableColumn editable="NO" width="206.5546875" minWidth="40" maxWidth="1000" id="tqe-f0-pY5">
+                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="曲名">
+                                                <font key="font" metaFont="smallSystem"/>
+                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                            </tableHeaderCell>
+                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="Hdf-N0-0Kq">
+                                                <font key="font" metaFont="system"/>
+                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                            <prototypeCellViews>
+                                                <tableCellView id="Ne0-ub-moY">
+                                                    <rect key="frame" x="1" y="1" width="207" height="17"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                    <subviews>
+                                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="ZqB-h5-9Or">
+                                                            <rect key="frame" x="0.0" y="0.0" width="207" height="17"/>
+                                                            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                                                            <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="tgs-qd-3Ba">
+                                                                <font key="font" metaFont="system"/>
+                                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                                <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                                            </textFieldCell>
+                                                        </textField>
+                                                    </subviews>
+                                                    <connections>
+                                                        <outlet property="textField" destination="ZqB-h5-9Or" id="VkQ-uk-Wkg"/>
+                                                    </connections>
+                                                </tableCellView>
+                                            </prototypeCellViews>
+                                        </tableColumn>
+                                        <tableColumn editable="NO" width="204" minWidth="40" maxWidth="1000" id="pML-jN-wOW">
+                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="ファイル名">
+                                                <font key="font" metaFont="smallSystem"/>
+                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                            </tableHeaderCell>
+                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="cWL-lC-GLP">
+                                                <font key="font" metaFont="system"/>
+                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                            <prototypeCellViews>
+                                                <tableCellView id="Fyj-5O-7qf">
+                                                    <rect key="frame" x="142" y="1" width="204" height="17"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                    <subviews>
+                                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="KRB-KZ-idU">
+                                                            <rect key="frame" x="0.0" y="0.0" width="204" height="17"/>
+                                                            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                                                            <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="fTA-cd-QsW">
+                                                                <font key="font" metaFont="system"/>
+                                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                                <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                                            </textFieldCell>
+                                                        </textField>
+                                                    </subviews>
+                                                    <connections>
+                                                        <outlet property="textField" destination="KRB-KZ-idU" id="yLH-8M-Mk2"/>
+                                                    </connections>
+                                                </tableCellView>
+                                            </prototypeCellViews>
+                                        </tableColumn>
+                                    </tableColumns>
+                                </tableView>
+                            </subviews>
+                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        </clipView>
+                        <scroller key="horizontalScroller" verticalHuggingPriority="750" horizontal="YES" id="ClO-Rj-UXk">
+                            <rect key="frame" x="1" y="119" width="223" height="15"/>
+                            <autoresizingMask key="autoresizingMask"/>
+                        </scroller>
+                        <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="aCl-4o-ugd">
+                            <rect key="frame" x="224" y="17" width="15" height="102"/>
+                            <autoresizingMask key="autoresizingMask"/>
+                        </scroller>
+                        <tableHeaderView key="headerView" id="bvi-Yr-ewa">
+                            <rect key="frame" x="0.0" y="0.0" width="238" height="17"/>
+                            <autoresizingMask key="autoresizingMask"/>
+                        </tableHeaderView>
+                    </scrollView>
+                    <button verticalHuggingPriority="750" id="rss-c8-8Zq">
+                        <rect key="frame" x="392" y="365" width="66" height="32"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <buttonCell key="cell" type="push" title="再生" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Nqg-ul-knA">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" size="13" name="HiraKakuProN-W3"/>
+                        </buttonCell>
+                        <connections>
+                            <action selector="EDBGMRun:" target="3826" id="5yD-4b-dNk"/>
+                        </connections>
+                    </button>
+                    <button verticalHuggingPriority="750" id="MFw-7F-jGJ">
+                        <rect key="frame" x="392" y="316" width="66" height="32"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <buttonCell key="cell" type="push" title="停止" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="aL3-R6-NBs">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" size="13" name="HiraKakuProN-W3"/>
+                        </buttonCell>
+                        <connections>
+                            <action selector="EDBGMStop:" target="3826" id="qb7-W5-jef"/>
+                        </connections>
+                    </button>
+                </subviews>
+            </view>
+            <point key="canvasLocation" x="913" y="2976"/>
         </window>
     </objects>
     <resources>