@DFO: @DFOintrodate.0B160F8A8C8B8C8B938E938E948B948B988F988F998A99908C918C91929293939393949294919391949094908C8A991C0F948D958C988C988D958D9593979397919591959098909893979495949493998A9A8C9A8E998E998A94939F8CA08CA09A9E979F979F8C9493140FA38CA48CA490A590A591A491A499A399A191A190A390A391A291A396A68CA78CA78EA68EA68CA3961D0FAB8CAF8CB08DB098AF99AC99AC98AF98AF8DAC8DAC99AB99B18DB28CB58CB58DB28DB293B493B491B291B290B590B593B494B294B193B18DAB99180FB68CBA8CBA8DB78DBA93BA94B694B693B993B68DBE8CC28CC28DBF8DC294C298C199BE99BE98C198C194BE8DBE8CB68D100FC48CC68CC78DC798C699C499C498C698C68DC48DC696C698C48FC499C398C38D1D0FC98CCB8CCC8DCC98CB99C999C998CB98CB8DC98DCB96CB98C98FC999C898C88DCE8CCF8CCF9ACD97CE97CE8CC88DD08AD18CD18ED08ED08AC88D1A0FD68CD78CD79AD597D697D98CDA8CDB94DC99D899D898DB98DA94D98DD98CD697DD8CDE8CDE8EDD8EDD92DE92DE94DD94DD8CD6971D0FE08CE18CE19ADF97E097E28CE68CE68DE38DE694E698E599E299E298E598E594E28DE28CE097E78CE88CE88EE78EE792E892E894E794E78CE0970E0FE98CECCED8DED93EC94EA94EA98ED98ED99E999E993EC93EC8DE98D100FEE8DEF8CF18CF28DF293F194EF94EF93F193F18DEF8DEF98F298F299EF99EE98@SCEintro.@VIOintrodate.0000@RFS

"@DFO: " ???

Define object called introdate and put it into the cache.
Retrieve the scene 'intro' from the cache and set to be the current scene.
Retrieve object 'introdate' from the cache and add into the scene at 0x00,0x00.
Redraw the scene.

@SCE<scene>.
------------

  Retrieve <scene> from the local cache.  If not in the local cache request
  scene from MUD using "#RQS <scene>\n".  The scene should then be set to
  to be the current scene.  It should be set to redraw on receiving @RFS.

@DFS<scene>.data (Define Scene)
----------------

  Set the data for <scene> to the stuff following the "."

@VIO<id>.xy
-----------

  Add object with ID (remove first if need be) to the current scene from
  the cache.  If the object is not in the cache, retrieve using "#RQO <id>\n"

@RMO<id>.
---------

  Remove object with ID from the scene and refresh the scene.

@DFO<id>.
---------

  Defines an object with the data following the command.  This entry should
  be placed into the cache (if new) or replace the current entry in the cache.
  If it replaces the cached entry, and a scene contains that object, the
  scene should be redrawn.  It does not place the object into the current
  scene.

@RFS
----

  Redraw the scene if anything has been added, removed or changed in it.

@TMS
----

  Terminate the session and free any resources allocated to it.

Papaya Specifics
================

Each BSX MUD Connection requires its own cache as it cannot be guaranteed
that different MUDs will use the same images with the same names.

Want to have a maximum cache size:
  [ 1024] Max kilobytes to store scenes
  [ 1024] Max kilobytes to store objects
  [ 2048] Total Maximum Cache Size  (uneditable)

** Note that this is PER CONNECTION.  If you have ten connections to BSX
** MUDS, this could be 10 times the maximum value above.

When an item is put into the cache it is given a timestamp.
Each time an item is retrieved from the cache its usage count goes up.

Cache replacement policy works out how many times per hour each item is
used and replaces least used items with new items.

  BSXCache * objectCache = new BSXCache(unsigned int max_size);
  BSXCache * sceneCache = new BSXCache(unsigned int max_size);

  void BSXCache::insert(char * name, char * data);
  void BSXCache::remove(char * name);
  void BSXCache::replace(char * name, char * data);
  char * BSXCache::retrieve(char * name);
  void BSXCache::expire();

  void BSXCache::setMaxSize(unsigned int);
  unsigned int BSXCache::getMaxSize();

  unsigned int BSXCache::getCurrentSize();