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:
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)
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;
}
/* 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);
/* ******************** 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;
}
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])
}
-/* 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
}
if (!BLI_exists(str) || saveover(str))
- BLO_write_runtime(str, twostrings->exename);
+ BLO_write_runtime(str, exename);
if (freestr)
MEM_freeN(freestr);
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
strcat(player, ".app");
#endif
- make_beautiful_animation((void *) &twostrings);
+ write_runtime(str, player);
}
/* end keyed functions */
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;
}