--- crossfire/include ---


Protocol:pserver User:anonymous
Machine:crossfire.cvs.sourceforge.net CVSROOT:/cvsroot/crossfire

Filename: sockproto.h
Revision 1.28mwedel 2006/06/05 01:28:56 +6 -4
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.27 and 1.28
Revision 1.27ryo_saeba 2006/05/05 04:41:15 +8 -10
Second part of patch #1453869 courtesy Stefan Huehner (shuehner)
Show difference between Revision 1.26 and 1.27
Revision 1.26akirschbaum 2006/03/18 19:51:46 +4 -5
Apply patch by Stefan Huehner: add const where appropriate.
Show difference between Revision 1.25 and 1.26
Revision 1.25ryo_saeba 2006/03/18 09:05:32 +39 -40
Massive cleaning of code. Shouldn't be any functional change.
Show difference between Revision 1.24 and 1.25
Revision 1.24akirschbaum 2006/02/10 17:59:26 +5 -6
Apply slightly modified patch #1428309 (code-cleanup: const, static) by
Stefan Huehner: add const/static to functions/variables. Remove some type
casts.
Show difference between Revision 1.23 and 1.24
Revision 1.23cavesomething 2006/01/09 13:35:12 +4 -0
spell listing support
Show difference between Revision 1.22 and 1.23
Revision 1.22akirschbaum 2005/12/07 12:25:54 +1 -1
Apply modified patch #1293774 (Kick banned hosts at once) by Thomas Equeter:
disconnect new connection for banned host right after connecting. Also add
support for user name in ban files.
Show difference between Revision 1.21 and 1.22
Revision 1.21tchize 2005/05/21 12:34:42 +1 -1

Added support for readable subtypes in sign managements.
Added some documentation on readable subtypes in the form
Now signs should show nice on new clients (if you except my awful drawings)
Show difference between Revision 1.20 and 1.21
Revision 1.20tchize 2005/05/06 16:10:16 +3 -0

added a new command to identify the type of text send to client.
media tags can be included inside them. Those text types include
scrolls, books, message of the day, signs, aso.
See protocol doc for details
Show difference between Revision 1.19 and 1.20
Revision 1.19ryo_saeba 2005/04/30 10:39:33 +5 -5
Use const char* instead of char* when possible
Show difference between Revision 1.18 and 1.19
Revision 1.18ryo_saeba 2003/12/14 10:28:47 +2 -2
Compilation warning cleaning
Show difference between Revision 1.17 and 1.18
Revision 1.17mwedel 2003/09/13 00:01:34 +3 -1
Updated code for skill + spell code. skills and spells are now objects.
tuning these now means changing the archetypes. New spells can now
be added just by making a new archetype. Lots of code cleanup
also done.
MSW 2003-09-12
Show difference between Revision 1.16 and 1.17
Revision 1.16tchize 2003/06/19 05:59:28 +3 -1

Added support for smoothing to the client.
This will allow (i hope) better graphical results while using very
little bandwidth overhead.
Changes done follows:
- Added protocol command MapExtendedInfos and smooth commands to server
- Added a SetUp paramater in protocol for activating smoothing
(disabled by default) or more general Extended map infos
- Added file lib/smooth a text file containing some smoothing info a
client might ask the server about.
- Changed loader.l to be able to mark an object as 'smoothed' in
archetypes (the smoothlevel parameter) and rebuild loader.c
accordingly
- Changed lib/Makefile.am to install lib/smooth file in shared folder
- Rebuild the Makefiles.am and the Configure script (using autogen.sh)

To be able to smooth, A client commit (the common part+ the gtk part)
will follow and an archetypes commit will also follow.

I will also detail changes to the protocol within a few days
Server has been tested with older client to check backward compatibility
Show difference between Revision 1.15 and 1.16
Revision 1.15mwedel 2003/01/08 02:39:18 +0 -1
Bulk of this commit is to improve code for tiled maps - replace
wall/blocks_magic/blocks_cleric, etc with get_map_flags which
also does map tiling translation as needed. This should fix a lot
of the bugs related to map tiling (there are sure to be more out
there - all the get_map_ob still need to be checked).
Other changes - many spells stopped progressing on spaces that
blocked view - that is now removed - didn't make a lot of sense.
Other fixes - some cleric spells (eg, word of recall) checked to
see if magic was prohibited, didn't check to see if cleric
was prohibited.
Clean up some bugs in the lighting code that would cause erroneous
results. Also, allow players to see immediately around them on
outdoor maps no matter how dark the map really is - behaviour
on indoor maps is the same.
Lots of code reformatted, and lots of obsoleted/dead code removed.
Add max range to dimension door.
Fix magic map - got broken when the layer stuff was redone - was
not showing proper colors. IT also works sensibly on tiled maps
now - rather than display based on the map, it gives the player a
50x50 area centered on where the player is.
Change fire_bow - move special player fire modes into own function -
makes code much cleaner.
Hopefully this fixes more bugs than it introduces.
common/los.c, common/map.c, common/object.c, crossedit/Edit.c,
include/libproto.h, include/sockproto.h, include/map.h,
include/spellist.h, include/sproto.h, random_maps/treasure.c,
random_maps/wall.c, server/attack.c, server/c_misc.c,
server/c_wiz.c, server/disease.c, server/main.c, server/monster.c,
server/pets.c, server/player.c, server/rune.c, server/shop.c,
server/skill_util.c, server/skills.c, server/spell_effect.c,
server/spell_util.c, server/time.c, socket/info.c: See note above
server/apply.c: Limit number of times weapon can be enchanted so
that it won't overflow item_power. Modify enchant armor
to enchant as normal armor is enchanted, also only allows one
item to be enchanted.
MSW 2002-01-07
Show difference between Revision 1.14 and 1.15
Revision 1.14mwedel 2002/05/18 22:55:48 +0 -1
The bulk of this commit is to modify the server to only send the lower
rightmost part of multipart archetypes that use the same head. This allows
support of big images in the client.

common/arch.c: Modify first_arch_pass to figure out the tail_x/y values for
multipart archs. Rename the prev variable to head, as that it really what
it is. Remove quick_pos info.
common/object.c: remove quick_pos info from object.
doc/Developers/images: Add notes about using merged images.
doc/Developers/protocol: Add information about the map1a command, which
is used to for big image support. Remove map2 documentation.
include/map.h: Add MAP_LAYERS define instead of using hardcoded value of 3.
include/newserver.h: Change the MapCell to use MAP_LAYERS - saves
considerable memory. Add defines for MAX_CLIENT_ map sizes.
Remove map1cmd, map2cmd elements from socket structure - instead use enumeration
of mapmode - only one map type will be used at any time by the client, so
no reason to have individual elements - it also makes it easier to add new
mapmode commands.
include/object.h: remove quick_pos, update_tag from object structure.
Add tail_x, tail_y values to archetype structure.
include/player.h: Remove some now unused values from the player structure
(drawn, floor, floor2, darkmask). These have been superseded by the
map cells in the socket structure for quite a while.
include/sockproto.h: rebuilt
server/player.c: Remove code that initialized the drawn values in the player
structure since they no longer exist.
socket/init.c: Replace map1cmd, map2cmd elements in socket structure with
mapmode element. Modify init_ericserver so that it properly passes an
int when setting the SO_REUSERADDR field.
socket/request.c: Modify code in SetUp function to use the new mapmode
enumeration in the socket structure. Add support for map1acmd setup
option. Throughout map code, replace MAXMAPCELLFACES with MAP_LAYERS.
modify map_clearcell to take options for values to clear the cell to.
Add have_head, check_head, and update_space commands - used with the
map1 command to store and find head information.
draw_client_map1 modified to support map1a extensions, as well as added
logic for checking for heads in blocked and out of viewable map spaces.
Some of the code is simplified by using the update_space function, since
the logic for processing each layer was otherwise the same. remove
draw_client_map2 function. esrv_map_scroll has same logic - some
variables and code formatting changes.
MSW 2002-05-18
Show difference between Revision 1.13 and 1.14
Revision 1.13mwedel 2002/03/26 01:18:57 +4 -1
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.12 and 1.13
Revision 1.12mwedel 2001/12/31 02:35:48 +10 -9
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
Show difference between Revision 1.11 and 1.12
Revision 1.11michtoen 2001/12/03 21:49:18 +1 -0
mapstats cmd for extended clients.
Add a cmd which sends mapstats for clients.
This use not the script events. Script events should
used for special scripted events.
Show difference between Revision 1.10 and 1.11
Revision 1.10gros 2001/11/11 03:39:53 +1 -0
Some bugfixes, new timer system, support for custom plugins commands, new plugin hooks - Gros 11/11/01
Show difference between Revision 1.9 and 1.10
Revision 1.9michtoen 2001/11/04 14:22:55 +1 -0
One Arch/one pic patch.

I use a modified map1cmd, called map2cmd
for it.

This is a first tryout implementation.
The code can more then only submit offset data
of multi arch, its also possible to include animation
tags for the faces - we have now more free flags.

The code is NOT optimized. Iam still unsure , what
the best way is to send all this data. Sort & parsing
cost time. At this stage, ill quick parse is by server,
use slightly more bandwitch and let do the client more
work. But thats perhaps not the best way.

But this code will allow to install the arches for this
one arch/one pic.

MT
Show difference between Revision 1.8 and 1.9
Revision 1.8michtoen 2001/10/29 18:49:02 +2 -2
really SOME fixes - most casting
Show difference between Revision 1.7 and 1.8
Revision 1.7garbled 2001/09/27 14:37:39 +3 -0
Add a new command category called communications commands. Place tell,
shout and say in here. Also create emotion functions. These functions
have no real effect on the game, but make communications between players
more colorful and fun. They are mostly fluff. Included with this patch
are two new convenience functions, new_info_map_except, and
new_info_map_except2, which allow the programmer to write to an entire
map, except for certain individuals.

Tested by myself, mids, and gros, with thanks to them for fixing
something I didn't catch.

garbled 2001-09-27
Show difference between Revision 1.6 and 1.7
Revision 1.6mwedel 2001/08/05 00:07:20 +82 -85
common/map.c: modify link_multipart_objects to preserve name and title of
head when making the more parts. modify update_position so that it should
never show an invisible face to the player.
common/object.c: fix check_walk_on so that spells will now properly get
affected by spinners and directories.
include/sockproto.h: Rebuilt to include MapNewmapCmd
server/hiscore.c: Fix crash if player savebeds map on map which does not
have a name. Use the path instead.
server/move.c: modify teleporter function to send MapNewmapCmd to client
if player got teleported. Needed for fog of war code.
server/time.c: modify move_teleporter so that it will not teleport walls.
socket/Makefile.in: Modified to use cproto to generate proto files.
MSW 2001-08-04
Show difference between Revision 1.5 and 1.6
Revision 1.5mwedel 2001/06/04 01:41:02 +2 -1
Checkin of code that supports larger map sizes (configurable in
config.h).
common/los.c: update los code since it only handled 11x11 maps. Now
uses formulatic approach so any map size should be supported. This
does result in a few more spaces getting blocked around corners,
but it doesn't seem that bad - certainly not compared to the ability
to have larger viewable maps.
common/map.c, crossedit/CrEdit.c, crossedit/Edit.c, include/global.h,
include/map.h,random_maps/monster.c,random_maps/special.c,
random_maps/standalone.c, server/apply.c,server/c_misc.c,
server/spell_effect.c,socket/info.c:
change mapx,mapy to what they really point to,
as it prevented using those as variable/structure element names.
common/object.c: update_position - if faces for different layers are
duplicate, set the duplicates to be blank to increase client
update efficiency.
doc/Protocol: Add map1 command description, update setup command to
describe setting of mapsize.
include/config.h: add MAP_CLIENT_X/Y to set maximum map size we can
send to the client.
include/newserver.h: add mapx, mapy values to socket structure
include/player.h: Use MAP_CLIENT_X/Y for sizing arrays that hold
map related information in player structure.
server/player.c: As per player.h above, use appropriate sizing when
initializing player stucture.
server/shop.c: Update mapx,mapy like above, but re-do shop listings code as
it was doing a lot more work than necessarily (I think some changes
got put in for sorting, and the old object manipulation was never
removed when that got done)
socket/init.c: set default client map size to 11x11 in the socket.
socket/item.c: LookAt - change checks for position checking (such that
you can only look at things in bounds) use max viewable map size.
socket/request.c: Make setup commands a little more forgiving if there are
extra spaces. Add 'mapsize' command to setup command. Update
old map sending code to use socket map sizes (to support even
smaller than normal maps, or 13x13 or 15x15 maps). add draw_client_map1
command which implements the map1 protocol command.
MSW 2001-06-03
Show difference between Revision 1.4 and 1.5
Revision 1.4mwedel 2001/05/09 01:58:12 +4 -4
Various improvements to make finding memory leaks easier.
common/anim.c: Add free_all_anim function
common/arch.c: Modify free_all_arch to free more data
common/init.c: If running under MEMORY_DEBUG, don't pre-allocate objects.
common/map.c: Add free_all_maps functiion.
common/object.c: Modify object allocations if using MEMORY_DEBUG to only
malloc one object at a time, and not pre-allocate objects.
common/readable.c: Fix memory leak.
common/shstr.c: Include autoconf.h so it can pull in dmalloc.h file.
include/config.h: Remove notes of what was removed a long time ago.
Add MEMORY_DEBUG option.
include/libproto.h, include/sockproto.h, include/sproto.h: automatic rebuild
server/c_misc.c: Fix 'malloc info command so it reports right memory total
for maps. Add command_style_map_info which sums up memory used by
style maps.
server/commands.c: Add style_info wiz command which dumps memory usage
for style maps.
server/init.c: Have sighup handler call cleanup function.
server/main.c: Fix clean_tmp_files which could result in crash if one
of the maps in memory has 0 reset time. Modify cleanup function
to free more data.
server/player.c: op_on_battleground: Fix compile warning about unuused variable.
socket/init.c: Change name of free_all_ericserver to free_all_newserver,
have it free all face data.
MSW 2001-05-08
Show difference between Revision 1.3 and 1.4
Revision 1.3michtoen 2001/04/06 22:57:14 +2 -1
setup cmd: include proto for SetUp() direct
Show difference between Revision 1.2 and 1.3
Revision 1.2cvs 2000/11/14 01:35:05 +3 -1
metaserver update:
common/init.c: Add meta_ fields to settings structure initialization.
include/global.h: Add meta_ fields to settings structure.
include/sockproto.h: Updated for new meta_ functions.
lib/Makefile.in: Have it install settings file.
lib/settings: Default settings file with some metaserver default value.s
server/init.c: Add load_settings file. Add call to metaserver_init.
server/main.c: Add call to metaserver_update in do_specials.
socket/Makefile.in: Add metaserver.c to list of files.
socket/metaserver.c: File that deals with metaserver related data.
socket/item.c: Remove some unused variables. Unrelated to metaserver changes.
socket/loop.c: Add calls to metaserver_update in block_until_new)connection. Change
function so that if there are no active players, it still timeouts and
does metaserver update. Basically changed to do it the way the
WATCHDOG code did it.
End of metaserver update. MSW 2000-11-13
Show difference between Revision 1.1 and 1.2
Revision 1.1uid200 1999/04/02 13:10:04 None
Initial revision
First version
Revision 1.1.1.1uid200 1999/04/02 13:10:04 +0 -0
First CVS revsion: crossfire-0.95.3
Show difference between Revision 1.1 and 1.1.1.1


File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:28