Protocol: | pserver | User: | anonymous |
Machine: | crossfire.cvs.sourceforge.net | CVSROOT: | /cvsroot/crossfire |
Filename: image.c | |||
Revision 1.12 | mwedel | 2006/06/05 01:28:57 | +9 -9 |
Clean up some compiler warnings. Most of the changes are related to replaced %lld with FMT64 defines so that the format will be correct, no matter if the 64 bit type is a long, long long, or if this is windows. #if 0 out a bunch of code that isn't used. -- common/exp.c: Replaced lld with FMT64 common/holy.c: #if 0 out baptize_altar(). Add banner copyright at top of file. common/info.c, common/item.c, common/loader.l, common/loader.c, common/map.c: common/porting.c Replaced lld with FMT64 common/time.c: Replace a bunch of variables declared as longs to be uint32. Update various sprintf appropriately. include/global.h: Add FMT64 and FMT64U as appropriate for different systems. Change max_time to be a uint32 include/sockproto.h, include/sproto.h: rebuilt server/apply.c: #if 0 out monster_apply_special server/c_range.c: Add != 0 in assignment if statement - same meaning, clearer on intention and avoids compiler warning. server/c_wiz.c: Update command_kick() to take const char. Update command_speed() to operate properly based on max_time being a uint32. Update various lld to FMT64. Clarify ambiguous if/if/else statement in command_insert_into() server/commands.c: Add cast to command_kick for new function prototype. #if 0 out find_command(), parse_string(), parse_command() server/disease.c: #if 0 out find_disease(), reduce_symptoms() server/egoitem.c: #if 0 out create_artifact(). Add copyright at top of file. server/gods.c: #if 0 out get_god() server/hiscore.c: Replace lld with FMT64 server/login.c: #if 0 out create_savedir_if_needed() server/resurrection.c: Replace lld with FMT64. #if 0 out dead_character() and dead_player_exists() server/server.c: Remove info_keys() - hasn't been used in a long time. #if 0 out process_active_maps() server/skill_util.c: Replace lld with FMT64 server/spell_util.c: #if 0 out check_spell_effect() server/weather.c: #if 0 out feather_map(). Fix what I suspect is an error in worldmap_to_weathermap() to skip over starting slashes. socket/image.c: Add a fair number of char * casts to suppress warnings. socket/init.c: Change buflen in init_connection() to socklen_t to match function prototype. Add some char * casts. socket/loop.c: Add some char * casts. -- MSW 2006-06-04 | |||
Show difference between Revision 1.11 and 1.12 | |||
Revision 1.11 | akirschbaum | 2006/05/21 05:35:10 | +11 -13 |
Make socket handling more robust. | |||
Show difference between Revision 1.10 and 1.11 | |||
Revision 1.10 | ryo_saeba | 2006/03/18 09:05:37 | +14 -15 |
Massive cleaning of code. Shouldn't be any functional change. | |||
Show difference between Revision 1.9 and 1.10 | |||
Revision 1.9 | akirschbaum | 2005/12/05 17:34:04 | +3 -3 |
Apply patch #1371956 (code cleanup patch) by Stefan Huehner: fix old-style function declarations and prototypes to proper Ansi C syntax. This patch allows the compiler to check function arguments and also removes some warnings when compiling with -Wstrict-prototypes. | |||
Show difference between Revision 1.8 and 1.9 | |||
Revision 1.8 | akirschbaum | 2005/07/14 04:18:57 | +2 -2 |
common/{button.c, treasure.c, utils.c}, server/{c_wiz.c, login.c, shop.c, skill_util.c, spell_effect.c}, socket/{image.c, item.c}: Fix printf like format specifiers. At least one of them fixes a means to crash the server. Andreas Kirschbaum 2005-07-14 | |||
Show difference between Revision 1.7 and 1.8 | |||
Revision 1.7 | mwedel | 2005/03/28 01:20:10 | +2 -2 |
socket/image.c: Change esrv_send_face to check for <=0 instead of <0 on face number. socket/request.c: Change if statement that acted improperly to determine when to send faces. MSW 2005-03-27 | |||
Show difference between Revision 1.6 and 1.7 | |||
Revision 1.6 | mwedel | 2005/03/19 03:14:57 | +3 -3 |
This change makes it so that the smoothing information is pushed to the client (if the client is using smoothing) instead of a process were we tell the client the smoothlevel and the client then has to request the face info for smoothing. If we know the client wants the info, much easier to push it to the client. This simplifies the client code (doesn't have to keep track of what is requests). It also fixes the 'problem' that when you join the game, you get a few frames with no smoothing and then the smoothing shows up, which seems a bit odd. My testing shows that old clients that want smoothing use this new logic withouth any problems. -- common/image.c: add smooth_face default so that we don't have to look it up everytime. include/define.h: Add SMOOTH_FACE_NAME used by image.c include/global.h: Add smooth_face extern declaration. include/newserver.h: Update comment on what faces_sent is used for, add NS_FACESENT_* values which determines what info for the face was sent. socket/image.c, socket/init.c, socket/item.c: Update faces_sent checks/set to check against NS_FACESENT bitmask. socket/request.c: Update faces_sent as mentioned above. And SendSmooth(), rewrite AskSmooth() to use SendSmooth(). Modify update_smooth() to send smoothing information to the client. MSW 2005-03-19 | |||
Show difference between Revision 1.5 and 1.6 | |||
Revision 1.5 | ryo_saeba | 2003/12/14 10:28:47 | +6 -4 |
Compilation warning cleaning | |||
Show difference between Revision 1.4 and 1.5 | |||
Revision 1.4 | ryo_saeba | 2003/12/02 12:51:44 | +60 -27 |
Added & updated comments, now in doxygen-like style | |||
Show difference between Revision 1.3 and 1.4 | |||
Revision 1.3 | mwedel | 2002/03/26 01:18:57 | +77 -6 |
Update to improve image caching and faceset support in the client. The main change is adding the 'requestinfo image_info' and 'requestinfo image_sums' commands. common/image.c: Checksum the bmaps file when we load it - we send this as part of the image_info data. doc/Developers/protocol: Document the requestinfo data. include/global.h: Add extern for bmaps_checksum, and the define for ROTATE_RIGHT which is used for checksumming. include/newserver.h: Update SC version to 1027 so that clients can know if they can issue requestinfo commands. include/sockproto.h: rebuilt lib/adm/collect_images.pl: Add support for it to make a crossfire-images distribution that the client can use to bootstrap its image set. socket/image.c: Change SendFaceCmd to take a NewSocket parameter instead of a player parameter - in this way, it can be used before the AddMe command - this allows the client to download images before issuing that command. Add send_image_info and send_image_sums function which send the requestinfo data to the client. socket/loop.c: Move the askface command from the player commands to the newsocket commands. Add RequestInfo functino that determines the type of request and calls the specific function to deal with it. MSW 2002-03-25 | |||
Show difference between Revision 1.2 and 1.3 | |||
Revision 1.2 | mwedel | 2002/02/25 23:45:48 | +2 -2 |
lib/collect.pl.in: Modified so that it uses the image.base.xyz.png to make sure each listed face in objects has an image, and not the old xbm images for that task. Also, ignore all files that end in .png, .xpm, or the face extension - consider them legitimate files for the arch directory. MSW 2002-02-25 socket/image.c: Change type of image data to be uint8 from char. Checksums were being incorrectly calculated when using the char type. MSW 2002-02-25 | |||
Show difference between Revision 1.1 and 1.2 | |||
Revision 1.1 | mwedel | 2001/12/31 02:36:04 | None |
This change lets the server have multiple image sets. The client can then request which image set to use, and the server will use that image set, falling back to other sets as necessary. I have tested this with CVS client, and works fine at least in terms of old functionality. = doc/Makefile.in: Add images file which describes image guideline. doc/Protocol: Various updates - some things missing, added other notes about facesets. doc/images: New file, describes guidelines for image sets, as well as some of the internals include/newserver.h: Update for multiple image set - redid most of the image definitions as they were out of date with only png being supported. include/sockproto.h: rebuilt lib/Makefile.in: remove crossfire.png, add crossfire.0, crossfire.0. Update build directions to use crossfire.0 instead of crossfire.png lib/adm/collect_images.pl: Modified to collect all the image sets, remove support for collect xpm and xbm images. lib/crossfire.0: new file, base images lib/crossfire.1: new file, alternate images lib/image_info: New file, describes image sets. lib/crossfire.png, lib/xpmtopix.pl.in: Removed - no longer needed. socket/Makefile.in: add image.c file. socket/image.c: Moved all image related data in this file - this includes loading the image files, as well as the protocol commands. socket/init.c: move read_client_images to image.c file. set ns->faceset and ns->facecache to 0. Move freeing of image data to image.c socket/request.c: fixed some indentation inconsistencies.add setup commands for faceset as facecache. Move SetFaceMode,SendFaceCmd,esrv_send_face to image.c file. MSW 2001-12-31 | |||
First version |