Protocol: | pserver | User: | anonymous |
Machine: | crossfire.cvs.sourceforge.net | CVSROOT: | /cvsroot/crossfire |
Filename: random_map.c | |||
Revision 1.42 | ryo_saeba | 2006/06/03 16:56:27 | +6 -1 |
Implement feature request #815622 | |||
Show difference between Revision 1.41 and 1.42 | |||
Revision 1.41 | qal21 | 2006/02/20 17:33:28 | +23 -9 |
Cause the random map generator to skip certain elements if the style is set to "none". | |||
Show difference between Revision 1.40 and 1.41 | |||
Revision 1.40 | ryo_saeba | 2005/10/29 04:34:02 | +2 -2 |
Win32 compilation fix. Plugin fix. | |||
Show difference between Revision 1.39 and 1.40 | |||
Revision 1.39 | cavesomething | 2005/08/11 10:42:35 | +4 -1 |
Make random maps take the region of the map creates them. | |||
Show difference between Revision 1.38 and 1.39 | |||
Revision 1.38 | mwedel | 2005/04/14 01:57:01 | +19 -3 |
Random map code improvements - add support for subdirectories in the style maps for random maps. Add difficulty_increase parameter for random maps to control how fast they get harder. doc/Developers/random-maps: Add notes about difficulty_increase parameter. random_maps/Makefile.am: Update proto directive to use cproto, not cextract. random_maps/random_map.c: Update to use difficulty_increase when figuring difficulty of maps. Add code to save it in list of parameters. random_maps/random_map.h: Add difficulty_increase field to structure. random_maps/reader.l, reader.c: Add code to find difficulty_increase parameter. random_maps/rproto.h: rebuilt. random_maps/special.c: Pass in difficulty increase to write_parameters_to_string() random_maps/style.c: Remove old scandir - replaced by our own load_dir() - necessary because we need to check type of files, which scandir doesn't easily let us do. Since it is now our own routine, just return array of file names instead of dirent structures. MSW 2005-04-13 | |||
Show difference between Revision 1.37 and 1.38 | |||
Revision 1.37 | mwedel | 2004/12/28 19:08:49 | +2 -3 |
Applied patch 1001079 - make alchemy books say what skill & equipment is needed - by Kevin Rudat. common/readable.c: Update code that generates book title, contents to denote what skill and equipment is needed. random_maps/{random_map.c, random_map.h, reader.l, reader.c, standalone.c}, server/main.c: Remove generate_treasure_now as an option for random maps - none are using delayed treasure, and IMO, if someone did, it would horribly break things, so it should never be used - given that, no reason to leave the code there. server/main.c: Add additional debugging for process events on removed objects - trying to track down occasional disease crash. server/time.c: Fix crash in move_player_mover() - it was never map tile aware, but even more so, appears to have always been broken if the player move tried to push the player off the edge of a map. Check for out of map condition, as well as make it map tile aware. MSW 2004-12-28 | |||
Show difference between Revision 1.36 and 1.37 | |||
Revision 1.36 | temitchell | 2004/08/07 18:24:13 | +13 -2 |
added fix for random maps with single arch walls, added level indicator on random map signs added new parameter 'exit_on_final_map'- see documentation addresses patches 983780 and 983716 | |||
Show difference between Revision 1.35 and 1.36 | |||
Revision 1.35 | mwedel | 2003/09/26 00:44:43 | +34 -32 |
random_maps/random_map.c: Don't ever make rogue maps symmetric - creates unconnected maps. Clean up layoutgen() to not have a bunch of duplicated code. MSW 2003-09-25 | |||
Show difference between Revision 1.34 and 1.35 | |||
Revision 1.34 | mwedel | 2003/03/08 18:18:41 | +10 -10 |
More fixes for random map sizes - move the check for minimum size up higher in the code (before expand2x and symmetry are checked). At another check after size adjustments for symmetry and expand2x are done to make sure size meets minimum values - if not, reset them. Some layouts don't work right if map size is too small. MSW 2003-03-08 | |||
Show difference between Revision 1.33 and 1.34 | |||
Revision 1.33 | mwedel | 2003/03/07 01:33:13 | +4 -10 |
Various bug fixes. crossedit/Attr.c: Minor cleanup to eliminate some compile time warnings. plugin/plugin_python.c: Remove some unused variables, thus fixing up some compiler warnings. random_maps/random_map.c, random_maps/random_map.h, random_maps/special.c: Add MIN_RANDOM_MAP_SIZE values instead of hardcode constants. server/monster.c: Fix communicate - odd bug can be map gets swapped out just after player is transferred to another map, causing crashes as map that was originally spoken on is no longer in memory. server/rune.c: add missing free_object call when erasing runes. server/skills.c: Change write_on_item to determine type of writing based on content of mesage, or lack thereof, and not the marked object. Fix problem of buf not being initalized. MSW 2003-03-06 | |||
Show difference between Revision 1.32 and 1.33 | |||
Revision 1.32 | mwedel | 2003/03/03 02:09:23 | +5 -3 |
Go back to old code that adds 1 to the random seed - this is necessary because this data is used to make the next level, and if we constantly use the same seed, the levels look pretty similar. MSW 2003-03-01 | |||
Show difference between Revision 1.31 and 1.32 | |||
Revision 1.31 | mwedel | 2003/03/02 23:13:08 | +105 -101 |
Various bug fixes. Makefile.am, Makefile.in: Put crossedit as the last directory, so any build errors for crossedit doesn't effect anything else. README: Update ftp site listing. TODO: More things aded. aclocal.m4, configure: Add missing / when checking in /usr/local for python headers. common/map.c: Add some debugging in free_all_objects that checks to make sure there are not objects remaining that belong to the map just freed - only active if MANY_CORES is set. random_maps/random_map.c: Increase minimum random map size to 10x10 - this is need for square spirals to work properly I think. server/spell_effect.c: Have perceive self tell dragon players what they are currently focused on. Fix town portal to remove force objects from players if destination is no longer available. server/swap.c: Reset maps reset_time when loading them in in read_map_log() - this is only used if recycle temp maps is on. Also, do sanity checking on reset_time value - bogus values were observed on metalforge. socket/request.c: Update map timeout in draw_client_map() - in this way, we don't swap out a map within a players view only to swap it back in. MSW 2003-03-01 | |||
Show difference between Revision 1.30 and 1.31 | |||
Revision 1.30 | mwedel | 2003/02/20 21:55:38 | +2 -2 |
Fix setting of message - turns out the map->msg structure is actually strdup'd data, while ob->msg is shared string - new code in random_map.c was doing the later, causing problems when the code when to free it. MSW 2003-02-20 | |||
Show difference between Revision 1.29 and 1.30 | |||
Revision 1.29 | mwedel | 2003/02/16 03:03:31 | +51 -48 |
random_map/random_map.c: Include parameters used to make map in msg of map - this can hopefully be used to debug what is really happening when bad maps are made. MSW 2003-02-17 | |||
Show difference between Revision 1.28 and 1.29 | |||
Revision 1.28 | mwedel | 2001/10/07 01:45:40 | +6 -5 |
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.27 and 1.28 | |||
Revision 1.27 | mardahl | 2001/05/15 12:56:31 | +3 -3 |
Fix to make snake.c not crash the server when the requested random map is less than 8 in size. --PeterM 5/15/2001 | |||
Show difference between Revision 1.26 and 1.27 | |||
Revision 1.26 | mardahl | 2001/05/15 04:10:59 | +10 -7 |
Improvements to the "roomify" function, so that doors dont end up in places like this: ####D#### # # --PeterM 5/15/2001 | |||
Show difference between Revision 1.25 and 1.26 | |||
Revision 1.25 | mardahl | 2001/05/15 01:50:07 | +6 -1 |
Make it so that descendents of an expand2x map are also expand2x. --PeterM 5/14/2001 | |||
Show difference between Revision 1.24 and 1.25 | |||
Revision 1.24 | mardahl | 2001/05/14 23:30:04 | +11 -6 |
Activated BehTong's expand2x code for random maps. Option "expand2x 1" in the parameter file turns it on. random_map.c random_map.h reader.c reader.l --PeterM 5/14/2001 | |||
Show difference between Revision 1.23 and 1.24 | |||
Revision 1.23 | mwedel | 2001/05/07 02:29:15 | +4 -1 |
Fix a few memory leaks. MSW 2001-05-06 | |||
Show difference between Revision 1.22 and 1.23 | |||
Revision 1.22 | mardahl | 2001/05/04 18:56:36 | +9 -2 |
Fix: room_gen_spiral.c: remove dangling doors here also. Inactive changes: random_map.c rproto.h test.c added test code only. it is commented out. | |||
Show difference between Revision 1.21 and 1.22 | |||
Revision 1.21 | mardahl | 2001/05/04 17:10:04 | +3 -3 |
PeterM: FIX: dangling doors in rogue_layout CLEANUP: don't need RP for maze_gen (touches maze_gen.c, maze_gen.h random_map.c, rproto.h ADDED BUT NOT ACTIVATED: code from H. S. Teoh to 2x size corridors in generic layouts. | |||
Show difference between Revision 1.20 and 1.21 | |||
Revision 1.20 | mardahl | 2001/05/03 13:29:35 | +9 -1 |
Memory leak pointed out by BehTong fixed. Something like 1100 random maps per 1M of wasted core. With newly improved server stability perhaps this is now an issue. PeterM | |||
Show difference between Revision 1.19 and 1.20 | |||
Revision 1.19 | mardahl | 2001/04/26 00:37:10 | +13 -12 |
Some types of random maps with multiple possible exits down might have blocked exits. | |||
Show difference between Revision 1.18 and 1.19 | |||
Revision 1.18 | mardahl | 2001/04/23 03:01:19 | +2 -1 |
Several changes: 1) Chests will no longer need keys to open under any circumstances. a) A side effect of this is that people won't be able to avoid traps in containers anymore. 2) Chests won't be placed under walls. 3) Nothing will be placed on exits anymore. | |||
Show difference between Revision 1.17 and 1.18 | |||
Revision 1.17 | peterm | 2001/02/11 02:17:06 | +16 -1 |
Added a square spiral type of layout. | |||
Show difference between Revision 1.16 and 1.17 | |||
Revision 1.16 | peterm | 2001/02/08 23:00:48 | +13 -1 |
Added a snake-like layout. With no symmetry, it's just a progression back-and-forth. | |||
Show difference between Revision 1.15 and 1.16 | |||
Revision 1.15 | cvs | 2001/01/31 01:54:51 | +2 -24 |
MSW 2001/01/30: Complete rewrite of the exit handling code. Hopefully as an effect, this will fix the player appearing in the middle of the oceans. I think the code should also work better in many other areas. Main enhancements is a 3x3 area for pets to follow player to new map, as well as golems now following players to the new maps. include/sproto.h, random_maps/rproto.h - rebuilt. random_maps/random_map.c: Change generate_random_map to take a structure with the random map paremeters. random_maps/reader.l, reader.c: Add set_random_map_variable function that reads the map parameters from a char buffer. Also, remove some leftover comments that were from the common/loader.l file. random_maps/rogue_layout.c: Change some functions to be static so make proto doesn't collect them. random_maps/standalone.c: Add opening of parms file into main function since it ws removed from the random_map.c file. server/apply.c: Don't display the message of random maps to the players as they enter them, as this message is random map parameters, and not a real message. server/login.c: #if 0 out using of the player loading element in the structure. this isn't used right now. server/main.c: Bulk of the changes. main changes are to break apart the old enter_exit function into smaller functions that more logically do the needed function (random maps, unique maps, and transferring the player to the new map). random map code now passes the parameters via structure instead of file in /tmp. Code is much more understandable now and hopefully bugfree. server/pets.c: minor changes/bugfixes. Search full SIZEOFFREE array, use real owner variable when print out messages. server/player.c: Remove usage of the loading variable in the player structure. End of MSW 2001/01/30 checking. | |||
Show difference between Revision 1.14 and 1.15 | |||
Revision 1.14 | peterm | 2001/01/16 02:20:53 | +19 -6 |
Installed nethack-style maps | |||
Show difference between Revision 1.13 and 1.14 | |||
Revision 1.13 | peterm | 2001/01/16 01:46:04 | +6 -1 |
New layout style "nethack" or "rogue" like. | |||
Show difference between Revision 1.12 and 1.13 | |||
Revision 1.12 | peterm | 2001/01/12 02:25:28 | +2 -1 |
Fixed a lack of "break" in a switch statement. | |||
Show difference between Revision 1.11 and 1.12 | |||
Revision 1.11 | peterm | 2000/12/20 12:32:55 | +3 -3 |
*** empty log message *** | |||
Show difference between Revision 1.10 and 1.11 | |||
Revision 1.10 | peterm | 2000/12/18 00:15:05 | +6 -6 |
Fixes for random maps: 1) Spirals won't dump you into walls anymore 2) endless loop bug fixed PeterM | |||
Show difference between Revision 1.9 and 1.10 | |||
Revision 1.9 | peterm | 2000/12/15 04:25:13 | +2 -2 |
A few little refinements. | |||
Show difference between Revision 1.8 and 1.9 | |||
Revision 1.8 | peterm | 2000/12/15 04:06:06 | +25 -11 |
Implemented a new sort of random map: the spiral. | |||
Show difference between Revision 1.7 and 1.8 | |||
Revision 1.7 | peterm | 2000/12/14 21:09:19 | +237 -293 |
PeterM: Fixed up random map code. Used a lot of global variables for stuff. Always meant to fix it and just got 'round to it. | |||
Show difference between Revision 1.6 and 1.7 | |||
Revision 1.6 | cvs | 2000/06/18 20:34:31 | +179 -4 |
Lots of work done on random maps. decor.c: tiling option added. (Fill the whole map). monster.c: copy inventory exit.c: preserved connectedness random_map.c: new function for wrting map params floor.c: fix a crashing bug if there's no floor rproto.h: prototypes treasure.c: fix a crashing bug with treasurestyle map special.c: added a new type of special, an exit to a goldroom. --PeterM | |||
Show difference between Revision 1.5 and 1.6 | |||
Revision 1.5 | cvs | 2000/06/07 19:34:33 | +3 -3 |
Fixed a problem in monster.c which would lead to crashes due to multipart objects not being done right. | |||
Show difference between Revision 1.4 and 1.5 | |||
Revision 1.4 | cvs | 2000/06/07 12:48:18 | +2 -1 |
Added an option to do wall-only onions. | |||
Show difference between Revision 1.3 and 1.4 | |||
Revision 1.3 | cvs | 2000/06/06 02:09:21 | +15 -15 |
Minor mods to random map generator code: increases in buffer size, style == none allowed for wall.c. | |||
Show difference between Revision 1.2 and 1.3 | |||
Revision 1.2 | cvs | 1999/07/13 01:03:03 | +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.1 | uid200 | 1999/04/02 13:10:03 | None |
Initial revision | |||
First version | |||
Revision 1.1.1.1 | uid200 | 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 |