Huge commit! Standardizes var definitions in most places.

Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
Mloc
2012-05-29 16:26:48 +01:00
parent 5f030b1117
commit fbb67b2e42
157 changed files with 1736 additions and 1634 deletions
+11 -12
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/*
A Star pathfinding algorithm
Returns a list of tiles forming a path from A to B, taking dense objects as well as walls, and the orientation of
@@ -36,9 +38,8 @@ length to avoid portals or something i guess?? Not that they're counted right no
PriorityQueue
var
L[]
cmp
var/L[]
var/cmp
New(compare)
L = new()
cmp = compare
@@ -92,13 +93,12 @@ PriorityQueue
if(ind)
Remove(ind)
PathNode
var
datum/source
PathNode/prevNode
f
g
h
nt // Nodes traversed
var/datum/source
var/PathNode/prevNode
var/f
var/g
var/h
var/nt // Nodes traversed
New(s,p,pg,ph,pnt)
source = s
prevNode = p
@@ -109,8 +109,7 @@ PathNode
nt = pnt
datum
var
bestF
var/bestF
proc
PathWeightCompare(PathNode/a, PathNode/b)
return a.f - b.f
+26 -28
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
//cursors
#define Default_Cursor 0
#define Client_Cursor 1
@@ -37,9 +39,8 @@
// Deprecated! See global.dm for new configuration vars
/*
var
DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
var/DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
*/
DBConnection
@@ -69,15 +70,14 @@ DBConnection
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
var
_db_con // This variable contains a reference to the actual database connection.
dbi // This variable is a string containing the DBI MySQL requires.
user // This variable contains the username data.
password // This variable contains the password data.
default_cursor // This contains the default database cursor data.
var/_db_con // This variable contains a reference to the actual database connection.
var/dbi // This variable is a string containing the DBI MySQL requires.
var/user // This variable contains the username data.
var/password // This variable contains the password data.
var/default_cursor // This contains the default database cursor data.
//
server = ""
port = 3306
var/server = ""
var/port = 3306
DBQuery
New(sql_query,DBConnection/connection_handler,cursor_handler)
@@ -134,25 +134,23 @@ DBQuery
else if(conversions.len < column) conversions.len = column
conversions[column] = conversion
var
sql // The sql query being executed.
default_cursor
list/columns //list of DB Columns populated by Columns()
list/conversions
list/item[0] //list of data values populated by NextRow()
var/sql // The sql query being executed.
var/default_cursor
var/list/columns //list of DB Columns populated by Columns()
var/list/conversions
var/list/item[0] //list of data values populated by NextRow()
DBConnection/db_connection
_db_query
var/DBConnection/db_connection
var/_db_query
DBColumn
var
name
table
position //1-based index into item data
sql_type
flags
length
max_length
var/name
var/table
var/position //1-based index into item data
var/sql_type
var/flags
var/length
var/max_length
New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
src.name = name_handler
@@ -179,4 +177,4 @@ DBColumn
if(TIMESTAMP) return "TIMESTAMP"
if(TIME) return "TIME"
if(STRING) return "STRING"
if(BLOB) return "BLOB"
if(BLOB) return "BLOB"
+7 -6
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/proc/dopage(src,target)
var/href_list
var/href
@@ -261,11 +263,10 @@ proc
return 0
Y1+=s
else
var
m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
signX = SIGN(X2-X1)
signY = SIGN(Y2-Y1)
var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
var/b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
var/signX = SIGN(X2-X1)
var/signY = SIGN(Y2-Y1)
if(X1<X2)
b+=m
while(X1!=X2 || Y1!=Y2)
@@ -318,4 +319,4 @@ proc/is_carrying(var/M as mob, var/O as obj)
if(O:loc == M)
return 1
O = O:loc
return 0
return 0
+20 -14
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/*
IconProcs
by Lummox JR
@@ -434,14 +436,13 @@ proc
if(!dir) dir = A.dir
// Loop through the underlays, then overlays, sorting them into the layers list
var
list/process = A.underlays // Current list being processed
pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
curIndex=1 // index of 'current' in list being processed
current // Current overlay being sorted
currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
compare // The overlay 'add' is being compared against
cmpIndex // The index in the layers list of 'compare'
var/list/process = A.underlays // Current list being processed
var/pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
var/curIndex=1 // index of 'current' in list being processed
var/current // Current overlay being sorted
var/currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
var/compare // The overlay 'add' is being compared against
var/cmpIndex // The index in the layers list of 'compare'
while(TRUE)
if(curIndex<=process.len)
current = process[curIndex]
@@ -487,15 +488,20 @@ proc
// Icon already exists, just return that one
return _flatIcons[h]
var
// We start with a blank canvas, otherwise some icon procs crash silently
icon/flat = icon('effects.dmi', "icon_state"="nothing") // Final flattened icon
icon/add // Icon of overlay being added
var/icon/flat = icon('effects.dmi', "icon_state"="nothing") // Final flattened icon
var/icon/add // Icon of overlay being added
// Current dimensions of flattened icon
flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()
var/flatX1=1
var/flatX2=flat.Width()
var/flatY1=1
var/flatY2=flat.Height()
// Dimensions of overlay being added
addX1;addX2;addY1;addY2
var/addX1
var/addX2
var/addY1
var/addY2
for(var/I in layers)
@@ -581,4 +587,4 @@ proc
for(var/O in A.overlays)
var/image/I = O
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
return composite
return composite