Files
itgmania212121/stepmania/src/ScreenSandbox.cpp
T

106 lines
3.0 KiB
C++
Raw Normal View History

2003-02-16 04:01:45 +00:00
#include "global.h"
2002-05-20 08:59:37 +00:00
/*
-----------------------------------------------------------------------------
File: ScreenSandbox.h
Desc: Area for testing. Throw whatever you're working on in here. If you
don't want stuff in here to be wiped out by the next guy who works on something,
make a separate screen and add a hook into ScreenTest; this one's just a
scratchpad.
2002-05-20 08:59:37 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-11-19 22:55:51 +00:00
Chris Danford
Glenn Maynard (OpenGL Code)
Lance Gilbert (OpenGL/Usability Modifications)
2002-05-20 08:59:37 +00:00
-----------------------------------------------------------------------------
*/
2002-11-19 22:55:51 +00:00
#include "ScreenSandbox.h"
#include "GameConstantsAndTypes.h"
#include "ThemeManager.h"
2003-05-11 07:23:47 +00:00
#include "RageDisplay.h"
2003-08-20 09:59:52 +00:00
#include "RageLog.h"
2002-11-19 22:55:51 +00:00
2002-05-20 08:59:37 +00:00
2003-04-12 06:16:12 +00:00
ScreenSandbox::ScreenSandbox() : Screen("ScreenSandbox")
{
// m_quad1.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
// m_quad1.SetDiffuse( RageColor(0,0,1,1) );
// m_quad1.SetZ( 0 );
// m_quad1.SetUseZBuffer( true );
// this->AddChild( &m_quad1 );
// m_quad2.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
// m_quad2.SetDiffuse( RageColor(0,1,0,1) );
// m_quad2.SetZ( -1 );
// m_quad2.SetUseZBuffer( true );
// this->AddChild( &m_quad2 );
2002-12-18 06:54:28 +00:00
// m_sprite.Load( "C:\\stepmania\\stepmania\\RandomMovies\\cm301[1].avi" );
// m_sprite.SetXY( CENTER_X, CENTER_Y );
// this->AddChild( &m_sprite );
2003-08-20 09:59:52 +00:00
//m_model.LoadMilkshapeAscii( "C:\\stepmania\\stepmania\\Themes\\groove\\BGAnimations\\ScreenCaution background\\2 platforms and backbar.txt" );
m_model.LoadMilkshapeAscii( "Characters\\DancePads-DDR.bones.txt" );
m_model.SetXY(CENTER_X, CENTER_Y);
2003-08-20 09:59:52 +00:00
m_model.SetRotationX( 15 );
m_model.SetZoom(5);
this->AddChild(&m_model);
// this->AddChild( &m_In );
// this->AddChild( &m_Out );
2002-12-18 06:54:28 +00:00
}
void ScreenSandbox::HandleScreenMessage( const ScreenMessage SM )
2002-12-18 06:54:28 +00:00
{
2002-05-20 08:59:37 +00:00
}
void ScreenSandbox::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
2003-08-20 09:59:52 +00:00
if( DeviceI.button == SDLK_LEFT )
m_model.SetRotationY( m_model.GetRotationY()+5 );
if( DeviceI.button == SDLK_DOWN )
m_model.SetRotationX( m_model.GetRotationX()+5 );
if( DeviceI.button == SDLK_UP )
m_model.SetRotationX( m_model.GetRotationX()-5 );
if( DeviceI.button == SDLK_RIGHT )
m_model.SetRotationY( m_model.GetRotationY()-5 );
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
2002-05-20 08:59:37 +00:00
}
void ScreenSandbox::Update( float fDeltaTime )
2002-05-20 08:59:37 +00:00
{
Screen::Update(fDeltaTime);
2002-11-16 20:21:00 +00:00
}
2003-05-11 07:23:47 +00:00
void ScreenSandbox::DrawPrimitives()
{
DISPLAY->SetLighting( true );
DISPLAY->SetLightDirectional(
0,
RageColor(0.5,0.5,0.5,1),
RageColor(1,1,1,1),
RageColor(0,0,0,1),
RageVector3(0, 0, 1) );
2003-05-11 07:23:47 +00:00
Screen::DrawPrimitives();
DISPLAY->SetLightOff( 0 );
DISPLAY->SetLighting( false );
2003-05-11 07:23:47 +00:00
}
void ScreenSandbox::MenuLeft( PlayerNumber pn )
{
// m_In.Load( THEME->GetPathToB("_menu in") );
// m_In.StartTransitioning();
}
void ScreenSandbox::MenuRight( PlayerNumber pn )
{
// m_Out.Load( THEME->GetPathToB("_menu out") );
// m_Out.StartTransitioning();
2003-07-03 18:13:13 +00:00
}