func init // adds using namespace sys.add_use('Un4seen.Bass') // initialize a member if(not isdef('Name')) sys.add_var(this.name, 'BASSFlag') blk_init.println(this.codename, ' = ', this.BASSFlag(), ';') end end func BASSFlag() v = this.props('BASSFlag').value flags = ((v _and_ 1) ? '|BASSFlag.BASS_DEFAULT' : '') + ((v _and_ 2) ? '|BASSFlag.BASS_SAMPLE_8BITS' : '') + ((v _and_ 4) ? '|BASSFlag.BASS_SAMPLE_MONO' : '') + ((v _and_ 8) ? '|BASSFlag.BASS_SAMPLE_LOOP' : '') + ((v _and_ 16) ? '|BASSFlag.BASS_SAMPLE_3D' : '') + ((v _and_ 32) ? '|BASSFlag.BASS_SAMPLE_SOFTWARE' : '') + ((v _and_ 64) ? '|BASSFlag.BASS_SAMPLE_MUTEMAX' : '') + ((v _and_ 128) ? '|BASSFlag.BASS_SAMPLE_VAM' : '') + ((v _and_ 256) ? '|BASSFlag.BASS_SAMPLE_FX' : '') + ((v _and_ 512) ? '|BASSFlag.BASS_SAMPLE_FLOAT' : '') return('(0' + flags + ')') end