Пример #1
0
bool MovieRecord::Compare(MovieRecord& compareRec)
{
	//Check pad
	if (this->pad != compareRec.pad) 
		return false;

	//Check Stylus
	if (this->touch.padding != compareRec.touch.padding) return false;
	if (this->touch.touch != compareRec.touch.touch) return false;
	if (this->touch.x != compareRec.touch.x) return false;
	if (this->touch.y != compareRec.touch.y) return false;

	//Check comamnds
	//if new commands are ever recordable, they need to be added here if we go with this method
	if(this->command_reset() != compareRec.command_reset()) return false;
	if(this->command_microphone() != compareRec.command_microphone()) return false;
	if(this->command_lid() != compareRec.command_lid()) return false;
	
	return true;
}
Пример #2
0
void ReplayRecToDesmumeInput(const MovieRecord &theRecord, UserInput *theInput)
{
	if (theInput == NULL)
	{
		return;
	}
	
	if(theRecord.command_reset())
	{
		NDS_Reset();
		return;
	}
	else
	{
		movie_reset_command = false;
	}
	
	const u16 pad = theRecord.pad;
	theInput->buttons.R = (((pad>>12)&1)!=0);
	theInput->buttons.L = (((pad>>11)&1)!=0);
	theInput->buttons.D = (((pad>>10)&1)!=0);
	theInput->buttons.U = (((pad>>9)&1)!=0);
	theInput->buttons.T = (((pad>>8)&1)!=0);
	theInput->buttons.S = (((pad>>7)&1)!=0);
	theInput->buttons.B = (((pad>>6)&1)!=0);
	theInput->buttons.A = (((pad>>5)&1)!=0);
	theInput->buttons.Y = (((pad>>4)&1)!=0);
	theInput->buttons.X = (((pad>>3)&1)!=0);
	theInput->buttons.W = (((pad>>2)&1)!=0);
	theInput->buttons.E = (((pad>>1)&1)!=0);
	theInput->buttons.G = (((pad>>0)&1)!=0);
	theInput->buttons.F = theRecord.command_lid();
	
	theInput->touch.touchX = theRecord.touch.x << 4;
	theInput->touch.touchY = theRecord.touch.y << 4;
	theInput->touch.isTouch = (theRecord.touch.touch != 0);
	
	theInput->mic.micButtonPressed = (theRecord.command_microphone()) ? 1 : 0;
}
Пример #3
0
 void FCEUMOV_HandlePlayback()
 {
	 if(movieMode == MOVIEMODE_PLAY)
	 {
		 //stop when we run out of frames
		 if(currFrameCounter == (int)currMovieData.records.size())
		 {
			 FinishPlayback();
		 }
		 else
		 {
			 UserInput& input = NDS_getProcessingUserInput();

			 MovieRecord* mr = &currMovieData.records[currFrameCounter];

			 if(mr->command_microphone()) input.mic.micButtonPressed = 1;
			 else input.mic.micButtonPressed = 0;

			 if(mr->command_reset()) NDS_Reset();

			 if(mr->command_lid()) input.buttons.F = true;
			 else input.buttons.F = false;

			 u16 pad = mr->pad;
			 input.buttons.R = (((pad>>12)&1)!=0);
			 input.buttons.L = (((pad>>11)&1)!=0);
			 input.buttons.D = (((pad>>10)&1)!=0);
			 input.buttons.U = (((pad>>9)&1)!=0);
			 input.buttons.T = (((pad>>8)&1)!=0);
			 input.buttons.S = (((pad>>7)&1)!=0);
			 input.buttons.B = (((pad>>6)&1)!=0);
			 input.buttons.A = (((pad>>5)&1)!=0);
			 input.buttons.Y = (((pad>>4)&1)!=0);
			 input.buttons.X = (((pad>>3)&1)!=0);
			 input.buttons.W = (((pad>>2)&1)!=0);
			 input.buttons.E = (((pad>>1)&1)!=0);
			 input.buttons.G = (((pad>>0)&1)!=0);

			 input.touch.touchX = mr->touch.x << 4;
			 input.touch.touchY = mr->touch.y << 4;
			 input.touch.isTouch = mr->touch.touch != 0;
		 }

		 //if we are on the last frame, then pause the emulator if the player requested it
		 if(currFrameCounter == (int)currMovieData.records.size()-1)
		 {
			 /*if(FCEUD_PauseAfterPlayback())
			 {
			 FCEUI_ToggleEmulationPause();
			 }*/
		 }

		 //pause the movie at a specified frame 
		 //if(FCEUMOV_ShouldPause() && FCEUI_EmulationPaused()==0)
		 //{
		 //	FCEUI_ToggleEmulationPause();
		 //	FCEU_DispMessage("Paused at specified movie frame");
		 //}

		 // it's apparently un-threadsafe to do this here
		 // (causes crazy flickering in other OSD elements, at least)
		 // and it's also pretty annoying,
		 // and the framecounter display already conveys this info as well.
		 // so, I'm disabling this, at least for now.
//		 osd->addFixed(180, 176, "%s", "Playback");

	 }
 }