#wanted_fps = 30
#fps_max = 60
#viewing_range_nodes_max = 300
-#viewing_range_nodes_min = 50
+#viewing_range_nodes_min = 35
#screenW = 800
#screenH = 600
#host_game =
wchar_t text[200];\r
swprintf(text, 200,\r
L"Minetest-c55\n"\r
+ L"by Perttu Ahola\n"\r
+ L"celeron55@gmail.com\n\n"\r
L"SER_FMT_VER_HIGHEST=%i\n"\r
- L"max_texture_size=\n(%i,%i)\n",\r
+ L"max_texture_size=\n(%i,%i)\n"\r
+ ,\r
(int)SER_FMT_VER_HIGHEST,\r
max_texture_size.X,\r
max_texture_size.Y\r
assert(baseimage);
video::ITexture *other = driver->getTexture("../data/crack.png");
+
+ dstream<<__FUNCTION_NAME<<": crack texture size is "
+ <<other->getSize().Width<<"x"
+ <<other->getSize().Height<<std::endl;
// We have to get the whole texture because getting a smaller area
// messes the whole thing. It is probably a bug in Irrlicht.
// NOTE: This doesn't work probably because some systems scale
// the image to fit a texture or something...
- /*video::IImage *otherimage = driver->createImage(
- other, core::position2d<s32>(0,0), other->getSize());*/
- // This should work on more systems
video::IImage *otherimage = driver->createImage(
+ other, core::position2d<s32>(0,0), other->getSize());
+ // This should work on more systems
+ // - no, it doesn't, output is more random.
+ /*video::IImage *otherimage = driver->createImage(
other, core::position2d<s32>(0,0),
- v2u32(16, CRACK_ANIMATION_LENGTH * 16));
+ v2u32(16, CRACK_ANIMATION_LENGTH * 16));*/
assert(otherimage);
MapBlock has a tunnel ended in its side
*/
- v3f orp;
- s16 ors;
+ v3f orp(
+ (float)(rand()%ued)+0.5,
+ (float)(rand()%ued)+0.5,
+ (float)(rand()%ued)+0.5
+ );
// Check z-
try
if(getNode(ap).d == CONTENT_AIR)
{
orp = v3f(x+1,y+1,0);
- ors = 4;
+ goto continue_generating;
}
}
}
if(getNode(ap).d == CONTENT_AIR)
{
orp = v3f(x+1,y+1,ued-1);
- ors = 4;
+ goto continue_generating;
}
}
}
if(getNode(ap).d == CONTENT_AIR)
{
orp = v3f(0,y+1,z+1);
- ors = 4;
+ goto continue_generating;
}
}
}
if(getNode(ap).d == CONTENT_AIR)
{
orp = v3f(ued-1,y+1,z+1);
- ors = 4;
+ goto continue_generating;
}
}
}
catch(InvalidPositionException &e){}
+
+continue_generating:
/*
Generate some tunnel starting from orp and ors
for(u16 i=0; i<3; i++)
{
v3f rp(
- (float)(rand()%(ued-1))+0.5,
- (float)(rand()%(ued-1))+0.5,
- (float)(rand()%(ued-1))+0.5
+ (float)(rand()%ued)+0.5,
+ (float)(rand()%ued)+0.5,
+ (float)(rand()%ued)+0.5
);
s16 min_d = 0;
s16 max_d = 4;
}
orp = rp;
- ors = rs;
}
}