# 'module' defines the module and its name

module "FOO EDITOR V. 1.1" {
   # The following descriptions are attached to the module.
   # They will be displayed when the module is started or when
   # users request.

   desc "Data editor for game FOO, by Joe Henry."
   desc " "
   desc "This editor allows you to change the name of the hero,"
   desc "the current dungeon level and lives left."

   # This is an 'absolute' record which means it has only a
   # set of data to be used with this record definition.

   absolute "Simple Record" {
	 # The following descriptions will be attached to the recrod.

	 desc "Record for name, level and lives"

	 field "Level" {
	    # The following descriptions will be attached to the field.

	    desc "The current level of the dungeon.  The total number"
	    desc "of levels is 60.  But there are important stuffs"
	    desc "in level 44 needed for the game's progress.  Thus the"
	    desc "input must be between 1 and 43."

	    # Here it defines the location and size of data in the
	    # game file.  It says the data is located at offset 0 of
	    # the record with the size of 1 byte long and interpreted
	    # as a byte.  Since the offset of the data set in an
	    # absolute record against beginning of the file is 0, the
	    # data offset here is actually the offset from the beginning
	    # of the file.

	    data 0 1 byte

	    # Now it defines the display of the field in the entry
	    # form.  It is in page 0, The label of the field "Level"
	    # is at row 3, column 5.  The entry is at row 3, column 12
	    # as a 3 digits decimal number.

	    entry 0 3 5 3 12 3 dec
	 }

	 field "Lives" {
	    # Descriptions for the field.

	    desc "Lives remained."
	    desc "Must be between 1 and 20."

	    # Data located at offset 1 of the file, 1 bytes long and
	    # interpreted as a byte.

	    data 1 1 byte

	    # label at page 0, row 4, column 5
	    # entry at row 4, column 12, 3 digit decimal

	    entry 0 4 5 4 12 3 dec
	 }
	 field "Name" {
	    # Descriptions for the field.

	    desc "The player's name in the game."
	    desc "Must be less than 10 chars."

	    # Data located at offset 4 of the file, 10 bytes long,
	    # as an ASCII string

	    data 4 10 ascii

	    # Label at page 0, row 5, column 5
	    # entry at row 5, column 12, 10 ASCII characters

	    entry 0 5 5 5 12 10 asc
	 }
   }
}
