--- crossfire/crossedit ---


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

Filename: CrEdit.c
Revision 1.11mwedel 2006/05/18 00:27:43 +10 -16
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.10 and 1.11
Revision 1.10ryo_saeba 2006/03/18 11:15:24 +2 -2
Use const when possible. Patch courtesy Stefan Huehner.
Show difference between Revision 1.9 and 1.10
Revision 1.9akirschbaum 2006/03/16 14:59:51 +3 -3
Apply patch #1439143 (code-cleanup: crossedit) by Stefan Huehner: Remove
unused code, add static/const where appropriate.
Show difference between Revision 1.8 and 1.9
Revision 1.8akirschbaum 2005/08/30 17:15:25 +33 -25
Add (slightly reformatted) patch #1276121 (Crossedit: handle big faces) by
Kevin Rudat:
crossedit/CrEdit.c: UpdatePosition(): Use new drawing subroutines.
crossedit/CrFace.c: DrawObject(): Use new drawing subroutine.
crossedit/CrList.c: Redisplay(): Use new drawing subroutine.
crossedit/CrUtil.c, crossedit/CrUtil.h: Remove FaceDraw(), add DrawFacePart()
and DrawPartObject().
crossedit/png.c: Upload the whole image, not just the top-left corner.
Show difference between Revision 1.7 and 1.8
Revision 1.7akirschbaum 2005/08/28 03:18:43 +6 -1
Add patch #1274385 by Kevin Rudat to make crossedit draw floors on tiles with
items.
crossedit/CrEdit.c: Add call to update_position() in UpdatePosition().
Show difference between Revision 1.6 and 1.7
Revision 1.6mwedel 2001/12/03 01:51:40 +8 -56
This checkin for the most part removes support for xpm and xbm graphics -
now the only image supported is the png.
common/arch.c: comment out printing on warning of object having no type -
getting 300 meaningless messages at startup is annoying.
common/image.c: Remove X11 color information from colorname array. Remove
processing of color_fg and color_bg information from face file - only
use color_fg if no magicmap information is available - foreground
and background infoformation was only needed for bitmap graphics.
common/loader.c, loader.l: Add elevation element, comment out some logging
messages that are excessive and only really relevant for people
who want to fix them (really should be in the collect script
anyways). Remove some unused code.
common/map.c: add outdoor field to map structure - add support for loading
and saving it.
crossedit/App.c,crossedit/CrUtil.c, crossedit/Defines.h, crossedit/crossedit.c
crossedit/xutil.c: Remove support for non png graphics.
crossedit/Attr.c: Add support for elevation variable, remove code for non
png graphics.
doc/map-technical: Add note about outdoor field.
include/face.h: remove fg, bg fields from face struecture.
include/global.h: Update colorname array definition.
include/loader.h: Add V_ELEVATION field.
include/map.h: Add outdoor field to map structure.
include/newserver.h: Update types so it only loads/knows about png information.
include/object.h: Add elevation field to object structure.
lib/Makefile.in: Remove support for building crossfire.xpm and crossfire.xbm
files.
lib/animations, lib/archetypes, lib/bmaps, lib/bmaps.paths, lib/crossfire.png,
lib/faces: Rebuilt. Main difference is a few sea types, and the fact
that it hadn't been collected for a while.
server/spell_effect.c: Modify dimension door so that it calls MapNewmapCmd
so that fog of war does not get confused. Also, removes call to
draw as functions further up will do that.
server/spell_util.c: Remove color information from attack information that
shuffle_attack uses.
socket/init.c, socket/request.c: Remove support for non png images.
MSW 2001-12-02
Show difference between Revision 1.5 and 1.6
Revision 1.5mwedel 2001/10/07 01:45:39 +32 -0

common/map.c: Add INS_ON_TOP flag to insert_ob_in_map calls to preserve
stacking order. Modify update_position to generate map spaces with
more proper order.
common/object.c: Modify insert_ob_in_map so that it preserves stacking
if INS_ON_TOP is set.
crossedit/CrEdit.c: Add missing code that would draw third face on a space.
include/object.h: Add INS_ON_TOP flag/define.
random_maps/exit.c: Modify code so that if the random maps leading to
a special map are reset, they will properly link in with an already loaded
final map (and update exit from final map back up) as needed. Also fix
bug in that if the final map has been reset, a new one will now be properly
loaded.
random_maps/random_map.c:Update minimum size to be 7 (up from 6) - fixes
bug which caused crashes when square_spiral maps of 6x6 would fail to
generate.
random_maps/random_map.h,random_maps/room_gen_onion.c: move OPT_values from
room_gen_onion to random_map.h since the square_spiral code uses them.
random_maps/square_spiral.c: Update call to map_gen_onion to use
OPT_.. values instead of constant integer.
random_maps/treasure.c: Add some casts to sprintf statements to eliminate
some compiler warnings.
server/main.c: Modify enter_exit code such that a random map has
reset, we generate a new random map. This can happen when the random_map
resets before the map that leads to them resets.
MSW 2001-10-06
Show difference between Revision 1.4 and 1.5
Revision 1.4mwedel 2001/07/13 23:05:28 +34 -34
crossedit/Attr.c: Rename Layout to AppLayout so other files can use it.
crossedit/CrEdit.c: Modified to use new map header. Modified drawing
routines, as face values could be null
crossedit/Edit.c: Move many functions from common/map.c that are only
used here and thus don't need to be in common/map.c. Modify to use
new map structure.
crossedit/Makefile.in: Change to use cproto to make proto.h file.
crossedit/png.c: change user_read_data to be static so proto doesn't pick
it up.
MSW 2001-07-13
Show difference between Revision 1.3 and 1.4
Revision 1.3mwedel 2001/06/04 01:41:02 +20 -20
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.2 and 1.3
Revision 1.2cvs 2000/12/04 01:19:56 +8 -7
MSW 2000/12/3:
Misc changes. Main one is adding PNG support to the editor.
TODO: Remove outdated things to do (like partial resistance code)
configure, configure.in, include/autoconf.h.in: Add check for libpng.
include/global.h: Remove displaymodes - moved to crossedit/Defines.h
crossedit/App.c, crossedit/App.h crossedit/CrEdit.c crossedit/CrFace.c
crossedit/CrList.c crossedit/CrUtil.c crossedit/Edit.c crossedit/crossedit.c
crossedit/xutil.c, crossedit/png.c (new file): Add support for png display
in crossedit.
crossedit/Makefile.in: Add png.c file.
server/c_misc.c: Change who command to only display real players, and not
players in process of connecting/unconnecting. Also, remove code to display
old sockets, since those are not supported anymore.
Show difference between Revision 1.1 and 1.2
Revision 1.1uid200 1999/04/02 13:10:10 None
Initial revision
First version
Revision 1.1.1.1uid200 1999/04/02 13:10:10 +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:49