Re: [Plib-devel] Q2: Water
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-05-10 02:56:28
|
> Dave McClurg wrote: > > in ssg.h i found > > > virtual int getCareAbout ( int mode ) { return dont_care & (1<<mode) ; } > > doesn't that seem negated? Yes - it does doesn't it. It's suprising that things would work as well as they do with that error! Let me spend some more time reading the code to see what's going on here. > also, there are a couple old hacks/hooks in the model loaders: > > 1) hookfunc > typedef ssgBranch *(*ssgHookFunc)(char *) ; > ssgEntity *ssgLoadXXX ( char *fname, ssgHookFunc hookfunc = NULL, > ssgCreateFunc createfunc = NULL ) ; > > 2) _ssgGetAppState > ssgState *( *_ssgGetAppState)( char *) = NULL ; > void ssgSetAppStateCallback ( ssgState *(*cb)(char *) ) ; > > Are these hooks still used? #1 is only implemented in ssgLoadAC::do_data > so it seems odd to have it passed to all loaders. #2 could be easily > replaced with a leaf creation function. Perhaps they could go away in > Plib 1.3 ?? Perhaps - LOTS of apps use ssgGetAppState - and several of my programs use both...that they are missing in the other loaders is an omission in those loaders - not an indication of redundancy in LoadAC. For 1.3, it's possible that we should re-organize these into a more coherent set of things. I implemented 'hookfunc' first (as a parameter to the loader) and later realised that I needed getAppState too - but I didn't want to destroy compatibility by adding another parameter - so I used the registration function instead. There are plainly good reasons to add other callbacks too - so we should think this out a bit better in 1.3 and later. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |