Commit Graph
73 Commits
Author SHA1 Message Date
ac-stef 8745d002f0 new commands to edit map config items
automapconfig
  Enables the "automatic embedded map config data" feature, which means
  with the next map save the map config file gets renamed and the map
  config data stored inside the map file.

mapsoundslotusage <map sound slot number>
  Returns a list of map entity indices which use a certain map sound slot.
  If the sound is unused, it returns an empty string.

deletemapsoundslot <map sound slot number> <"purge">
  Deletes an unused map sound slot. If "purge" is specified as second
  argument, it also deletes an used slot (including all map entities
  which use that sound). Also enables automapconfig.

editmapsoundslot <map sound slot number> <map sound path> <maxuses>
  Edits path/name and maxuses parameters of a mapsound slot. Only
  non-empty parameters actually change something. The command returns
  the resulting data of the map sound slot. If only the map sound slot
  number is specified, no changes are made, but the current data is
  returned. Therefore the command can be used to get and set parameters.
  If anything is changed, automapconfig is enabled.

mapmodelslotusage  <mapmodel slot number>
  Returns a list of map entity indices which use a certain mapmodel slot.
  If the mapmodel is unused, it returns an empty string.

deletemapmodelslot <mapmodel slot number> <"purge">
  Deletes an unused mapmodel slot. If "purge" is specified as second
  argument, it also deletes an used slot (including all map entities
  which use that mapmodel). Also enables automapconfig.

editmapmodelslot <mapmodel slot #> <radius> <height> <z-offset> 0 <path>
  Edits the parameters of a mapmodel slot. Only non-empty parameters
  actually change something. The command returns the resulting data of
  the mapmodel slot. If only the mapmodel slot number is specified, no
  changes are made, but the current data is returned. Therefore the
  command can be used to get and set parameters.
  examples:
    editmapmodelslot 33 "" "" -5
      sets the z-offset of slot #33 to -5 without affecting other params
    echo (editmapmodelslot 33)
      print the current parameters of mapmodel slot #33
      for example: 0 0 0 0 "makke/lightbulb"
  If anything is changed, automapconfig is enabled.

gettexturelist <includes> <excludes> <extensions>
  Returns a table of all texture files fitting a certain description.

  includes
    Optional list of path prefixes to include in the table.

  excludes
    Optional list of path prefixes to exclude from the table.

  extensions
    Optional list of filename extensions to include in the table.

  All files found under packages/textures are examined. By default, the
  command returns a list with two columns: path and filename. If "excludes"
  is exactly one path prefix to exclude, the table gets a third column
  with path names without that prefix. If "extensions" is exactly one
  extension which does not start with the character '.', the table gets
  an additional (third or fourth) column containing file names without
  that extension.

  examples:

    echo (gettexturelist)
      outputs two columns like "noctua/wall" "wall02.jpg"

    echo (gettexturelist "" "map_editor skymaps")
      same, but omits skymaps and special textures for the editor

    echo (gettexturelist makke)
      outputs only textures by makke and adds a third column
      like "makke/rattrap" "rb_box_03.jpg" "/rattrap"

    echo (gettexturelist "skymaps/" "" "_ft.jpg")
      outputs four columns like
        "skymaps/egypt" "egypt_ft.jpg" "egypt" "egypt"
        "skymaps/humus" "meadow_ft.jpg" "humus" "meadow"

textureslotusage  <texture slot number>
  Returns a list of mapmodels who use that texture as skin. If no mapmodel
  uses the texture, but world geometry does, a string of whitespace is
  returned. If the mapmodel is unused, an empty string is returned.

deletetextureslot <texture slot number> <"purge">
  Deletes an unused texture slot. If "purge" is specified as second
  argument, it also deletes an used slot. All mapmodels that use that
  texture as skin are changed to default skin. All world geometry, which
  uses the texture, is instead set to use slot #255. Slots below #5 always
  require "purge", no matter if they are in use (default slots).
  Also enables automapconfig.

edittextureslot <texture slot #> <scale> <path>
  Edits the parameters of a texture slot. Only non-empty parameters
  actually change something. The command returns the resulting data of
  the texture slot. If only the texture slot number is specified, no
  changes are made, but the current data is returned. Therefore the
  command can be used to get and set parameters.
  examples:
    edittextureslot 33 "" "arcitool/rohbaubims.jpg"
      sets texture name of slot #33
    echo (edittextureslot 33)
      print the current parameters of texture slot #33
      for example: 0 "zastrow/3wood_crate_10.jpg"
  If anything is changed, automapconfig is enabled.

deleteentity <entity index/number>
  Deletes a map entity. (Note: deleting an entity only marks it as unused.
  It will be completely removed after saving and loading the map.)

editentity <entity index/number> <x> <y> <z> <attr1> <attr2> <attr3> <attr4>
  Edits a map entity. Edits only parameters given a non-empty value.
  Returns the values of all attributes (type, x, y, z, attr1-attr4).

  examples:

    echo (editentity 33)
      prints all attributes of map entity number 33
      for example "light 174 172 12  20 255 200 200"

    editentity 33 "" 173
      changes the y-position of entity 33 to 173

rereadtexturelists
  Variable, which is set to "1" when a texture is downloaded. Used to
  trigger menu rebuilds.

rereadsoundlists
  Variable, which is set to "1" when a sound is downloaded. Used to
  trigger menu rebuilds.

DOCREF mapsoundslotusage deletemapsoundslot editmapsoundslot
DOCREF mapmodelslotusage deletemapmodelslot editmapmodelslot
DOCREF textureslotusage deletetextureslot edittextureslot
DOCREF gettexturelist deleteentity editentity
DOCREF automapconfig rereadtexturelists rereadsoundlists
2015-05-18 14:46:03 +02:00
ac-stef 786a6cdce1 filename filtering for media files
No more spaces in filenames. The only allowed chars are a-z, A-Z, 0-9 and
"-_.()".

An exception are texture filenames, which may also have a prefix command
like "<decal>" included.

Also fixed some memory leaks in media download.
2015-05-18 14:46:03 +02:00
ac-stef e318ecd68e integrated automatic embedded map config files
This patch enables an option to keep the map config embedded in the map
file - with autogenerated content. Any changes to map config data will be
written with the map. This includes data by loadnotexture, loadsky,
mapmodel, texture, fog, fogcolour, mapsound and shadowyaw. Once enabled,
all changes with those commands become persistent to the map.

New variables:

mapsoundchanged
  Set to "1" with every command that changes mapsound slots. Should be
  used to trigger a rebuild of mapsound menus.

New/changed commands:

mapsound
  Now returns the number of the created slot.

mapmodel
  Now returns the number of the created slot.

texture
  Now returns the number of the created slot.

loadsky
  Is now a builtin string variable (instead of a command), which means,
  that the current value can easily be retrieved or edited.
  The skymap name in the argument is now required to start with
  "textures/skymaps/" - but that part of the path can be omitted.
  examples:
    loadsky steini/steini2 (loads textures/skymaps/steini/steini2_*)
    loadsky textures/skymaps/steini/steini2 (same)
    loadsky ../foo/bar (loads textures/foo/bar_*)
    echo $loadsky

getnotexture
  Returns the current "notexture" path. (Set by loadnotexture)

dumpmapconfig (available for debug binaries only)
  Writes the current automatically generated map config to
  dumpmapconfig.txt.

DOCREF mapsoundchanged mapsound mapmodel texture loadsky getnotexture
2015-05-18 14:46:03 +02:00
ac-stef eb60302e67 cleanup
- fix possible crash in conc (but it's still an ugly hack)
- fix noob usage of strcmp
- flag some memory leaks (it would be nice, if the author(s) would clean
   up the mess himself)
- fix crash in substr
- whitespace cleanup

there are plenty more memory leaks in command.cpp - for example, every
goto in cubescript does not clean up anything
2014-05-14 22:54:37 +02:00
Lucas GAUTHERON 77399cf23f texture scale fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7539 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-08-28 13:40:44 +00:00
Lucas GAUTHERON 1fd084441a textureguides fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7502 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-06-27 22:15:04 +00:00
Bukz a03986df70 menu prep for translations/guidetoggle cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7436 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-27 22:52:33 +00:00
Bukz 810d14d258 temporary double jump fix/typo fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7393 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-23 12:54:58 +00:00
Lucas GAUTHERON ebcbbbc933 autodownload update
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7389 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-23 08:05:58 +00:00
Lucas GAUTHERON a7a1e46bcc merged branch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7382 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-22 19:49:21 +00:00
Bukz 14fc9c9bc3 guidetoggle updates
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7370 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-19 16:04:29 +00:00
Bukz bbdce85866 guidetoggle command
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7369 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-19 15:33:24 +00:00
RandumKiwi 5846656953 remove that annoying extra conoutf from botgames
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7331 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-09 22:53:26 +00:00
sireus b33116712c sane(r) command signatures (warning: huge commit)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6908 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-10-06 22:49:49 +00:00
aerkefiende 06f73f4627 Replaced Tabs with 4 spaces in every source file
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6561 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-07-31 15:44:57 +00:00
sireus a89b9f2dab pave the way for hi-res textures
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6416 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-10 20:03:06 +00:00
Lee Salzman c392b3d010 clean up messy anisotropy patch
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6017 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-01-17 19:27:32 +00:00
flowtron e349ee1303 binaries (linux64)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6016 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-01-17 18:59:22 +00:00
flowtron 2eb65ad9d6 anisotropy not ansiotropy typo fix in check_anisotropy
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6015 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-01-17 18:46:14 +00:00
flowtron a3960cb70b anisotropy support (for high-end machines) provided by RPG
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6014 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-01-17 18:44:30 +00:00
flowtron 65447c694c avoid message spam for unloaded preview images
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5362 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-13 18:46:26 +00:00
Rafael Barreto 3b4b2ba506 forget to remove this printf
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5345 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-11 20:49:17 +00:00
Rafael Barreto 862393f324 ty for the warning, WahnFred... the code was embarrassing wrong
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5344 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-11 20:33:11 +00:00
Rafael Barreto 361fd1e264 removing command
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5335 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-10 23:14:02 +00:00
flowtron 94dc526837 lots of whitespace
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5265 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-02 16:49:20 +00:00
Rafael Barreto 49faabc0ba removed more than should
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5263 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-02 00:16:32 +00:00
Rafael Barreto 3a2c5fac3d removing the conoutf/debug
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5262 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-02 00:13:47 +00:00
Rafael Barreto b61f2b69dc bright filter in blocking level (pre-testing)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5261 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-01 22:27:07 +00:00
flowtron 41c11a06f2 whitespace fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5236 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-25 21:30:11 +00:00
flowtron b940559da2 texreduce: new value -1 for 2x2 textures
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5234 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-25 20:34:02 +00:00
Rafael Barreto b18c292773 options
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5214 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-22 19:29:09 +00:00
Rafael Barreto 9ab57071ff brightskin filter
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5212 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-22 17:36:34 +00:00
Rafael Barreto 23d0376219 brightskin blocker fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5211 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-22 14:23:16 +00:00
Rafael Barreto 481dd508fe brightskin blocker... without Kirin's help this would not be possible
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5210 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-21 23:37:46 +00:00
Lee Salzman 5ddec43659 scope drawing fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4825 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-08 21:11:02 +00:00
Lee Salzman 0e52f84a70 removing some GL_QUADS usage
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4790 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-03-15 18:34:43 +00:00
Lee Salzman be94c703f2 setsize -> shrink
setsizenodelete -> setsize
deletecontentsa -> deletearrays
deletecontentsp -> deletecontents
vrealloc -> growbuf



git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4787 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-03-11 23:06:26 +00:00
Lee Salzman a971c0b5ab typo fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4786 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-03-09 07:44:33 +00:00
Lee Salzman 2cd9f5c9d0 force 32 bpp surfaces to 24 bpp if no alpha
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4781 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-02-06 02:53:44 +00:00
driAn e232a3f3ac dynamic rendering of utf8 characters such as umlauts by using ttf (wip)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4769 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-01-14 22:19:27 +00:00
Lee Salzman 9256ee374b support for loading from zip files
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4717 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-08 00:53:19 +00:00
Lee Salzman e725e5ed8c string function cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4714 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 22:44:32 +00:00
Lee Salzman 54cc44c3db revising pch setup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4690 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 06:42:37 +00:00
Lee Salzman 4bf52adcfd added texreduce to 1.0 branch
upped scopefov limit to 60


git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4296 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-03-25 15:18:57 +00:00
Lee Salzman 287f6ae331 added texreduce var
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4028 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-12-16 13:45:03 +00:00
Lee Salzman 5737bb7bc5 texture size rounding fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3652 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-19 18:42:44 +00:00
Lee Salzman 5db498098a texture size error fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3498 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-15 06:57:33 +00:00
Lee Salzman 95cad2c3d1 removed libGLU dependency
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3280 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-10-27 07:41:46 +00:00
Lee Salzman dd18a7d0dc stray comma cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2642 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-16 00:12:34 +00:00
Lee Salzman f4c4ff7556 sky clipping optimization
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2516 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-11 06:09:27 +00:00