diff options
author | Daniel Dunbar <daniel@zuster.org> | 2003-03-24 00:42:31 +0300 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2003-03-24 00:42:31 +0300 |
commit | e0cec3d2c46234490c64c22f86bd9a4ed77edb73 (patch) | |
tree | 4c5e80ce309905a544df11941419070ff2ab1369 /source/blender | |
parent | 05afb0639729fa394e533200f5cd951ddefefc0d (diff) |
Removed NLA winqread and write runtime obfuscation cruft.
Can we just dump all this silly key stuff please?
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/include/keyed_functions.h | 12 | ||||
-rw-r--r-- | source/blender/src/cre/license_key.c | 4 | ||||
-rw-r--r-- | source/blender/src/editnla.c | 46 | ||||
-rw-r--r-- | source/blender/src/headerbuttons.c | 47 | ||||
-rw-r--r-- | source/blender/src/pub/license_key.c | 4 |
5 files changed, 13 insertions, 100 deletions
diff --git a/source/blender/include/keyed_functions.h b/source/blender/include/keyed_functions.h index 82640041327..405fec16992 100644 --- a/source/blender/include/keyed_functions.h +++ b/source/blender/include/keyed_functions.h @@ -41,9 +41,7 @@ functions too easily, some of those functions have nonsense names. */ -#define key_func1 make_beautiful_animation -#define key_func2 key_return_true -#define key_func3 calc_memleak +#define key_func1 key_return_true /* add the corresponding function pointer defines here. Example: @@ -56,11 +54,5 @@ license_key.c:init_ftable() if necessary. */ -#define KEY_WRITE_RUNTIME KEY_GETPTR(KEY_FUNC1) -#define KEY_RETURN_TRUE KEY_GETPTR(KEY_FUNC2) -#define KEY_NLA_EVENT KEY_GETPTR(KEY_FUNC3) - -/* PROTOS */ -int make_beautiful_animation(void *vp); -int calc_memleak (void* ptr); +#define KEY_RETURN_TRUE KEY_GETPTR(KEY_FUNC1) diff --git a/source/blender/src/cre/license_key.c b/source/blender/src/cre/license_key.c index a5b4f015499..6b76aef6b95 100644 --- a/source/blender/src/cre/license_key.c +++ b/source/blender/src/cre/license_key.c @@ -129,10 +129,8 @@ static void init_ftable(void) // initializes functiontable int i; g_functab[0] = &key_func1; - g_functab[1] = &key_func2; - g_functab[2] = &key_func3; - for (i = 3; i < PYKEY_TABLEN; i++) + for (i = 1; i < PYKEY_TABLEN; i++) { g_functab[i] = &sticky_shoes; } diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c index 45aef9295ba..34522a80959 100644 --- a/source/blender/src/editnla.c +++ b/source/blender/src/editnla.c @@ -88,11 +88,6 @@ /* Note: A lot of these pretty much duplicate the behaviour of the action windows. The functions should be shared, not copy-pasted */ -typedef struct NlaParam{ - SpaceNla *snla; - unsigned short event; - short val; -}NlaParam; static void deselect_nlachannel_keys (int test); static void deselect_nlachannels(int test); @@ -116,28 +111,16 @@ extern int nla_filter (Base* base, int flags); /* From drawnla.c */ /* ******************** SPACE: NLA ********************** */ -/* Protected creator function */ -int calc_memleak (void* ptr){ +void winqreadnlaspace(unsigned short event, short val, char ascii) +{ + SpaceNla *snla = curarea->spacedata.first; int doredraw= 0; short mval[2]; float dx,dy; int cfra; - SpaceNla *snla; - NlaParam *params=(NlaParam*) ptr; - unsigned short event; - short val ; - - if (!ptr) - return -1; - - snla= params->snla; - event = params->event; - val = params->val; - if(curarea->win==0) return 0; - - if (!snla) - return 0; + if (curarea->win==0) return; + if (!snla) return; if(val) { if( uiDoBlocks(&curarea->uiblocks, event)!=UI_NOTHING ) event= 0; @@ -239,25 +222,6 @@ int calc_memleak (void* ptr){ } if(doredraw) scrarea_queue_winredraw(curarea); - return 0; -} - -void winqreadnlaspace(unsigned short event, short val, char ascii) -{ - NlaParam param; - Base *base; - bActionStrip *strip, *next; - short mval[2]; - float dx, dy; - int cfra; - - param.event = event; - param.val = val; - param.snla = curarea->spacedata.first; - - - /* Call the protected (&obfuscated) eventloop function */ - calc_memleak(¶m); /* enable NLA */ } static void convert_nla(short mval[2]) diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c index ae899974c87..a6d2ce57a61 100644 --- a/source/blender/src/headerbuttons.c +++ b/source/blender/src/headerbuttons.c @@ -2119,30 +2119,9 @@ static void check_packAll() } -/* KEYED FUNCTIONS - --------------- */ - -/* this function name is meaningless and only called that way for some - obscurity - It is called by a function table from the license_key; - see include/keyed_functions.h -*/ - -struct twostrings -{ - char *outname; - char *exename; -}; - -/** This function is called for writing runtimes. - * It's locked behind the key and called through a function table - * which is initialized properly by the Python key code (if valid) - */ -int make_beautiful_animation(void *vp) +int write_runtime(char *str, char *exename) { char *freestr= NULL; - struct twostrings *twostrings = (struct twostrings *) vp; - char *str = twostrings->outname; char *ext = 0; #ifdef _WIN32 @@ -2160,7 +2139,7 @@ int make_beautiful_animation(void *vp) } if (!BLI_exists(str) || saveover(str)) - BLO_write_runtime(str, twostrings->exename); + BLO_write_runtime(str, exename); if (freestr) MEM_freeN(freestr); @@ -2168,33 +2147,15 @@ int make_beautiful_animation(void *vp) return 0; } -/* -int make_nice_software(void) -{ - Fptr f = KEY_RETURN_TRUE; - if (f) return f(0); - else return 0; -} -*/ - static void write_runtime_check_dynamic(char *str) { - struct twostrings twostrings; - - twostrings.outname = str; - twostrings.exename = "blenderdynplayer.exe"; - - make_beautiful_animation((void *) &twostrings); + write_runtime(str, "blenderdynplayer.exe"); } static void write_runtime_check(char *str) { - struct twostrings twostrings; char player[128]; - twostrings.outname = str; - twostrings.exename = player; - strcpy(player, "blenderplayer"); #ifdef _WIN32 @@ -2205,7 +2166,7 @@ static void write_runtime_check(char *str) strcat(player, ".app"); #endif - make_beautiful_animation((void *) &twostrings); + write_runtime(str, player); } /* end keyed functions */ diff --git a/source/blender/src/pub/license_key.c b/source/blender/src/pub/license_key.c index de8caee1b01..72977e591b4 100644 --- a/source/blender/src/pub/license_key.c +++ b/source/blender/src/pub/license_key.c @@ -210,11 +210,9 @@ static void init_ftable(void) // initializes functiontable int i; g_functab[0] = &key_func1; - g_functab[1] = &key_func2; - g_functab[2] = &key_func3; /* add more key_funcs here */ - for (i = 3; i < PYKEY_TABLEN; i++) + for (i = 1; i < PYKEY_TABLEN; i++) { g_functab[i] = &sticky_shoes; } |