Files
itgmania212121/stepmania/src/GameConstantsAndTypes.h
T

170 lines
3.4 KiB
C
Raw Normal View History

2002-05-01 19:14:55 +00:00
#pragma once
/*
-----------------------------------------------------------------------------
File: GameConstantsAndTypes.h
2002-07-27 19:29:51 +00:00
Desc: Things that are used in many places and don't change often.
2002-05-01 19:14:55 +00:00
2002-05-19 01:59:48 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-05-01 19:14:55 +00:00
Chris Danford
-----------------------------------------------------------------------------
*/
2002-07-27 19:29:51 +00:00
#include "D3DX8Math.h" // for D3DXCOLOR
2002-05-27 08:23:27 +00:00
/////////////////////////////
// Screen Dimensions
/////////////////////////////
#define SCREEN_WIDTH (640)
#define SCREEN_HEIGHT (480)
2002-05-01 19:14:55 +00:00
2002-05-27 08:23:27 +00:00
#define SCREEN_LEFT (0)
#define SCREEN_RIGHT (SCREEN_WIDTH)
#define SCREEN_TOP (0)
#define SCREEN_BOTTOM (SCREEN_HEIGHT)
2002-05-01 19:14:55 +00:00
2002-05-27 08:23:27 +00:00
#define CENTER_X (SCREEN_LEFT + (SCREEN_RIGHT - SCREEN_LEFT)/2.0f)
#define CENTER_Y (SCREEN_TOP + (SCREEN_BOTTOM - SCREEN_TOP)/2.0f)
2002-05-01 19:14:55 +00:00
2002-05-27 08:23:27 +00:00
/////////////////////////
// Note definitions
/////////////////////////
2002-07-03 03:13:13 +00:00
2002-05-01 19:14:55 +00:00
2002-07-02 00:27:58 +00:00
enum RadarCategory // starting from 12-o'clock rotating clockwise
2002-05-27 08:23:27 +00:00
{
RADAR_STREAM = 0,
RADAR_VOLTAGE,
RADAR_AIR,
2002-06-23 11:43:53 +00:00
RADAR_FREEZE,
2002-06-24 22:04:31 +00:00
RADAR_CHAOS,
2002-05-27 08:23:27 +00:00
NUM_RADAR_VALUES // leave this at the end
};
enum DifficultyClass
{
CLASS_EASY, // corresponds to Basic
CLASS_MEDIUM, // corresponds to Trick, Another, Standard
CLASS_HARD, // corresponds to Maniac, SSR, Heavy
2002-06-27 17:49:10 +00:00
NUM_DIFFICULTY_CLASSES,
CLASS_INVALID
2002-05-27 08:23:27 +00:00
};
2002-07-27 19:29:51 +00:00
D3DXCOLOR DifficultyClassToColor( DifficultyClass dc );
2002-05-27 08:23:27 +00:00
2002-07-27 19:29:51 +00:00
CString DifficultyClassToString( DifficultyClass dc );
2002-06-29 11:59:09 +00:00
2002-07-27 19:29:51 +00:00
DifficultyClass StringToDifficultyClass( CString sDC );
2002-06-30 23:19:33 +00:00
2002-05-27 08:23:27 +00:00
enum NotesType
{
NOTES_TYPE_DANCE_SINGLE = 0,
NOTES_TYPE_DANCE_DOUBLE,
NOTES_TYPE_DANCE_COUPLE_1,
NOTES_TYPE_DANCE_COUPLE_2,
2002-05-27 08:23:27 +00:00
NOTES_TYPE_DANCE_SOLO,
NOTES_TYPE_PUMP_SINGLE,
2002-05-27 18:36:01 +00:00
NOTES_TYPE_PUMP_DOUBLE,
2002-09-09 23:15:43 +00:00
NOTES_TYPE_PUMP_COUPLE_1,
NOTES_TYPE_PUMP_COUPLE_2,
2002-06-20 22:09:05 +00:00
NOTES_TYPE_EZ2_SINGLE,
NOTES_TYPE_EZ2_SINGLE_HARD,
2002-06-20 22:09:05 +00:00
NOTES_TYPE_EZ2_DOUBLE,
NOTES_TYPE_EZ2_REAL,
2002-09-07 02:50:23 +00:00
NOTES_TYPE_PARA,
// NOTES_TYPE_EZ2_SINGLE_VERSUS, // Chris: these should only be styles, not NotesTypes
// NOTES_TYPE_EZ2_SINGLE_HARD_VERSUS,
// NOTES_TYPE_EZ2_REAL_VERSUS,
2002-06-14 22:25:22 +00:00
NUM_NOTES_TYPES, // leave this at the end
NOTES_TYPE_INVALID,
2002-05-27 08:23:27 +00:00
};
//////////////////////////
// Play mode stuff
//////////////////////////
enum PlayMode
{
PLAY_MODE_ARCADE,
2002-06-14 22:25:22 +00:00
PLAY_MODE_ONI,
2002-07-27 19:29:51 +00:00
PLAY_MODE_ENDLESS,
2002-06-24 22:04:31 +00:00
NUM_PLAY_MODES,
PLAY_MODE_INVALID
2002-05-27 08:23:27 +00:00
};
enum PlayerNumber {
PLAYER_1 = 0,
PLAYER_2,
NUM_PLAYERS, // leave this at the end
2002-06-24 22:04:31 +00:00
PLAYER_INVALID
2002-05-27 08:23:27 +00:00
};
D3DXCOLOR PlayerToColor( PlayerNumber pn );
2002-07-27 19:29:51 +00:00
D3DXCOLOR PlayerToColor( int p );
2002-05-27 08:23:27 +00:00
2002-05-01 19:14:55 +00:00
enum SongSortOrder {
SORT_GROUP,
SORT_TITLE,
SORT_BPM,
SORT_MOST_PLAYED,
NUM_SORT_ORDERS
};
2002-06-24 22:04:31 +00:00
///////////////////////////
// Scoring stuff
///////////////////////////
enum TapNoteScore {
TNS_NONE,
TNS_MISS,
TNS_BOO,
TNS_GOOD,
TNS_GREAT,
2002-07-28 20:28:37 +00:00
TNS_PERFECT,
NUM_TAP_NOTE_SCORES
2002-06-24 22:04:31 +00:00
};
inline int TapNoteScoreToDancePoints( TapNoteScore tns )
{
switch( tns )
{
case TNS_PERFECT: return +2;
case TNS_GREAT: return +1;
case TNS_GOOD: return +0;
case TNS_BOO: return -4;
case TNS_MISS: return -8;
2002-06-27 19:30:40 +00:00
case TNS_NONE: return 0;
2002-06-24 22:04:31 +00:00
default: ASSERT(0); return 0;
}
}
//enum TapNoteTiming {
// TNT_NONE,
// TNT_EARLY,
// TNT_LATE
//};
enum HoldNoteScore
{
HNS_NONE, // this HoldNote has not been scored yet
HNS_OK, // the HoldNote has passed and was successfully held all the way through
2002-07-28 20:28:37 +00:00
HNS_NG, // the HoldNote has passed and they missed it
NUM_HOLD_NOTE_SCORES
2002-06-24 22:04:31 +00:00
};
inline int HoldNoteScoreToDancePoints( HoldNoteScore hns )
{
switch( hns )
{
case HNS_OK: return +6;
case HNS_NG: return +0;
default: ASSERT(0); return 0;
}
}