dynamic_var.c.svn-base

来自「A Flash Player with ActionScript support」· SVN-BASE 代码 · 共 43 行

SVN-BASE
43
字号
#include "base_types.h"#include "config.h"#include "define.h"#include "movie_clips_def.h"#include "swf_file_pub.h"#include "dynamic_text_def.h"#include "static_text_def.h"#include "dynamic_text_ins.h"#include "font_def.h"#include <stdlib.h>extern player_t      *player_p;char* dvar_get_value(char* name_p) {    swf_file_t	*swf_p = player_p->_level0_p;    char	*value_p = NULL;    char	*p = NULL;    p = g_ascii_strdown(name_p,-1);    value_p = g_datalist_get_data(&swf_p->dvar_list_p,p);    free(p);    return value_p;};void dvar_set_value(char* name_p,char* value_p) {    swf_file_t	*swf_p = player_p->_level0_p;    char	*old_value_p = NULL;    char	*p = NULL;    p = g_ascii_strdown(name_p,-1);    old_value_p =  g_datalist_get_data(&swf_p->dvar_list_p,p);    if (old_value_p) {        free(old_value_p);    };    if (value_p == NULL) {        value_p = "";    };    printf("create var %s value %s \n",p,value_p);    g_datalist_set_data(&swf_p->dvar_list_p,p,g_strdup(value_p));    free(p);};

⌨️ 快捷键说明

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