From bd100c5483eb77a27eeac4e476c81a1bf6afc710 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 26 Jan 2011 17:13:19 +0200 Subject: backing up some stuff --- src/main.cpp | 185 +++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 149 insertions(+), 36 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index d2b67e9a8..388ab8089 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -104,12 +104,8 @@ SUGG: Meshes of blocks could be split into 6 meshes facing into Gaming ideas: ------------- -- How would some GTA-style ideas work? - - Cars? Stealing? Unlawful stuff and cops? Lots of guns? +- Aim for something like controlling a single dwarf in Dwarf Fortress. -- RPG style? - -- Space racer style? Documentation: -------------- @@ -286,9 +282,16 @@ TODO: Remove duplicate lighting implementation from Map (leave VoxelManipulator, which is faster) FIXME: The new texture stuff is slow on wine - - Actually it is not too slow; updating excess amount of meshes - when making footprints is too slow. It has to be fixed. + - A basic grassy ground block takes 20-40ms + - A bit more complicated block can take 270ms + - On linux, a similar one doesn't take long at all (14ms) + - Is it a bad std::string implementation of MSVC? + - Can take up to 200ms? Is it when loading textures or always? + - Updating excess amount of meshes when making footprints is too + slow. It has to be fixed. -> implement Map::updateNodeMeshes() + TODO: Optimize TileSpec to only contain a reference number that + is fast to compare, which refers to a cached string Doing now: ---------- @@ -1266,41 +1269,106 @@ struct ChatLine std::wstring text; }; -int main(int argc, char *argv[]) +// These are defined global so that they're not optimized too much. +// Can't change them to volatile. +s16 temp16; +f32 tempf; +v3f tempv3f1; +v3f tempv3f2; +std::string tempstring; +std::string tempstring2; + +void SpeedTests() { - /* - Low-level initialization - */ + { + dstream<<"The following test should take around 20ms."< map1; + tempf = -324; + const s16 ii=300; + for(s16 y=0; y=0; y--){ + for(s16 x=0; xsetResizable(true); -- cgit v1.2.3