--- crossfire/common ---


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

Filename: time.c
Revision 1.16mwedel 2006/06/05 01:28:56 +15 -15
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.15 and 1.16
Revision 1.15mwedel 2006/05/18 00:27:43 +2 -2
This commit adds support for the map2 protocol command (10 layer map).
This changes how the data is stored and sent to the client. This also
implements the idea of client handling map animations, so adds some object
flags so that the server knows if it should let the client handle animations
or not. Support for the original map protocol command is removed.
---
aclocal.m4: rebuilt
configure.ac: Add checks for zlib.h, libz - not used right now, but will
probably be used in the future, so no reason to remove it.
common/loader.l: Add client_anim_sync, client_anim_random FLAGS.
common/map.c: Add add_face_layer() to set face for a layer. Redo/simplify
update_position to store faces away based on layering criteria.
common/time.c: Replace long pticks with a uint32, since size of a long will
vary, and we now send pticks to the client as a 32 bit value.
crossedit/CrEdit.c: Update the draw logic based on the fact there are more
layers now.
crossedit/Edit.c: Comment out some code that probably should be fixed.
Replace calls of SET_MAP_FACE with SET_MAP_FACE_OBJ
doc/Developers/protocol: Updated with map2, tick protocol additions.
Reorganize the parameters in the setup protocol command so they are now
listed in alphabetical order.
include/autoconf.h.in: Add HAVE_ZLIB_H define.
include/define.h: Update for the FLAG_CLIENT_ANIM values.
include/face.h: Remove MapLook structure - no longer used.
include/global.h: change extern type for pticks from long to uint32
include/map.h: Change MAP_LAYERS to 10. Add definitions for what each
map layer is. Remove GET/SET_MAP_FACE macro - no longer used,
GET/SET_MAP_FACE_OBJ replaces it. Add GET_MAP_FACE_OBJS which
returns pointer to all the object info for the space. Remove
faces from MapSpace structure.
include/newclient.h: Update with new defines used for map2 protocol
command.
include/newserver.h: Change type of faces in map_cell_struct to be
uint16 to be consistent. Change 'count' to 'darkness' to more
accurately describe what it represents. Add MAP2_COORD_OFFSET
define. Add Map2Cmd to MapMode enum. Add map_scroll_x/y
to socket structure so we send those as part of map2 command.
Add tick field to socket structure to know if we should send
tick data to the client.
server/login.c: Remove extern long pticks declaration - declared
in global.h - don't need to declare it again locally.
socket/info.c: Rewrite magic map code to use GET_MAP_FACE_OBJ
instead of GET_MAP_FACE macros.
socket/init.c: Initialize new fields in socket structure to 0.
socket/loop.c: If client wants tick data sent, send one each tick.
socket/request.c: Add setup responses for tick, map2 requests. Remove some
extra code in Map1a setup. Send error message to client if not using
at least Map1 protocol level. Modify map_newmap_cmd() to clear
scroll information when using Map2. Remove original (map0) protocol
logic. Update map_clearcell() to clear all 10 layers. Replace
MAX_LAYERS with MAP_LAYERS. Add add_head() to remove some of the
complication from update_space(). Add code in draw_client_map1()
to find which 3 layers to send to the client from the 10 we now have.
Add map2_add_ob(), map2_delete_layer(), check_space_for_heads(),
draw_client_map2() to handle map2 protocol. Add send_tick() -
sends tick to client, but also forces flush of data to reduce lag.
utils/config.guess.utils/config.sub,utils/ltmain.sh: rebuilt
MSW 2006-05-15
Show difference between Revision 1.14 and 1.15
Revision 1.14akirschbaum 2006/02/10 17:59:25 +2 -2
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.13 and 1.14
Revision 1.13akirschbaum 2005/12/05 17:34:03 +5 -5
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.12 and 1.13
Revision 1.12ryo_saeba 2005/07/15 08:51:49 +11 -11
Glue cleaning. New plugin function.
Show difference between Revision 1.11 and 1.12
Revision 1.11mwedel 2002/07/14 23:25:39 +3 -3
Update banner copyright with proper contact information.
MSW 2002-07-14
Show difference between Revision 1.10 and 1.11
Revision 1.10garbled 2001/12/19 15:06:59 +2 -2
Typo, noted my mids.
Show difference between Revision 1.9 and 1.10
Revision 1.9garbled 2001/12/19 15:03:44 +2 -2
Calculate the current month properly. Problem noted by mids. Thanks!
Show difference between Revision 1.8 and 1.9
Revision 1.8garbled 2001/12/18 02:58:03 +104 -1
Lots of changes here. Basically implement a night and day system, as
well as tracking of game time. A clockdata file is now created and
updated by the server to increment time. Time increases by 1 hour,
approximately every 2 minutes of real time. Right now this code has
virtually no effect, but as maps are updated with outdoor settings,
nightfall will occur automatically. The time command has been modified
to show the current game time, and the clock objects have been changed to
show the game time as well.
garbled 2001-12-18
Show difference between Revision 1.7 and 1.8
Revision 1.7avogl 2001/04/18 09:48:09 +7 -1
The delay-function 'select()' doesn't work on windows.
Hence, winservers are now put to rest with 'Sleep()'.
--AV
Show difference between Revision 1.6 and 1.7
Revision 1.6mwedel 2001/04/09 01:59:46 +1 -14
Main thing this commit does:
Undo MT's last commit, which should not have been checked it at this time.
As that did not fix any bugs, it should wait until after 1.0 (at least
one file also fails to compile)
Fix minor bug in server/player.c which prevent keyring weight from
getting updated when keys are automatically used out of the rings.
move the GETTIMEOFDAY macro to include/global.h so it doesn't have to
be done in both arch.c and time.c
remove some ^M characters from porting.c
MSW 2001-04-08
Show difference between Revision 1.5 and 1.6
Revision 1.5michtoen 2001/04/06 14:07:54 +3 -3
win32: change // to /* */
Show difference between Revision 1.4 and 1.5
Revision 1.4michtoen 2001/04/05 19:45:17 +6 -4
*** empty log message ***
Show difference between Revision 1.3 and 1.4
Revision 1.3cvs 2001/01/15 16:33:32 +1 -17
MSW 2000/01/15:
Various fixes for friendly object code:
common/button.c: Add missing call to remove_friendly_object
common/friend.c: Pretty much completely re-written. add_friendly_object now
checks to make sure the object being added isn't already on the list,
remove_friendly_object will remove objects whose tags don't match,
and added clean_friendly_list.
common/object.c: No reason to use the function pointer to
remove_friendly_object since that function is in the lib.
common/time.c: Make DEBUG_TIME always on (no longer compile time option).
other areas use the global var pticks, so if it was turned off, compile
would break anyways.
common/treasuer.c: No longer print debug messages on artifacts created.
Cluttered log file making it hard to see more important errors.
include/config.h: Remove DEBUG_TIME define.
include/libproto.h: Rebuilt for clean_friendly_list function.
server/main.c: rewrote do_specials to do things based on pticks variable.
This allows various specials to be spread out across multiple ticks
easier. Also, added clean_friendly_function to part of what this does.
server/skills.c: add missing call to remove_friendly_object. Also, removed
from #if 0 .. #else .. #endif code.
End of MSW 2000/01/15 checkin.
Show difference between Revision 1.2 and 1.3
Revision 1.2cvs 1999/07/13 01:02:42 +0 -0

Global commit for 0.95.4 - most files have no changes but just have
differing headers between my local RCS and the CVS versions and need to
get synced up.
Show difference between Revision 1.1 and 1.2
Revision 1.1uid200 1999/04/02 13:10:03 None
Initial revision
First version
Revision 1.1.1.1uid200 1999/04/02 13:10:03 +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 17:18