Update of /cvsroot/playerstage/code/player/libplayertcp
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9713/libplayertcp
Modified Files:
Tag: b_thjc_dynamic_arrays
playertcp.cc playerudp.cc
Log Message:
static array sizes removed from player
client library updated to use dynamic arrays
Index: playerudp.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayertcp/playerudp.cc,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -d -r1.6 -r1.6.2.1
*** playerudp.cc 23 Aug 2007 19:58:42 -0000 1.6
--- playerudp.cc 10 Sep 2007 04:11:01 -0000 1.6.2.1
***************
*** 615,619 ****
zipped_data->width = raw_data->width;
zipped_data->height = raw_data->height;
! uLongf count = PLAYER_MAP_MAX_TILE_SIZE;
assert(count >= compressBound(raw_data->data_count));
--- 615,619 ----
zipped_data->width = raw_data->width;
zipped_data->height = raw_data->height;
! uLongf count = raw_data->data_count;
assert(count >= compressBound(raw_data->data_count));
***************
*** 848,852 ****
raw_data->width = zipped_data->width;
raw_data->height = zipped_data->height;
! uLongf count = PLAYER_MAP_MAX_TILE_SIZE;
// uncompress the tile
--- 848,853 ----
raw_data->width = zipped_data->width;
raw_data->height = zipped_data->height;
! uLongf count = 10*zipped_data->data_count;
! raw_data->data = (int8_t*)calloc(count,sizeof(int8_t));
// uncompress the tile
***************
*** 862,865 ****
--- 863,867 ----
device->PutMsg(client->queue, &hdr, raw_data);
}
+ free(raw_data->data);
free(raw_data);
#else
Index: playertcp.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayertcp/playertcp.cc,v
retrieving revision 1.57
retrieving revision 1.57.2.1
diff -C2 -d -r1.57 -r1.57.2.1
*** playertcp.cc 23 Aug 2007 19:58:42 -0000 1.57
--- playertcp.cc 10 Sep 2007 04:11:01 -0000 1.57.2.1
***************
*** 610,614 ****
zipped_data->width = raw_data->width;
zipped_data->height = raw_data->height;
! uLongf count = PLAYER_MAP_MAX_TILE_SIZE;
assert(count >= compressBound(raw_data->data_count));
--- 610,614 ----
zipped_data->width = raw_data->width;
zipped_data->height = raw_data->height;
! uLongf count = raw_data->data_count;
assert(count >= compressBound(raw_data->data_count));
***************
*** 912,917 ****
raw_data->width = zipped_data->width;
raw_data->height = zipped_data->height;
! uLongf count = PLAYER_MAP_MAX_TILE_SIZE;
!
// uncompress the tile
if(uncompress((Bytef*)raw_data->data,&count,
--- 912,917 ----
raw_data->width = zipped_data->width;
raw_data->height = zipped_data->height;
! uLongf count = 10*zipped_data->data_count;
! raw_data->data = (int8_t*)calloc(count,sizeof(int8_t));
// uncompress the tile
if(uncompress((Bytef*)raw_data->data,&count,
***************
*** 926,929 ****
--- 926,930 ----
device->PutMsg(client->queue, &hdr, raw_data);
}
+ free(raw_data->data);
free(raw_data);
#else
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit