mirror of
https://github.com/Ragora/T2-BoL.git
synced 2026-03-08 06:50:26 +00:00
Dear God why did I ever use Tribal IDE!
Fixed tabbing and made the code cleaner and not so hard to read.
This commit is contained in:
parent
9a05e8d86c
commit
c4114d5c6d
15 changed files with 766 additions and 809 deletions
|
|
@ -1,54 +1,48 @@
|
|||
// -----------------------------------------------------
|
||||
// fileProcessing.cs
|
||||
// Basic file functions
|
||||
// Copyright (c) 2012 The DarkDragonDX
|
||||
// -----------------------------------------------------
|
||||
function getFileBuffer(%file)
|
||||
{
|
||||
if (!IsFile(%file))
|
||||
return "Not existant.";
|
||||
if (!IsFile(%file))
|
||||
return "Not existant.";
|
||||
|
||||
new FileObject(FileBuffer);
|
||||
FileBuffer.openForRead(%file);
|
||||
new FileObject(FileBuffer);
|
||||
FileBuffer.openForRead(%file);
|
||||
|
||||
while (!FileBuffer.isEOF())
|
||||
{
|
||||
%buffer = FileBuffer.readLine() @ "\n";
|
||||
}
|
||||
FileBuffer.detach();
|
||||
return %buffer; //Long string. >.>
|
||||
while (!FileBuffer.isEOF())
|
||||
%buffer = FileBuffer.readLine() @ "\n";
|
||||
FileBuffer.detach();
|
||||
return %buffer; //Long string. >.>
|
||||
}
|
||||
|
||||
function getLine(%file, %line)
|
||||
{
|
||||
if (!IsFile(%file))
|
||||
return "Not existant.";
|
||||
if (!IsFile(%file))
|
||||
return "Not existant.";
|
||||
|
||||
new FileObject(FileLine);
|
||||
FileLine.openForRead(%file);
|
||||
new FileObject(FileLine);
|
||||
FileLine.openForRead(%file);
|
||||
|
||||
for (%i = 0; %i < %line; %i++)
|
||||
{
|
||||
%line = FileLine.readLine();
|
||||
}
|
||||
FileLine.detach();
|
||||
|
||||
return %line;
|
||||
for (%i = 0; %i < %line; %i++)
|
||||
%line = FileLine.readLine();
|
||||
FileLine.detach();
|
||||
return %line;
|
||||
}
|
||||
|
||||
function getLine(%file, %line)
|
||||
{
|
||||
if (!IsFile(%file))
|
||||
return "Not existant.";
|
||||
if (!IsFile(%file))
|
||||
return "Not existant.";
|
||||
|
||||
new FileObject(FileLine);
|
||||
FileLine.openForRead(%file);
|
||||
new FileObject(FileLine);
|
||||
FileLine.openForRead(%file);
|
||||
|
||||
for (%i = 0; %i < %line; %i++)
|
||||
{
|
||||
%line = FileLine.readLine();
|
||||
}
|
||||
FileLine.detach();
|
||||
|
||||
return %line;
|
||||
for (%i = 0; %i < %line; %i++)
|
||||
%line = FileLine.readLine();
|
||||
FileLine.detach();
|
||||
return %line;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
|
|
@ -56,9 +50,9 @@ return %line;
|
|||
// -----------------------------------------------------
|
||||
function fileObject::Detach(%this) //Detaches fileObject from file & deletes
|
||||
{
|
||||
%this.close();
|
||||
%this.delete();
|
||||
return %this;
|
||||
%this.close();
|
||||
%this.delete();
|
||||
return %this;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue