screenshot.c
changeset 410 8de2aaf20800
parent 318 65ebd0cab39b
child 430 75820dedf4f1
equal deleted inserted replaced
409:98c586218b01 410:8de2aaf20800
   372 	_cur_screenshot_format = i;
   372 	_cur_screenshot_format = i;
   373 	strcpy(_screenshot_format_name, _screenshot_formats[i].extension);
   373 	strcpy(_screenshot_format_name, _screenshot_formats[i].extension);
   374 }
   374 }
   375 
   375 
   376 // screenshot generator that dumps the current video buffer
   376 // screenshot generator that dumps the current video buffer
   377 void CurrentScreenCallback(void *userdata, byte *buf, uint y, uint pitch, uint n)
   377 static void CurrentScreenCallback(void *userdata, byte *buf, uint y, uint pitch, uint n)
   378 {
   378 {
   379 	for (; n > 0; --n)
   379 	for (; n > 0; --n)
   380 	{
   380 	{
   381 		memcpy(buf, _screen.dst_ptr + y * _screen.pitch, _screen.width);
   381 		memcpy(buf, _screen.dst_ptr + y * _screen.pitch, _screen.width);
   382 		++y;
   382 		++y;
   385 }
   385 }
   386 
   386 
   387 extern void ViewportDoDraw(ViewPort *vp, int left, int top, int right, int bottom);
   387 extern void ViewportDoDraw(ViewPort *vp, int left, int top, int right, int bottom);
   388 
   388 
   389 // generate a large piece of the world
   389 // generate a large piece of the world
   390 void LargeWorldCallback(void *userdata, byte *buf, uint y, uint pitch, uint n)
   390 static void LargeWorldCallback(void *userdata, byte *buf, uint y, uint pitch, uint n)
   391 {
   391 {
   392 	ViewPort *vp = (ViewPort *)userdata;
   392 	ViewPort *vp = (ViewPort *)userdata;
   393 	DrawPixelInfo dpi, *old_dpi;
   393 	DrawPixelInfo dpi, *old_dpi;
   394 	int wx, left;
   394 	int wx, left;
   395 
   395