Commit Graph
21 Commits
Author SHA1 Message Date
ac-stef 524988feaa filter unrenderable chars from console input
filter all chars that have no entry in the current font
2017-06-25 18:17:46 +02:00
ac-stef 5e20a2343b add animated inlined images for console text
Images are stored in packages/misc/igraph/*.png and loaded during game
start. Filenames consist of the image shorthand (mnemonic) and optional
frame times, separated by "_". Keep in mind, media file names may only
contain letters, digits and "_-.()".

All texts displayed in the game console are scanned for mnemonics prefixed
with ":". All found matches are replaced by the image.

The images are displayed as squares with width and height the same as the
regular font height. To create animations, put several square images side
by side into the file. For example, a 128x32 image is interpreted as four
frames. Frame duration is encoded in the filename, so, for example the file
"nop_1000_200_100.png" shows the first frame for 1000 milliseconds, the
second frame for 200 msec and the third (as the rest) for 100 msec.

Igraphs "1" to "9" are hardcoded and can be manually encoded in menu texts.
Use the new escape code "\i" plus the number of the image: "\i\1".."\i\9".
Other images can be used in menus as well, but the codes have to be fetched
by getigraph.

new commands:

  updateigraphs

    Checks for new files in packages/misc/igraph. Only necessary, if new
    files are added during the game - for example, by mod package download.

  getigraph <mnemonic>

    Returns an encoded string to display an image outside the console, or
    an empty string, if the mnemonic was not found.

new parameters:

  igraphsize 80..300 (default 120)

    scales the images (in percent)

  igraphsizehardcoded 80..160 (default 106)

    scales the hardcoded images "1".."9" (in percent)

  igraphanimate 0..1 (default 1)

    if 0, only the first frame of every image is displayed

  igraphdefaultframetime 5..2000 (default 200)

    used for images with multiple frames but no frame duration specified
    in the filename

  hideigraphs 0..1 (default 0)

    if 1, no new images will be shown in the console

DOCREF updateigraphs getigraph igraphsizehardcoded
DOCREF igraphsize igraphanimate igraphdefaultframetime hideigraphs
2017-05-28 23:29:06 +02:00
ac-stef d73b0313cb fix text input field rendering of hidden text
also: show hidden content of input field as long as CTRL is pressed
2017-04-22 15:10:02 +02:00
ac-stef 4b75405829 remove some dead code
and some braind* concepts
2015-02-12 12:54:03 +01: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
Ronald Reagan 1caf38e898 Added command line history. New file 'history' used in the config folder 2014-01-23 12:09:05 -08:00
Rafael Barreto d174d82e1d Fixing lss nade spawn, some HUDEXTRAS stuff, and temporarily reverting the cursor related functions to 1.0.4 ones
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5076 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-27 02:21:37 +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 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 66b0d50160 report backspace/del/paste as input buffer modifications
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3533 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-15 23:10:00 +00:00
Lee Salzman cacc94bd16 respawn timer for all modes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2913 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-10-11 01:33:15 +00:00
Lee Salzman 73c552bd51 support for apple meta keys
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2878 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-10-10 19:52:38 +00:00
Lee Salzman b80bbb88d3 backported text rendering from sauer
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2873 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-10-10 03:00:53 +00:00
driAn 7c96e0252f restrict number of chars in inputbox
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2737 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-09-23 18:58:14 +00:00
Lee Salzman 4f5d3906ee history cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1734 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-04-06 05:41:17 +00:00
driAn 567971f6d5 console V-key fix, vars for gfx tweaking
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1546 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-01-03 12:02:01 +00:00
driAn 472c0ef3a2 checkbox gui element
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1542 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-01-02 19:21:12 +00:00
driAn e87a167c93 firstrun script, new menu items, lanconnect fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1512 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-12-29 16:54:44 +00:00
Lee Salzman ef008c0646 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1472 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-12-23 03:11:23 +00:00
Lee Salzman ec9548abeb *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1452 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-12-02 06:17:39 +00:00
driAn d2a331fd4a hud messages
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1440 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2007-11-25 10:03:04 +00:00