⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fad.actions.h

📁 嵌入式linux环境下的一个FLASH播放器(支持FLASH7.0以下版本)
💻 H
字号:
/** * libFAD is the legal property of its developers, whose names are too numerous * to list here.  Please refer to the COPYRIGHT file distributed with this * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *  * $Id: fad.actions.h,v 1.5 2006/02/25 02:47:23 wrxzzj Exp $ */#ifndef __FAD_ACTIONS_H#define __FAD_ACTIONS_H#include "fad.h"#define STACK_CHUNK_MAX  512enum {  FAD_ACTIONCODE_ID_START,  FAD_ACTION3_NEXT_FRAME = 0x04,  FAD_ACTION3_PREV_FRAME = 0x05,  FAD_ACTION3_PLAY = 0x06,  FAD_ACTION3_STOP = 0x07,  FAD_ACTION3_TOGGLE_QUALITY = 0x08,  FAD_ACTION3_STOP_SOUNDS = 0x09,  FAD_ACTION4_ADD = 0x0a,  FAD_ACTION4_SUBTRACT = 0x0b,  FAD_ACTION4_MULTIPLY = 0x0c,  FAD_ACTION4_DIVIDE = 0x0d,  FAD_ACTION4_EQUALS = 0x0e,  FAD_ACTION4_LESS = 0x0f,  FAD_ACTION4_AND = 0x10,  FAD_ACTION4_OR = 0x11,  FAD_ACTION4_NOT = 0x12,  FAD_ACTION4_STRING_EQUALS = 0x13,  FAD_ACTION4_STRING_LENGTH = 0x14,  FAD_ACTION4_STRING_EXTRACT = 0x15,  FAD_ACTION4_POP = 0x17,  FAD_ACTION4_TO_INTEGER = 0x18,  FAD_ACTION4_GET_VARIABLE = 0x1c,  FAD_ACTION4_SET_VARIABLE = 0x1d,  FAD_ACTION4_SET_TARGET2 = 0x20,  FAD_ACTION4_STRING_ADD = 0x21,  FAD_ACTION4_GET_PROPERTY = 0x22,  FAD_ACTION4_SET_PROPERTY = 0x23,  FAD_ACTION4_CLONE_SPRITE = 0x24,  FAD_ACTION4_REMOVE_SPRITE = 0x25,  FAD_ACTION4_TRACE = 0x26,  FAD_ACTION4_START_DRAG = 0x27,  FAD_ACTION4_END_DRAG = 0x28,  FAD_ACTION4_STRING_LESS = 0x29,  FAD_ACTION7_THROW = 0x2a,  FAD_ACTION7_CASTOP = 0x2b,  FAD_ACTION7_IMPLEMENTSOP = 0x2c,  FAD_ACTION4_RANDOM_NUMBER = 0x30,  FAD_ACTION4_MBSTRING_LENGTH = 0x31,  FAD_ACTION4_CHAR_TO_ASCII = 0x32,  FAD_ACTION4_ASCII_TO_CHAR = 0x33,  FAD_ACTION4_GET_TIME = 0x34,  FAD_ACTION4_MBSTRING_EXTRACT = 0x35,  FAD_ACTION4_MBCHAR_TO_ASCII = 0x36,  FAD_ACTION4_MBASCII_TO_CHAR = 0x37,  FAD_ACTION5_DELETE = 0x3a,  FAD_ACTION5_DELETE2 = 0x3b,  FAD_ACTION5_DEFINE_LOCAL = 0x3c,  FAD_ACTION5_CALL_FUNCTION = 0x3d,  FAD_ACTION5_RETURN = 0x3e,  FAD_ACTION5_MODULO = 0x3f,  FAD_ACTION5_NEW_OBJECT = 0x40,  FAD_ACTION5_DEFINE_LOCAL2 = 0x41,  FAD_ACTION5_INIT_ARRAY = 0x42,  FAD_ACTION5_INIT_OBJECT = 0x43,  FAD_ACTION5_TYPEOF = 0x44,  FAD_ACTION5_TARGET_PATH = 0x45,  FAD_ACTION5_ENUMERATE = 0x46,  FAD_ACTION5_ADD2 = 0x47,  FAD_ACTION5_LESS2 = 0x48,  FAD_ACTION5_EQUALS2 = 0x49,  FAD_ACTION5_TO_NUMBER = 0x4a,  FAD_ACTION5_TO_STRING = 0x4b,  FAD_ACTION5_PUSH_DUPLICATE = 0x4c,  FAD_ACTION5_STACK_SWAP = 0x4d,  FAD_ACTION5_GET_MEMBER = 0x4e,  FAD_ACTION5_SET_MEMBER = 0x4f,  FAD_ACTION5_INCREMENT = 0x50,  FAD_ACTION5_DECREMENT = 0x51,  FAD_ACTION5_CALL_METHOD = 0x52,  FAD_ACTION5_NEW_METHOD = 0x53,  FAD_ACTION6_INSTANCEOF = 0x54,  FAD_ACTION6_ENUMERATE2 = 0x55,  FAD_ACTION5_BIT_AND = 0x60,  FAD_ACTION5_BIT_OR = 0x61,  FAD_ACTION5_BIT_XOR = 0x62,  FAD_ACTION5_BIT_LSHIFT = 0x63,  FAD_ACTION5_BIT_RSHIFT = 0x64,  FAD_ACTION5_BIT_URSHIFT = 0x65,  FAD_ACTION6_STRICT_EGUALS = 0x66,  FAD_ACTION6_GREATER = 0x67,  FAD_ACTION6_STRING_CREATER = 0x68,  FAD_ACTION7_EXTENDS = 0x69,  FAD_ACTION3_GOTO_FRAME = 0x81,  FAD_ACTION3_GET_URL = 0x83,  FAD_ACTION5_STORE_REGISTER = 0x87,  FAD_ACTION5_CONSTANT_POOL = 0x88,  FAD_ACTION3_WAITFOR_FRAME = 0x8a,  FAD_ACTION3_SET_TARGET = 0x8b,  FAD_ACTION3_GOTO_LABEL = 0x8c,  FAD_ACTION4_WAITFOR_FRAME2 = 0x8d,  FAD_ACTION7_DEFINE_FUNCTION2 = 0x8e,  FAD_ACTION7_TRY = 0x8f,  FAD_ACTION5_WITH = 0x94,  FAD_ACTION4_PUSH = 0x96,  FAD_ACTION4_JUMP = 0x99,  FAD_ACTION4_GET_URL2 = 0x9a,  FAD_ACTION5_DEFINE_FUNCTION = 0x9b,  FAD_ACTION4_IF = 0x9d,  FAD_ACTION4_CALL = 0x9e,  FAD_ACTION4_GOTO_FRAME2 = 0x9f,  FAD_ACTIONCODE_ID_END};enum {  AS2_TYPE_STRING = 0,  AS2_TYPE_FLOAT = 1,  AS2_TYPE_REGISTERNUMBER = 4,  AS2_TYPE_BOOLEAN = 5,  AS2_TYPE_DOUBLE = 6,  AS2_TYPE_INTEGER = 7,  AS2_TYPE_CONSTANT8 = 8,  AS2_TYPE_CONSTANT16 = 9};typedef struct {  u8_t type;  union {    char*  str;    float  f;    u8_t   reg;    u8_t   b;    double d;    u32_t  i;    u8_t   c8;    u16_t  c16;  } val;} as_object_t;typedef struct _fad_stack_chunk fad_stack_chunk_t;struct _fad_stack_chunk {  as_object_t objs[STACK_CHUNK_MAX];  fad_stack_chunk_t *next, *prev;};typedef struct {  s32_t top;  fad_stack_chunk_t *hdr, *curr;} fad_actions_stack_t;typedef struct {  /**actions bytecode stream pointer*/  bits_t *bc;  /**current bytecode program counter*/  u32_t pc;  /**FAD frame pointer*/  fad_frame_t *frame;  /**FAD stream pointer*/  fad_stream_t *stream;  /**actionscript2 data stack, support push/pop*/  fad_actions_stack_t fas;} fad_actions_context_t;void fad_actions_context_init(fad_actions_context_t *fac, fad_frame_t *frame, fad_stream_t *stream);void fad_actions_context_finish(fad_actions_context_t *fac);s32_t action_script_decode(fad_frame_t* frame, fad_stream_t* s);void  action_script_exec(fad_actions_context_t *fac, u8_t *asr);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -