Skip to content

opcodes

minirop edited this page Feb 17, 2023 · 6 revisions

Those are from d2b vs DEADROPS -Cross the Future-. Comparing the Japanese release and MangaGamer's port to Unity.

push_dword(0);	// unknown
push_dword(10);	// unknown
f_0e0();	// unknown
push_dword(5);	// flag ID
f_0e5();	// seems to be "get local flag"
push_dword(1);	// value
push_dword(2);	// flag id
f_0e6();	// probably "set global flag"
push_string("EyeCatch");// script name
f_0f0();		// call script

SYS opcodes

push_dword(2000);	// time
sys_::f_110();		// Wait
sys_::f_111();	// WaitForInput
sys_::f_119();	// unknown
push_dword(0);	// unknown (unused by MG)
sys_::f_126();	// SetValidityOfUserEffectSpeed

MSG opcodes

push_dword(1);		// unknown (unused by MG)
push_dword(1);		// unknown (unused by MG)
push_dword(0);		// text mode
push_string("...");	// name (push_dword(0) is narrator)
push_string("...");	// text
msg_::f_140();		// OutputLine

--> text mode
0 = normal
1 = continue
2 = wait for input
3 = continue after typing
<--

in Higurashi it's:
OutputLine(speaker1, text1, speaker2, text2, mode)
speaker1/text1 and speaker2/text2 allow for multiple languages.
msg_::f_141();	// ClearMessage
push_dword(0);	// unknown (unused by MG)
push_dword(22);	// unknown (unused by MG)
push_dword(0);	// unknown (unused by MG)
msg_::f_14c();	// SetFontOfMessage (not implemented by MG)
msg_::f_151();	// DisableWindow
push_dword(1000);	// unknown (unused by MG)
push_dword(40000);	// unknown (unused by MG)
msg_::f_157();		// SpringText (not implemented by MG)

SLCT opcodes

push_base_offset(12);	// reference to a string list
push_dword(2);		// number of choices
slct::f_170();		// Select

SND opcodes

push_dword(2000);	    // fadeintime
push_dword(100);	    // volume
push_string("sel_4050_d");  // filename
push_dword(5);		    // channel
snd_::f_180();		    // PlayBGM
push_dword(0);		// waitForFade
push_dword(6000);	// time
push_dword(5);		// channel
snd_::f_185();		// FadeOutBGM
push_dword(3000);	// time
push_dword(70);		// volume
push_dword(0);		// channel
snd_::f_186();		// ChangeVolumeOfBGM
push_dword(0);		// wait for fade
push_dword(4000);	// time
push_dword(6);		// channel end
push_dword(0);		// channel start
snd_::f_189();		// FadeOutMultiBGM
push_dword(64);		    // pan
push_dword(100);	    // volume
push_string("se_dous_52_s");// filename
push_dword(0);		    // channel
snd_::f_1a0();		    // PlaySE
push_dword(0);	// channel
snd_::f_1a2();	// StopSE
push_dword(0);	// channel
snd_::f_1a3();	// WaitToFinishSEPlaying

--> RETURN VALUE
returns false if "IsSkipping == true" otherwise true then wait for the audio to finish
<--
push_dword(125);	    // volume
push_string("riho00000010");// filename
push_dword(0);		    // channel
snd_::f_1a4();		    // PlayVoice
push_dword(0);	// channel
snd_::f_1a7();	// WaitToFinishVoicePlaying

--> RETURN VALUE
returns false if "IsSkipping == true" otherwise true then wait for the audio to finish
<--
push_dword(0);	// time
push_dword(0);	// channel
snd_::f_1a8();	// FadeOutSE
push_dword(2);		    // ?
push_dword(100);	    // ?
push_string("GameED90.mpg");// filename
snd_::f_1bf();		    // PlayVideo?

GRP opcodes

push_string("black");	// texture
grp_::f_220();		// PreloadBitmap
push_dword(0);	// isblocking
push_dword(6);	// loopcount
push_dword(0);	// vector
push_dword(0);	// attenuation
push_dword(20);	// level
push_dword(248);// speed
grp_::f_230();	// StartShakingOfAllObjects
push_dword(0);	// unknown (unused by MG)
push_dword(0);	// unknown (unused by MG)
grp_::f_231();	// TerminateShakingOfAllObjects
push_dword(0);	// isblocking
push_dword(6);	// loopcount
push_dword(0);	// vector
push_dword(0);	// attenuation
push_dword(20);	// level
push_dword(248);// speed
grp_::f_232();	// StartShakingOfWindow
push_dword(0);	// unknown (unused by MG)
push_dword(0);	// unknown (unused by MG)
grp_::f_233();	// TerminateShakingOfWindow
push_dword(0);	// isblocking
push_dword(6);	// loopcount
push_dword(0);	// vector
push_dword(0);	// attenuation
push_dword(10);	// level
push_dword(248);// speed
push_dword(1);	// layer
grp_::f_236();	// StartShakingOfBustshot
push_dword(1);	// unknown (unused by MG) // my guess "isblocking"
push_dword(0);	// unknown (unused by MG)
push_dword(1);	// layer
grp_::f_237();	// TerminateShakingOfBustshot
push_dword(2000);	// time
push_string("white");	// text
grp_::f_280();		// DrawScene
push_dword(500);		// time
push_dword(0);			// unknown (unused by MG)
push_dword(0);			// unknown (unused by MG)
push_string("mask1000");	// maskname
push_string("h0_ラ_バスd");	// texture
grp_::f_281();			// DrawSceneWithMask
push_dword(2000);		// wait
push_dword(6);			// unknown (unused by MG)
push_string("live_99_020");	// texture
grp_::f_284();			// ChangeScene
push_dword(2000);	// time
grp_::f_288();		// FadeScene
push_dword(500);	// time
push_dword(0);		// unknown (unused by MG)
push_dword(0);		// unknown (unused by MG)
push_string("mask1000");// mask name
grp_::f_289();		// FadeSceneWithMask
push_dword(0);	// isblocking
push_dword(200);// wait
push_dword(0);	// angle
push_dword(0);	// z
push_dword(0);	// y
push_dword(0);	// x
push_dword(0);	// moveOrFade
push_dword(1);	// layer
grp_::f_2c8();	// FadeBustshot

--> moveOrFade
if 1: MoveSprite(layer, x, y, z, angle, 0, 0f, wait, flag2)
else: FadeSprite(layer, wait, flag2)
<--
push_dword(0);			// isblocking
push_dword(2000);		// wait
push_dword(30);			// priority
push_dword(0);			// type
push_dword(0);			// unknown (unused by MG)
push_dword(0);			// unknown (unused by MG)
push_dword(0);			// unknown (unused by MG)
push_dword(0);			// oldz
push_dword(0);			// oldy
push_dword(0);			// oldx
push_dword(0);			// move
push_dword(0);			// z
push_dword(0);			// y
push_dword(0);			// x
push_string("cut_filter02");    // texture
push_dword(30);			// layer
grp_::f_2c0();			// DrawBustshot
push_dword(1);			// isblocking
push_dword(500);		// wait
push_dword(0);			// unknown (unused by MG)
push_dword(0);			// z
push_dword(0);			// y
push_dword(0);			// x
push_string("01_14_00_通");	// texture
push_dword(3);			// layer
grp_::f_2c2();			// MoveBustshot
push_dword(0);			// isblocking
push_dword(500);		// wait
push_dword(2);			// priority
push_dword(0);			// originx
push_dword(0);			// z (yes, strange position)
push_dword(0);			// olz
push_dword(0);			// oldy
push_dword(0);			// oldx
push_dword(0);			// move
push_dword(0);			// y
push_dword(180);		// x
push_dword(2);			// unknown (unused by MG)
push_string("mask2101");	// mask
push_string("m2_01_04_00_怒");	// texture
push_dword(2);			// layer
grp_::f_2ce();			// DrawBustshotWithFiltering
push_dword(1);			// isblocking
push_dword(200);		// time
push_string("f01_00_笑");	// texture
grp_::f_2d0();			// DrawFace
push_dword(1);	// isblocking
push_dword(200);// wait
grp_::f_2d2();	// FadeFace
push_dword(0);	// Unknown (MG throws an exception is not 0)
grp_::f_2dc();	// ExecutePlannedControl
push_dword(0);		// isblocking
push_dword(2000);	// wait
push_dword(9);		// priority
push_dword(0);		// alpha
push_dword(0);		// style
push_dword(0);		// unknown (unused by MG)
push_dword(0);		// unknown (unused by MG)
push_dword(0);		// angle
push_dword(0);		// originy
push_dword(0);		// originx
push_dword(0);		// z
push_dword(300);	// y
push_dword(-1);		// 
mul();			// y * -1
push_dword(400);	// x
push_dword(-1);		// 
mul();			// x * -1
push_dword(0);		// text2
push_string("ev01");    // text
push_dword(9);		// layer
grp_::f_300();		// DrawSprite
push_dword(0);			// isblocking
push_dword(1000);		// wait
push_dword(10);			// priority
push_dword(0);			// unknown (unused by MG)
push_dword(0);			// unknown (unused by MG)
push_dword(1);			// unknown (unused by MG)
push_dword(1);			// unknown (unused by MG)
push_dword(300);		// y
push_dword(-1);			// 
mul();				// y * -1
push_dword(400);		// x
push_dword(-1);			// 
mul();				// x * -1
push_dword(0);			// style
push_string("mask3020");	// mask
push_string("cut_000_00_07");	// texture
push_dword(10);			// layer
grp_::f_304();			// DrawSpriteWithFiltering
push_dword(1);		// isblocking
push_dword(2000);	// wait
push_dword(30);		// layer
grp_::f_306();		// FadeSprite
push_dword(0);			// isblocking
push_dword(1000);		// wait
push_dword(0);			// style
push_string("mask3020");	// mask
push_dword(10);			// layer
grp_::f_307();			// FadeSpriteWithFiltering
push_dword(1);	// isblocking
push_dword(300);// wait
push_dword(0);	// unknown (unused by MG)
push_dword(0);	// easetype
push_dword(0);	// alpha
push_dword(0);	// angle
push_dword(0);	// z
push_dword(0);	// y
push_dword(0);	// x
push_dword(30);	// layer
grp_::f_308();	// MoveSprite

--> easetype
case 0:
	linear
case 1:
	easeInOutSine
case 2:
	easeInOutSine
case 3:
	easeInOutQuad
case 4:
	easeInSine
case 5:
	easeOutSine
case 6:
	easeInQuad
case 7:
	easeOutQuad
case 8:
	easeInCubic
case 9:
	easeOutCubic
case 10:
	easeInQuart
case 11:
	easeOutQuart
case 12:
	easeInExpo
case 13:
	easeOutExpo
case 14:
	easeInExpo
case 15:
	easeOutExpo
<--
push_dword(1);		// isblocking
push_dword(1000);	// time
push_dword(0);		// unknown (unused by MG)
push_dword(5);		// unknown (unused by MG)
push_dword(0);		// alpha
push_dword(0);		// unknown (unused by MG)
push_base_offset(140);	// variable reference (a vector)
push_dword(2);		// count (get 'count' values in the vector)
push_dword(0);		// unknown (unused by MG)
push_dword(0);		// filename
push_dword(11);		// layer
grp_::f_309();		// MoveSpriteEx
push_dword(0);		// style (MG throws an exception if not 0)
push_base_offset(2660);	// reference to a variable (that's how MG handles it)
push_dword(2);		// number of 'elements'
push_dword(20);		// layer
grp_::f_30e();		// ControlMotionOfSprite

--> an 'element'
in MG's source code, it's a object with a position, an angle, a route, etc.
<--
push_dword(10);		// layer
push_base_offset(2928);	// variable reference (a vector)
grp_::f_320();		// GetPositionOfSprite
push_dword(1);	// isblocking
push_dword(0);	// length
push_dword(20);	// targetpower
grp_::f_340();	// EnableHorizontalGradation
push_dword(1);	// isblocking
push_dword(0);	// time
grp_::f_348();	// DisableGradation
push_dword(1);		// isblocking
push_dword(4000);	// time
push_dword(1);		// unknown (unused by MG)
push_dword(450);	// sy
push_dword(600);	// sx
push_dword(0);		// y
push_dword(100);	// x
grp_::f_350();		// EnlargeScreen
push_dword(1);	// isblocking
push_dword(0);	// time
grp_::f_358();	// DisableEffector

--> action
if 0: ResetViewportSize()
else: EnlargeScene(0f, 0f, 800f, 600f, time, flag);
<--
push_dword(1);
push_base_offset(4);
load(2);
push_base_offset(8);
load(2);
grp_::f_360();	// unknown, used in BlurOffOn for instance
push_dword(1);	// isblocking
push_dword(0);	// time
grp_::f_368();	// DisableBlur
push_dword(1);	// isblocking
push_dword(0);	// length
push_dword(0);	// style
push_dword(256);// target power
push_dword(255);// blue
push_dword(255);// green
push_dword(255);// red
push_dword(0);	// effect type
grp_::f_380();	// DrawFilm

--> effect type:
case 0:
case 1:
	EffectColorMix
case 2:
	DrainColor
case 3:
	Negative
case 10:
	HorizontalBlur2
case 12:
	GaussianBlur
<--
push_dword(1);	// isblocking
push_dword(50);	// time
grp_::f_388();	// FadeFilm
push_dword(1);	// isblocking
grp_::f_38d();	// SetValidityOfFilmToFace

Clone this wiki locally