/*--------------------------------------------------------------------------
  Project:  Manual 2D Library - m2d
  File:     manualTocResource.h

  Copyright (C)2007-2009 Nintendo  All Rights Reserved.

  These coded instructions, statements, and computer programs contain
  proprietary information of Nintendo of America Inc. and/or Nintendo
  Company Ltd., and are protected by Federal copyright law. They may
  not be disclosed to third parties or copied or duplicated in any form,
  in whole or in part, without the prior written consent of Nintendo.

  $Revision: 1758 $
 *-------------------------------------------------------------------------*/

#ifndef NTMV_M2D_MANUALTOCRESOURCE_H_
#define NTMV_M2D_MANUALTOCRESOURCE_H_

#if _MSC_VER > 1000 || defined(__CWCC__)
#pragma once
#endif

#include <nitro/types.h>
#include <ntmv/m2d/types.h>
#include <ntmv/m2d/resources.h>


/* ========================================================================
    Macro Definitions
   ======================================================================== */

#define NTMV_M2D_MTOCFILENAME   "manual"


namespace ntmv
{
namespace m2d
{
namespace res
{

/* ========================================================================
    Constant Definitions
   ======================================================================== */

const u32   FILESIGNATURE_NTMC          = 'NTMC';

const u32   RESOURCETYPE_MANUALTOC      = 'ntmc';

const u32   DATABLOCKKIND_MANUALTOC     = 'mtc1';   // Block header for the manual's Contents


/* ========================================================================
    Type Definitions
   ======================================================================== */

/*
    Manual header resource structure
*/
struct ManualHeader
{
    detail::ResU16      headerFileNameIdx;          // Index for the header filename
    detail::ResU16      headerTextIdx;              // Index to the header text string

    detail::ResU16      headerFullTextIdx;          // Index to the complete header text string
    detail::ResU16      chapterNum;                 // Number of sections

    detail::ResU16      chapterFileNameStartIdx;    // Starting index for the section filenames
    detail::ResU16      chapterTextStartIdx;        // Starting index for the section text
};

/*
    Resource block for the manual's Contents
*/
struct ManualTableOfContents
{
    DataBlockHeader     blockHeader;

    detail::ResU16      headerNum;
    u8                  padding[2];

    ManualHeader        headers[/* headerNum */];
};

}   // namespace res
}   // namespace m2d
}   // namespace ntmv

/* NTMV_M2D_MANUALTOCRESOURCE_H_ */
#endif
