#ifndef M_MARK_ROOM_H
#define M_MARK_ROOM_H

#include "types.h"
#include "game_h.h"
#include "m_mark_room_ovl.h"

#ifdef __cplusplus
extern "C" {
#endif

#define mMkRm_HINT_NUM 19
#define mMkRm_REWARD0_POINTS 70000
#define mMkRm_REWARD1_POINTS 100000

#define mMkRm_LETTER_BIT_NECESSITIES_COMPLETE (1ull << 0)
#define mMkRm_LETTER_BIT_NECESSITIES_COMPLETE_SAME_SERIES (1ull << 1)
#define mMkRm_LETTER_BIT_BASE_SERIES_FTR_COMPLETE (1ull << 2)
#define mMkRm_LETTER_BIT_BASE_SERIES_WALL_OR_FLOOR_MATCH (1ull << 3)
#define mMkRm_LETTER_BIT_BASE_SERIES_MATCHING_WALL_AND_FLOOR (1ull << 4)
#define mMkRm_LETTER_BIT_THEME_SERIES_WALL_AND_FLOOR_MATCH (1ull << 5)
#define mMkRm_LETTER_BIT_THEME_SERIES_COMPLETE (1ull << 6)
#define mMkRm_LETTER_BIT_THEME_OBSTACLE (1ull << 7)
#define mMkRm_LETTER_BIT_BAD_DIRECTION (1ull << 16)
#define mMkRm_LETTER_BIT_LETS_CLEAN (1ull << 17)
#define mMkRm_LETTER_BIT_SET_SERIES_COMPLETE (1ull << 32)
#define mMkRm_LETTER_BIT_SERIES_STARTED (1ull << 33) // at least 6 items in the theme series exist
#define mMkRm_LETTER_BIT_BASE_SERIES_FTR_ALMOST_COMPLETE (1ull << 34)
#define mMkRm_LETTER_BIT_SERIES_ALMOST_COMPLETE (1ull << 35)

#define mMkRm_EVALUATE_BASE_POINT (1u << 0)
#define mMkRm_EVALUATE_NECESSITY (1u << 1)
#define mMkRm_EVALUATE_BASE_SERIES (1u << 2)
#define mMkRm_EVALUATE_THEME_SERIES (1u << 3)
#define mMkRm_EVALUATE_SET_SERIES (1u << 4)
#define mMkRm_EVALUATE_LUCKY_FTR (1u << 5)
#define mMkRm_EVALUATE_DIRECTION (1u << 6)
#define mMkRm_EVALUATE_LETS_CLEAN (1u << 7)

#define mMkRm_FULL_EVALUATION ( \
  mMkRm_EVALUATE_BASE_POINT | mMkRm_EVALUATE_NECESSITY | mMkRm_EVALUATE_BASE_SERIES | \
  mMkRm_EVALUATE_THEME_SERIES | mMkRm_EVALUATE_SET_SERIES | mMkRm_EVALUATE_LUCKY_FTR | \
  mMkRm_EVALUATE_DIRECTION | mMkRm_EVALUATE_LETS_CLEAN \
)

#define mMkRm_UPPER_EVALUATION ( \
  mMkRm_EVALUATE_BASE_POINT | mMkRm_EVALUATE_SET_SERIES | mMkRm_EVALUATE_LUCKY_FTR | \
  mMkRm_EVALUATE_DIRECTION | mMkRm_EVALUATE_LETS_CLEAN \
)

#define mMkRm_THEME_OBSTACLE_PENALTY 4000
#define mMkRm_FACING_WALL_PENALTY 800
#define mMkRm_LUCKY_BONUS 777
#define mMkRm_SET_SERIES_COMPLETE_BONUS 3000
#define mMkRm_THEME_SERIES_COMPLETE_FTR_BONUS 7000
#define mMkRm_THEME_SERIES_COMPLETE_BONUS_WALL_OR_FLOOR 10000
#define mMkRm_THEME_SERIES_COMPLETE_BONUS_WALL_AND_FLOOR 15000
#define mMkRm_BASE_SERIES_COMPLETE_FTR_BONUS 48000
#define mMkRm_BASE_SERIES_MATCHING_WALL_OR_FLOOR_BONUS 4800
#define mMkRm_BASE_SERIES_MATCHING_WALL_AND_FLOOR_BONUS 10000
#define mMkRm_NECESSITY_COMPLETE_SAME_SERIES_BONUS 16000
#define mMkRm_NECESSITY_COMPLETE_DIFF_SERIES_BONUS 4400

enum {
  mMkRm_SERIES_EXOTIC,
  mMkRm_SERIES_LOVELY,
  mMkRm_SERIES_CLASSIC,
  mMkRm_SERIES_RANCH,
  mMkRm_SERIES_CABANA,
  mMkRm_SERIES_BLUE,
  mMkRm_SERIES_MODERN,
  mMkRm_SERIES_REGAL,
  mMkRm_SERIES_GREEN,
  mMkRm_SERIES_CABIN,
  mMkRm_SERIES_SPOOKY,
  mMkRm_SERIES_JINGLE,
  mMkRm_SERIES_KIDDIE,
  mMkRm_SERIES_GARDEN,
  mMkRm_SERIES_ROCKGARDEN,
  mMkRm_SERIES_JAPANESE,
  mMkRm_SERIES_CONSTRUCTION,
  mMkRm_SERIES_SPACE,
  mMkRm_SERIES_PUBLICBATH,
  mMkRm_SERIES_SCHOOL,
  mMkRm_SERIES_CHESS,
  mMkRm_SERIES_BONSAI,
  mMkRm_SERIES_WRITING,
  mMkRm_SERIES_VASE,
  mMkRm_SERIES_VENDING,
  mMkRm_SERIES_NINTENDO,
  mMkRm_SERIES_DARUMA,
  mMkRm_SERIES_CACTUS,
  mMkRm_SERIES_BEAR,
  mMkRm_SERIES_FIGURE,
  mMkRm_SERIES_TOTEMPOLE,
  mMkRm_SERIES_GUITAR,
  mMkRm_SERIES_DRUM,
  mMkRm_SERIES_STRINGS,
  mMkRm_SERIES_OFFICE,
  mMkRm_SERIES_TRICERA,
  mMkRm_SERIES_TREX,
  mMkRm_SERIES_BRONT,
  mMkRm_SERIES_STEGO,
  mMkRm_SERIES_PTERA,
  mMkRm_SERIES_PLESIO, /* HUBATA was a mistranslation of futabasaurus */
  mMkRm_SERIES_MAMMOTH,
  mMkRm_SERIES_ROBOT,
  mMkRm_SERIES_APPLE,
  mMkRm_SERIES_CITRUS,
  mMkRm_SERIES_MELON,
  mMkRm_SERIES_PEAR,
  mMkRm_SERIES_LUCKY,
  mMkRm_SERIES_PINE,
  mMkRm_SERIES_FROGGY,
  mMkRm_SERIES_IRIS,
  mMkRm_SERIES_TULIP,
  mMkRm_SERIES_DAFFODIL,
  mMkRm_SERIES_OTHER,
  mMkRm_SERIES_SNOWMAN,
  mMkRm_SERIES_WESTERN,
  mMkRm_SERIES_BACKYARD,
  mMkRm_SERIES_HARVEST,
  mMkRm_SERIES_BOXING,
  mMkRm_SERIES_MARIO,

  mMkRm_SERIES_NUM
};

enum {
  mMkRm_SERIES_TYPE_ONE,
  mMkRm_SERIES_TYPE_BASE,
  mMkRm_SERIES_TYPE_THEME,
  mMkRm_SERIES_TYPE_SET,

  mMkRm_SERIES_TYPE_NUM
};

enum {
  mMkRm_NECESSITY_CHAIR,
  mMkRm_NECESSITY_DRESSER,
  mMkRm_NECESSITY_WARDROBE,
  mMkRm_NECESSITY_TABLE,
  mMkRm_NECESSITY_BED,
  mMkRm_NOT_NECESSITY,

  mMkRm_NECESSITY_NUM
};

enum {
  mMkRm_SURFACE_TYPE_NONE,
  mMkRm_SURFACE_TYPE_SURFACE,
  mMkRm_SURFACE_TYPE_PLACEABLE,

  mMkRm_SURFACE_TYPE_NUM
};

enum {
  mMkRm_LUCK_TYPE_NOT_LUCKY,
  mMkRm_LUCK_TYPE_LUCKY,

  mMkRm_LUCK_TYPE_NUM
};

enum {
  mMkRm_FACE_TYPE_NO_FACE,
  mMkRm_FACE_TYPE_HAS_FACE,

  mMkRm_FACE_TYPE_NUM
};

extern void mMkRm_ReportChangePlayerRoom();
extern void mMkRm_MarkRoom(GAME* game);

#ifdef __cplusplus
}
#endif

#endif
