亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? gameswf_action.cpp

?? 一個(gè)開源的嵌入式flash播放器 具體看文檔和例子就可
?? CPP
?? 第 1 頁 / 共 5 頁
字號(hào):
// gameswf_action.cpp	-- Thatcher Ulrich <tu@tulrich.com> 2003// This source code has been donated to the Public Domain.  Do// whatever you want with it.// Implementation and helpers for SWF actions.#include "gameswf_action.h"#include "gameswf_impl.h"#include "gameswf_log.h"#include "gameswf_stream.h"#include "base/tu_random.h"#include "gameswf_string.h"#include "gameswf_movie.h"#include "gameswf_timers.h"#include "gameswf_textformat.h"#include "gameswf_sound.h"#ifdef HAVE_LIBXML#include "gameswf_xml.h"#include "gameswf_xmlsocket.h"#endif#ifdef _WIN32#define snprintf _snprintf#endif // _WIN32// NOTES://// Buttons// on (press)                 onPress// on (release)               onRelease// on (releaseOutside)        onReleaseOutside// on (rollOver)              onRollOver// on (rollOut)               onRollOut// on (dragOver)              onDragOver// on (dragOut)               onDragOut// on (keyPress"...")         onKeyDown, onKeyUp      <----- IMPORTANT//// Sprites// onClipEvent (load)         onLoad// onClipEvent (unload)       onUnload                Hm.// onClipEvent (enterFrame)   onEnterFrame// onClipEvent (mouseDown)    onMouseDown// onClipEvent (mouseUp)      onMouseUp// onClipEvent (mouseMove)    onMouseMove// onClipEvent (keyDown)      onKeyDown// onClipEvent (keyUp)        onKeyUp// onClipEvent (data)         onData// Text fields have event handlers too!// Sprite built in methods:// play()// stop()// gotoAndStop()// gotoAndPlay()// nextFrame()// startDrag()// getURL()// getBytesLoaded()// getBytesTotal()// Built-in functions: (do these actually exist in the VM, or are they just opcodes?)// Number()// String()// TODO builtins//// Number.toString() -- takes an optional arg that specifies the base//// parseInt(), parseFloat()//// Boolean() type cast//// typeof operator --> "number", "string", "boolean", "object" (also// for arrays), "null", "movieclip", "function", "undefined"//// isNaN()//// Number.MAX_VALUE, Number.MIN_VALUE//// String.fromCharCode()namespace gameswf{		//	// action stuff	//	void	action_init();	// Statics.	bool	s_inited = false;	smart_ptr<as_object>	s_global;	fscommand_callback	s_fscommand_handler = NULL;#define EXTERN_MOVIE	#ifdef EXTERN_MOVIE	void attach_extern_movie(const char* url, const movie* target, const movie* root_movie)	{		tu_string infile = get_workdir();		infile += url;		movie_definition_sub*	md = create_library_movie_sub(infile.c_str());		if (md == NULL)		{			log_error("can't create movie_definition_sub for %s\n", infile.c_str());			return;		}		gameswf::movie_interface* extern_movie;		if (target == root_movie)		{			extern_movie = create_library_movie_inst_sub(md);						if (extern_movie == NULL)			{				log_error("can't create extern root movie_interface for %s\n", infile.c_str());				return;			}			set_current_root(extern_movie);			movie* m = extern_movie->get_root_movie();			m->on_event(event_id::LOAD);		}		else		{			extern_movie = md->create_instance();			if (extern_movie == NULL)			{				log_error("can't create extern movie_interface for %s\n", infile.c_str());				return;			}      			save_extern_movie(extern_movie);      			character* tar = (character*)target;			const char* name = tar->get_name();			Uint16 depth = tar->get_depth();			bool use_cxform = false;			cxform color_transform =  tar->get_cxform();			bool use_matrix = false;			matrix mat = tar->get_matrix();			float ratio = tar->get_ratio();			Uint16 clip_depth = tar->get_clip_depth();			movie* parent = tar->get_parent();			movie* new_movie = extern_movie->get_root_movie();			assert(parent != NULL);			((character*)new_movie)->set_parent(parent);       			parent->replace_display_object(				(character*) new_movie,				name,				depth,				use_cxform,				color_transform,				use_matrix,				mat,				ratio,				clip_depth);		}	}#endif // EXTERN_MOVIE	void	register_fscommand_callback(fscommand_callback handler)	// External interface.	{		s_fscommand_handler = handler;	}	static bool string_to_number(double* result, const char* str)	// Utility.  Try to convert str to a number.  If successful,	// put the result in *result, and return true.  If not	// successful, put 0 in *result, and return false.	{		char* tail = 0;		*result = strtod(str, &tail);		if (tail == str || *tail != 0)		{			// Failed conversion to Number.			return false;		}		return true;	}	//	// array object	//	struct as_array_object : public as_object	{// @@ TODO//		as_array_object()//		{//			this->set_member("length", &array_not_impl);//			this->set_member("join", &array_not_impl);//			this->set_member("concat", &array_not_impl);//			this->set_member("slice", &array_not_impl);//			this->set_member("push", &array_not_impl);//			this->set_member("unshift", &array_not_impl);//			this->set_member("pop", &array_not_impl);//			this->set_member("shift", &array_not_impl);//			this->set_member("splice", &array_not_impl);//			this->set_member("sort", &array_not_impl);//			this->set_member("sortOn", &array_not_impl);//			this->set_member("reverse", &array_not_impl);//			this->set_member("toString", &array_not_impl);//		}	};	void	array_not_impl(const fn_call& fn)	{		log_error("array methods not implemented yet\n");	}	//	// as_as_function	//	void	as_as_function::operator()(const fn_call& fn)	// Dispatch.	{		as_environment*	our_env = m_env;		if (our_env == NULL)		{			our_env = fn.env;		}		assert(our_env);		// Set up local stack frame, for parameters and locals.		int	local_stack_top = our_env->get_local_frame_top();		our_env->add_frame_barrier();		if (m_is_function2 == false)		{			// Conventional function.			// Push the arguments onto the local frame.			int	args_to_pass = imin(fn.nargs, m_args.size());			for (int i = 0; i < args_to_pass; i++)			{				assert(m_args[i].m_register == 0);				our_env->add_local(m_args[i].m_name, fn.arg(i));			}		}		else		{			// function2: most args go in registers; any others get pushed.						// Create local registers.			our_env->add_local_registers(m_local_register_count);			// Handle the explicit args.			int	args_to_pass = imin(fn.nargs, m_args.size());			for (int i = 0; i < args_to_pass; i++)			{				if (m_args[i].m_register == 0)				{					// Conventional arg passing: create a local var.					our_env->add_local(m_args[i].m_name, fn.arg(i));				}				else				{					// Pass argument into a register.					int	reg = m_args[i].m_register;					*(our_env->local_register_ptr(reg)) = fn.arg(i);				}			}			// Handle the implicit args.			int	current_reg = 1;			if (m_function2_flags & 0x01)			{				// preload 'this' into a register.				(*(our_env->local_register_ptr(current_reg))).set_as_object_interface(our_env->m_target);				current_reg++;			}			if (m_function2_flags & 0x02)			{				// Don't put 'this' into a local var.			}			else			{				// Put 'this' in a local var.				our_env->add_local("this", as_value(our_env->m_target));			}			// Init arguments array, if it's going to be needed.			smart_ptr<as_array_object>	arg_array;			if ((m_function2_flags & 0x04) || ! (m_function2_flags & 0x08))			{				arg_array = new as_array_object;				as_value	index_number;				for (int i = 0; i < fn.nargs; i++)				{					index_number.set_int(i);					arg_array->set_member(index_number.to_string(), fn.arg(i));				}			}			if (m_function2_flags & 0x04)			{				// preload 'arguments' into a register.				(*(our_env->local_register_ptr(current_reg))).set_as_object_interface(arg_array.get_ptr());				current_reg++;			}			if (m_function2_flags & 0x08)			{				// Don't put 'arguments' in a local var.			}			else			{				// Put 'arguments' in a local var. 				our_env->add_local("arguments", as_value(arg_array.get_ptr()));			}			if (m_function2_flags & 0x10)			{				// Put 'super' in a register.				log_error("TODO: implement 'super' in function2 dispatch (reg)\n");				current_reg++;			}			if (m_function2_flags & 0x20)			{				// Don't put 'super' in a local var.			}			else			{				// Put 'super' in a local var.				log_error("TODO: implement 'super' in function2 dispatch (var)\n");			}			if (m_function2_flags & 0x40)			{				// Put '_root' in a register.				(*(our_env->local_register_ptr(current_reg))).set_as_object_interface(					our_env->m_target->get_root_movie());				current_reg++;			}			if (m_function2_flags & 0x80)			{				// Put '_parent' in a register.				array<with_stack_entry>	dummy;				as_value	parent = our_env->get_variable("_parent", dummy);				(*(our_env->local_register_ptr(current_reg))) = parent;				current_reg++;			}			if (m_function2_flags & 0x100)			{				// Put '_global' in a register.				(*(our_env->local_register_ptr(current_reg))).set_as_object_interface(s_global.get_ptr());				current_reg++;			}		}		// Execute the actions.		m_action_buffer->execute(our_env, m_start_pc, m_length, fn.result, m_with_stack, m_is_function2);		// Clean up stack frame.		our_env->set_local_frame_top(local_stack_top);		if (m_is_function2)		{			// Clean up the local registers.			our_env->drop_local_registers(m_local_register_count);		}	}	//	// Function/method dispatch.	//	as_value	call_method(		const as_value& method,		as_environment* env,		as_object_interface* this_ptr,		int nargs,		int first_arg_bottom_index)	// first_arg_bottom_index is the stack index, from the bottom, of the first argument.	// Subsequent arguments are at *lower* indices.  E.g. if first_arg_bottom_index = 7,	// then arg1 is at env->bottom(7), arg2 is at env->bottom(6), etc.	{		as_value	val;		as_c_function_ptr	func = method.to_c_function();		if (func)		{			// It's a C function.  Call it.			(*func)(fn_call(&val, this_ptr, env, nargs, first_arg_bottom_index));		}		else if (as_as_function* as_func = method.to_as_function())		{			// It's an ActionScript function.  Call it.			(*as_func)(fn_call(&val, this_ptr, env, nargs, first_arg_bottom_index));		}		else		{			log_error("error in call_method(): method is not a function\n");		}		return val;	}	as_value	call_method0(		const as_value& method,		as_environment* env,		as_object_interface* this_ptr)	{		return call_method(method, env, this_ptr, 0, env->get_top_index() + 1);	}			const char*	call_method_parsed(		as_environment* env,		as_object_interface* this_ptr,		const char* method_name,		const char* method_arg_fmt,		va_list args)	// Printf-like vararg interface for calling ActionScript.	// Handy for external binding.	{		log_msg("FIXME(%d): %s\n", __LINE__, __FUNCTION__);#if 0		static const int	BUFSIZE = 1000;		char	buffer[BUFSIZE];		array<const char*>	tokens;		// Brutal crap parsing.  Basically null out any		// delimiter characters, so that the method name and		// args sit in the buffer as null-terminated C		// strings.  Leave an intial ' character as the first		// char in a string argument.		// Don't verify parens or matching quotes or anything.		{			strncpy(buffer, method_call, BUFSIZE);			buffer[BUFSIZE - 1] = 0;			char*	p = buffer;			char	in_quote = 0;			bool	in_arg = false;			for (;; p++)			{				char	c = *p;				if (c == 0)				{					// End of string.					break;				}				else if (c == in_quote)				{					// End of quotation.					assert(in_arg);					*p = 0;					in_quote = 0;					in_arg = false;				}				else if (in_arg)				{					if (in_quote == 0)					{						if (c == ')' || c == '(' || c == ',' || c == ' ')						{							// End of arg.							*p = 0;							in_arg = false;						}					}				}				else				{					// Not in arg.  Watch for start of arg.					assert(in_quote == 0);					if (c == '\'' || c == '\"')					{						// Start of quote.						in_quote = c;						in_arg = true;						*p = '\'';	// ' at the start of the arg, so later we know this is a string.						tokens.push_back(p);					}					else if (c == ' ' || c == ',')					{						// Non-arg junk, null it out.						*p = 0;					}					else					{						// Must be the start of a numeric arg.						in_arg = true;						tokens.push_back(p);					}				}			}		}#endif // 0		// Parse va_list args		int	starting_index = env->get_top_index();

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区系列电影| 国产呦精品一区二区三区网站| av一区二区不卡| 欧美激情在线一区二区| 国产成人亚洲综合a∨猫咪| 日本一区二区久久| 9人人澡人人爽人人精品| 亚洲欧洲日韩在线| 欧美亚日韩国产aⅴ精品中极品| 亚洲一二三级电影| 日韩一级精品视频在线观看| 国产精品主播直播| 亚洲色图色小说| 欧美丰满少妇xxxxx高潮对白| 日韩精品一级中文字幕精品视频免费观看| 91麻豆精品国产91久久久| 久久er99精品| 中文字幕一区日韩精品欧美| 欧美私模裸体表演在线观看| 美女视频网站黄色亚洲| 国产日韩三级在线| 欧美视频在线一区| 国产在线精品一区二区夜色| |精品福利一区二区三区| 欧美日韩午夜在线| 国产99精品国产| 国产精品中文字幕日韩精品| 亚洲人一二三区| 日韩欧美在线一区二区三区| 成人国产电影网| 舔着乳尖日韩一区| 国产精品网站在线| 欧美一区二区三区男人的天堂| 国产成人日日夜夜| 日韩不卡一区二区| 亚洲视频综合在线| 亚洲精品一区二区在线观看| 一本一本大道香蕉久在线精品| 久久精品国产免费| 亚洲综合无码一区二区| 久久精品网站免费观看| 欧美久久婷婷综合色| 国产成人免费视频一区| 日韩专区在线视频| 中文字幕一区视频| 久久久久九九视频| 在线电影院国产精品| av在线不卡网| 国产麻豆一精品一av一免费| 亚洲国产日韩一区二区| 欧美激情艳妇裸体舞| 欧美一卡2卡3卡4卡| 在线区一区二视频| fc2成人免费人成在线观看播放| 久久精品国产在热久久| 亚洲韩国一区二区三区| 中文字幕一区二区日韩精品绯色| 精品久久国产字幕高潮| 欧美人牲a欧美精品| 91蜜桃网址入口| 岛国av在线一区| 久久精品国产99久久6| 亚洲丶国产丶欧美一区二区三区| 亚洲少妇屁股交4| 亚洲国产精品高清| 久久久99久久| 久久久国际精品| 2024国产精品视频| 精品久久久网站| 欧美本精品男人aⅴ天堂| 91精品国产综合久久精品性色| 91丝袜美女网| 色婷婷国产精品| 色噜噜久久综合| 欧洲精品一区二区| 91传媒视频在线播放| 91麻豆高清视频| 91香蕉视频mp4| 一本色道亚洲精品aⅴ| 99国产精品国产精品久久| 成人免费黄色在线| 91视视频在线直接观看在线看网页在线看| 丁香婷婷综合网| www.成人在线| 色婷婷综合久久久久中文一区二区| 91丨九色丨蝌蚪富婆spa| 一本色道亚洲精品aⅴ| 日本高清视频一区二区| 欧美日韩精品一二三区| 69堂成人精品免费视频| 亚洲欧洲国产专区| 一区二区久久久久久| 亚洲大型综合色站| 久热成人在线视频| 国产高清不卡二三区| 不卡的看片网站| 91电影在线观看| 日韩一区二区电影在线| 久久久久久免费网| 亚洲欧洲在线观看av| 亚洲国产精品久久不卡毛片 | 91美女片黄在线观看91美女| 色综合天天综合网天天狠天天| 欧洲精品一区二区| 日韩免费一区二区| 国产精品久久久爽爽爽麻豆色哟哟| 1区2区3区精品视频| 亚洲在线观看免费视频| 精品影院一区二区久久久| 国产999精品久久久久久| 色欧美88888久久久久久影院| 欧美日韩国产综合草草| ww久久中文字幕| 亚洲在线中文字幕| 国产一区视频在线看| 一本一道综合狠狠老| 日韩丝袜美女视频| 中文字幕一区二区三区av| 香蕉成人伊视频在线观看| 国产在线乱码一区二区三区| 日本丶国产丶欧美色综合| 日韩精品最新网址| 亚洲日本在线看| 国产一区久久久| 欧美三级日韩在线| 日本一区二区三区在线观看| 亚洲成人你懂的| 成人免费高清在线观看| 7777精品伊人久久久大香线蕉超级流畅| 国产欧美日韩中文久久| 亚欧色一区w666天堂| 懂色中文一区二区在线播放| 9191国产精品| 亚洲欧美日韩国产中文在线| 精品在线观看视频| 7777精品伊人久久久大香线蕉的 | 国产成人精品www牛牛影视| 欧洲生活片亚洲生活在线观看| 亚洲精品一区二区三区影院| 一区二区三区在线高清| 成人午夜电影网站| 日韩欧美在线综合网| 亚洲午夜在线电影| 不卡区在线中文字幕| 2017欧美狠狠色| 日本中文字幕不卡| 欧美影院午夜播放| 国产精品福利一区二区三区| 国产乱码精品一区二区三区av| 欧美高清视频不卡网| 樱桃视频在线观看一区| 成人黄色片在线观看| 国产午夜精品久久久久久免费视| 午夜精品久久久久久久久| 欧美综合色免费| 亚洲欧美区自拍先锋| 91精品国产综合久久久蜜臀粉嫩| 一区二区三区 在线观看视频| av日韩在线网站| 国产精品网站在线播放| 国产成人日日夜夜| 日本一区免费视频| 国产精品一区在线观看乱码| 欧美日韩www| 亚洲手机成人高清视频| 91在线国产福利| 亚洲欧美成人一区二区三区| 9i在线看片成人免费| 中文字幕一区二区三区色视频| 国产精品中文字幕一区二区三区| 久久婷婷国产综合国色天香 | 国产一区欧美二区| 2022国产精品视频| 国产综合成人久久大片91| 99国产麻豆精品| 亚洲黄网站在线观看| 在线观看日韩高清av| 亚洲成a人片在线观看中文| 欧美日韩免费在线视频| 欧美韩国日本一区| 91碰在线视频| 亚洲一区二区av在线| 91麻豆文化传媒在线观看| 亚洲欧洲av在线| 日本高清不卡一区| 天堂va蜜桃一区二区三区漫画版 | 制服丝袜亚洲色图| 久久国产精品72免费观看| 久久久青草青青国产亚洲免观| 国产乱子伦一区二区三区国色天香| 久久久一区二区| 91在线无精精品入口| 天堂一区二区在线| ww久久中文字幕| 色综合久久中文综合久久97| 亚洲成av人影院| 久久亚区不卡日本| 91美女片黄在线观看| 日韩精品久久久久久| 久久综合久久综合久久综合|