cheahjs / TerrariaAPI-Server

Fork is now over at https://github.com/NyxStudios/TerrariaAPI-Server
https://tshock.co
32 stars 24 forks source link

More efficient RAM usage #32

Closed MarioE closed 10 years ago

MarioE commented 10 years ago

This basically does the same thing as the previous PR. There is only one difference:

Main.tile is now simply a direct 2D array of Tile structs, keeping the old field syntax as before (e.g., Main.tile[x, y].type). Since this will still cause incompatibilities I recommend ticking the API version.

TShock should simply require a recompilation now to be compatible with this, but I'm not entirely sure.

Regex replaces used: Main.tile[([^&|\n]?), ([^&|\n]?)] == null false

Main.tile[([^&|\n]?), ([^&|\n]?)] != null true

(. matches newlines) Tile expr\w? = Main.tile[([^\n]?), ([^\n]?)];.?expr\w?.([^\n]?); Main.tile[\1, \2].\3;

PhoenixICE commented 10 years ago

Comment.