Files
itgmania212121/stepmania/src/ScreenSandbox.cpp
T

100 lines
2.1 KiB
C++
Raw Normal View History

2002-05-20 08:59:37 +00:00
#include "stdafx.h"
/*
-----------------------------------------------------------------------------
File: ScreenSandbox.h
Desc: Area for testing.
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 "stdafx.h"
2002-05-20 08:59:37 +00:00
2002-11-19 22:55:51 +00:00
#include "ScreenSandbox.h"
#include "RageDisplay.h"
#include <math.h>
#include "SDL.h"
#include "SDL_opengl.h"
2002-05-20 08:59:37 +00:00
#include "ScreenSandbox.h"
#include "ScreenManager.h"
#include "RageMusic.h"
#include "GameConstantsAndTypes.h"
2002-07-23 01:41:40 +00:00
#include "PrefsManager.h"
2002-05-20 08:59:37 +00:00
#include "Quad.h"
#include "ThemeManager.h"
#include "RageNetwork.h"
2002-05-20 08:59:37 +00:00
ScreenSandbox::ScreenSandbox()
{
m_quad.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
m_quad.SetDiffuse( RageColor(1,1,1,1) );
this->AddChild( &m_quad );
m_sprite.Load( "C:\\stepmania\\stepmania\\RandomMovies\\face2.avi" );
m_sprite.SetXY( CENTER_X, CENTER_Y );
this->AddChild( &m_sprite );
2002-11-19 23:57:10 +00:00
obj.SetXY(CENTER_X, CENTER_Y);
this->AddChild(&obj);
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 )
{
if( type != IET_FIRST_PRESS )
return; // ignore
switch( DeviceI.device)
2002-05-20 08:59:37 +00:00
{
case DEVICE_KEYBOARD:
switch( DeviceI.button )
2002-05-20 08:59:37 +00:00
{
case DIK_LEFT:
2002-11-19 23:57:10 +00:00
obj.SetX(obj.GetX() - 10);
break;
case DIK_RIGHT:
2002-11-19 23:57:10 +00:00
obj.SetX(obj.GetX() + 10);
break;
2002-11-19 22:55:51 +00:00
case DIK_UP:
2002-11-19 23:57:10 +00:00
obj.SetY(obj.GetY() - 10);
2002-05-20 08:59:37 +00:00
break;
2002-11-19 22:55:51 +00:00
case DIK_DOWN:
2002-11-19 23:57:10 +00:00
obj.SetY(obj.GetY() + 10);
2002-11-19 22:55:51 +00:00
break;
case DIK_T:
{
SDL_Event *event;
event = (SDL_Event *) malloc(sizeof(event));
event->type = SDL_QUIT;
SDL_PushEvent(event);
}
case DIK_ESCAPE:
{
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
}
2002-05-20 08:59:37 +00:00
}
2002-11-19 22:55:51 +00:00
2002-05-20 08:59:37 +00:00
}
}
void ScreenSandbox::HandleScreenMessage( const ScreenMessage SM )
{
switch( SM )
{
case SM_DoneClosingWipingLeft:
break;
case SM_DoneClosingWipingRight:
break;
case SM_DoneOpeningWipingLeft:
break;
case SM_DoneOpeningWipingRight:
break;
}
2002-11-16 20:21:00 +00:00
}