--** @module player

#INCLUDE "useful.module"

#INCLUDE "player.inc"

--VAL []INT show.debugs IS [debug.success.check, debug.ha, debug.ffi]:
--VAL []INT show.debugs IS [debug.success.check, debug.peek, debug.read]:
--VAL []INT show.debugs IS [debug.always, debug.success.check]:
VAL []INT show.debugs IS []:

BOOL FUNCTION in.debugs(VAL INT id)
  BOOL success:
  VALOF
    SEQ
      success := FALSE
      SEQ i = 0 FOR (SIZE show.debugs)
        IF 
          (id = show.debugs[i])
            success := TRUE
          TRUE
            SKIP
    RESULT success
:

PROC debug.init()
  SKIP
:

PROC debug.string(VAL INT id, VAL []BYTE str)
  IF
    in.debugs(id)
      trace.s (str)
    TRUE
      SKIP
:

PROC debug.int(VAL INT id, VAL INT i)
  IF
    in.debugs(id)
      trace.i (i)
    TRUE
      SKIP
:

PROC debug.newline(VAL INT id)
  IF
    in.debugs(id)
      trace.n ()
    TRUE
      SKIP
:


