Click here to see the hidden message (It might contain spoilers)
Code: Select all
;;;;;;;;;;;;;;;;;;Items
If neededvars\ItemAmt >=1 Then
filein$=ReadFile(svld\LoadFrom$+"\Item\items.txt")
;Notify filein$
;Notify (svld\LoadFrom$+"\map.txt")
If FileIn$=0 Then
Notify "Error opening file '\Item\items.txt'...The file is either missing, corrupt, or you fucked up this program."
Return -1
EndIf
NeededVars\LaidItemsAmt=ReadLine(FileIn)
For k = 1 To NeededVars\LaidItemsAmt
ID=ReadLine(FileIn)
x=ReadLine(FileIn)
y=ReadLine(FileIn)
ItemsLayer(((x / 16)+1),((y / 16))+1)=ID
For i = 0 To (((ItemsArray(ID)\height ) / 16)-1)
For j = 0 To (((ItemsArray(ID)\width ) / 16)-1)
ItemsLayer(((x / 16) + 1)+j,((y / 16)+1)+i)=((ID)*(-1)) - (1000 * (j+1))
;ltax=(ax+x)
;tay=(ay+i)
;num=((Selection\ID)*(-1)) - (1000 * (x+1))
;Notify tax + "," + tay + " : " + num
;If KeyHit(1) Then Stop
Next
Next
ItemsLayer(((x / 16)+1),((y / 16))+1)=ID
Next
EndIf
^ you've got no fucking idea...
Click here to see the hidden message (It might contain spoilers)
Code: Select all
Function NewProjectCheckFilledOut()
If Not TextFieldText(ProjectWin\textfields[1] ) = "" Then
img=LoadImage(TextFieldText(ProjectWin\textfields[2]))
If img <> 0 Then
If ImageWidth(img) = 512 Then
If ImageHeight(img) = 512 Then
FreeImage img
img2 = LoadImage(TextFieldText(ProjectWin\textfields[3]))
If img2 <> 0 Then
If ImageWidth(img2) = 512 Then
If ImageHeight(img2) = 512 Then
FreeImage img2
If Not TextFieldText(ProjectWin\textfields[4]) = "" Then
If Int(TextFieldText(ProjectWin\textfields[5])) > 5 Then
If Int(TextFieldText(ProjectWin\textfields[6])) > 5 Then
If FileType(TextFieldText(ProjectWin\textfields[7]))>0 Then
Return (1)
Else
Notify ("Error! Could not locate project directory.",1)
Return(-1)
EndIf
Else
Notify "Map height must be an integer larger than 5.",1
Return(-1)
EndIf
Else
Notify "Map width must be an integer larger than 5.",1
Return(-1)
EndIf
Else
Notify "You must choose a name for the starting map in your project.",1
Return(-1)
EndIf
Else
Notify "Your image size must be 512 by 512 with trasparency color of 192,192,192.",1
FreeImage img
FreeImage img2
Return(-1)
EndIf
Else
Notify "You image size must be 512 by 512 with transparency color of 192,192,192,.",1
FreeImage img
FreeImage img2
Return(-1)
EndIf
Else
Notify "Unable to load the Objectsheet.",1
Return(-1)
EndIf
Else
Notify "Your image must be 512 x 512 with transparency color of 192,192,192.",1
FreeImage img
EndIf
Else
Notify "Your image must be 512 x 512 with transparency color of 192,192,192,.",1
FreeImage img
Return(-1)
EndIf
Else
Notify "Unable to load Tilesheet.",1
Return(-1)
EndIf
Else
Notify "You must provide a name for your project.",1
Return(-1)
EndIf
End Function
^ ...Count the nests