blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
5
146
content_id
stringlengths
40
40
detected_licenses
listlengths
0
7
license_type
stringclasses
2 values
repo_name
stringlengths
6
79
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
4 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.07k
426M
star_events_count
int64
0
27
fork_events_count
int64
0
12
gha_license_id
stringclasses
3 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
6 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
1 class
length_bytes
int64
20
6.28M
extension
stringclasses
20 values
content
stringlengths
20
6.28M
authors
listlengths
1
16
author_lines
listlengths
1
16
ac94bb1028405ca328fa3527a70fb701e3b44e7f
cf58ec40b7ea828aba01331ee3ab4c7f2195b6ca
/Nestopia/core/board/NstBoardJyCompany.hpp
fa5ab68f9f7b6b81a5c40643c2290d6e629425d2
[]
no_license
nicoya/OpenEmu
e2fd86254d45d7aa3d7ef6a757192e2f7df0da1e
dd5091414baaaddbb10b9d50000b43ee336ab52b
refs/heads/master
2021-01-16T19:51:53.556272
2011-08-06T18:52:40
2011-08-06T18:52:40
2,131,312
1
0
null
null
null
null
UTF-8
C++
false
false
5,617
hpp
//////////////////////////////////////////////////////////////////////////////////////// // // Nestopia - NES/Famicom emulator written in C++ // // Copyright (C) 2003-2008 Martin Freij // // This file is part of Nestopia. // // Nestopia is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // Nestopia is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Nestopia; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // //////////////////////////////////////////////////////////////////////////////////////// #ifndef NST_BOARD_JYCOMPANY_H #define NST_BOARD_JYCOMPANY_H #ifdef NST_PRAGMA_ONCE #pragma once #endif namespace Nes { namespace Core { namespace Boards { namespace JyCompany { class Standard : public Board { public: Standard(const Context&); private: enum DefaultDipSwitch { DEFAULT_DIP_NMT_OFF, DEFAULT_DIP_NMT_CONTROLLED, DEFAULT_DIP_NMT_ON }; class CartSwitches : public DipSwitches { public: CartSwitches(uint,bool); inline uint GetSetting() const; inline bool IsPpuLatched() const; private: uint NumDips() const; uint NumValues(uint) const; cstring GetDipName(uint) const; cstring GetValueName(uint,uint) const; uint GetValue(uint) const; void SetValue(uint,uint); uint data; const ibool ppuLatched; }; enum { DIPSWITCH_NMT = 0x03, DIPSWITCH_GAME = 0xC0 }; void SubReset(bool); void SubSave(State::Saver&) const; void SubLoad(State::Loader&,dword); void UpdatePrg(); void UpdateChr() const; void UpdateChrLatch() const; void UpdateExChr(); void UpdateNmt(); Device QueryDevice(DeviceType); void Sync(Event,Input::Controllers*); NES_DECL_HOOK( HActive ); NES_DECL_HOOK( HBlank ); NES_DECL_ACCESSOR( Chr_0000 ); NES_DECL_ACCESSOR( Chr_1000 ); NES_DECL_PEEK( 5000 ); NES_DECL_PEEK( 6000 ); NES_DECL_POKE( 8000 ); NES_DECL_POKE( 9000 ); NES_DECL_POKE( A000 ); NES_DECL_POKE( B000 ); NES_DECL_POKE( B004 ); NES_DECL_POKE( C000 ); NES_DECL_POKE( C001 ); NES_DECL_POKE( C002 ); NES_DECL_POKE( C003 ); NES_DECL_POKE( C004 ); NES_DECL_POKE( C005 ); NES_DECL_POKE( C006 ); NES_DECL_POKE( D000 ); NES_DECL_POKE( D001 ); NES_DECL_POKE( D002 ); NES_DECL_POKE( D003 ); struct Regs { void Reset(); enum { CTRL0_PRG_MODE = 0x03, CTRL0_PRG_SWAP_32K = 0x00, CTRL0_PRG_SWAP_16K = 0x01, CTRL0_PRG_SWAP_8K = 0x02, CTRL0_PRG_SWAP_8K_R = 0x03, CTRL0_PRG_NOT_LAST = 0x04, CTRL0_CHR_MODE = 0x18, CTRL0_CHR_SWAP_8K = 0x00, CTRL0_CHR_SWAP_4K = 0x08, CTRL0_CHR_SWAP_2K = 0x10, CTRL0_CHR_SWAP_1K = 0x18, CTRL0_NMT_CHR = 0x20, CTRL0_NMT_CHR_ROM = 0x40, CTRL0_PRG6_ENABLE = 0x80, CTRL1_MIRRORING = 0x03, CTRL2_NMT_USE_RAM = 0x80, CTRL3_NO_EX_CHR = 0x20, CTRL3_EX_CHR_0 = 0x01, CTRL3_EX_CHR_1 = 0x18, CTRL3_EX_PRG = 0x06 }; NES_DECL_PEEK( 5001 ); NES_DECL_PEEK( 5800 ); NES_DECL_POKE( 5800 ); NES_DECL_POKE( 5801 ); NES_DECL_PEEK( 5801 ); NES_DECL_POKE( 5803 ); NES_DECL_PEEK( 5803 ); uint mul[2]; uint tmp; uint ctrl[4]; }; struct Banks { void Reset(); static uint Unscramble(uint); uint prg[4]; uint chr[8]; uint nmt[4]; struct { uint mask; uint bank; } exChr; const byte* prg6; uint chrLatch[2]; }; struct Irq { struct A12 { explicit A12(Irq&); void Reset(bool); bool Clock(); Irq& base; }; struct M2 { explicit M2(Irq&); void Reset(bool); bool Clock(); Irq& base; }; Irq(Cpu&,Ppu&); void Reset(); bool IsEnabled() const; bool IsEnabled(uint) const; bool Clock(); inline void Update(); enum { TOGGLE = 0x01, MODE_SOURCE = 0x03, MODE_M2 = 0x00, MODE_PPU_A12 = 0x01, MODE_PPU_READ = 0x02, MODE_CPU_WRITE = 0x03, MODE_SCALE_3BIT = 0x04, MODE_SCALE_ADJUST = 0x08, MODE_COUNT_ENABLE = 0xC0, MODE_COUNT_UP = 0x40, MODE_COUNT_DOWN = 0x80 }; uint enabled; uint mode; uint prescaler; uint scale; uint count; uint flip; ClockUnits::A12<A12> a12; ClockUnits::M2<M2> m2; }; Regs regs; Banks banks; Irq irq; CartSwitches cartSwitches; }; } } } } #endif
[ [ [ 1, 245 ] ] ]
1db009f3c9f4ca2058f4c993b289e96a16d10244
188058ec6dbe8b1a74bf584ecfa7843be560d2e5
/GodDK/nio/ByteBuffer.cxx
c835bde549adb4abdd557cefbb67cca34050e73d
[]
no_license
mason105/red5cpp
636e82c660942e2b39c4bfebc63175c8539f7df0
fcf1152cb0a31560af397f24a46b8402e854536e
refs/heads/master
2021-01-10T07:21:31.412996
2007-08-23T06:29:17
2007-08-23T06:29:17
36,223,621
0
0
null
null
null
null
UTF-8
C++
false
false
7,785
cxx
#ifdef HAVE_CONFIG_H # include "config.h" #endif #include "nio/ByteBuffer.h" #include "bits.h" using namespace goddk::nio; const int nMaxCapacity = 65536; ByteBuffer::fakebytearray::~fakebytearray() { _data = 0; _size = 0; } void ByteBuffer::fakebytearray::set(byte* data, size_t size)throw () { _data = data; _size = size; } ByteBuffer::ByteBuffer(size_t capacity) throw (std::bad_alloc) : Buffer(capacity, capacity, false) { bOutData = false; if(capacity > nMaxCapacity) throw std::bad_alloc(); bigEndian = true; if(capacity > 0) { _data = (byte*) malloc(capacity); if (!_data) throw std::bad_alloc(); } else { _data = 0; } _fake.set(_data, _capacity); } ByteBuffer::ByteBuffer(const byte* data, size_t capacity): Buffer(capacity, capacity, false) { bOutData = false; if(capacity > nMaxCapacity) throw std::bad_alloc(); bigEndian = true; _data = (byte*) malloc(capacity); if (!_data) throw std::bad_alloc(); _fake.set(_data, _capacity); memcpy(_data, data, capacity); position(capacity); } ByteBuffer::~ByteBuffer() { if (_data && !bOutData && GodIsValidAddress(_data)) { free(_data); _data = 0; } } ByteBuffer* ByteBuffer::wrap(const byte* data, size_t capacity) { ByteBuffer* buf = new ByteBuffer(0); buf->bOutData = true; buf->_capacity = capacity; buf->_limit = capacity; buf->_position = 0; buf->_marked = false; buf->_readonly = true; buf->_offset = 0; buf->_mark = 0; buf->_data = (byte*)data; buf->_fake.set(buf->_data, buf->_capacity); return buf; } ByteBuffer* ByteBuffer::allocateDirect(size_t capacity) throw (std::bad_alloc) { return new ByteBuffer(capacity); } ByteBuffer* ByteBuffer::allocate(const byte* data, size_t capacity) throw (std::bad_alloc) { return new ByteBuffer(data, capacity); } ByteBuffer* ByteBuffer::allocate(size_t capacity) throw (std::bad_alloc) { return new ByteBuffer(capacity); } ByteBuffer* ByteBuffer::wrap(bytearray* v) { return new ByteBuffer(v->data(), v->size()); } bytearray& ByteBuffer::array() throw (ReadOnlyBufferException, UnsupportedOperationException) { // if (_readonly) // throw ReadOnlyBufferException(); return _fake; } const bytearray& ByteBuffer::array() const throw (UnsupportedOperationException) { return _fake; } size_t ByteBuffer::arrayOffset() const throw (ReadOnlyBufferException, UnsupportedOperationException) { // if (_readonly) // throw ReadOnlyBufferException(); return _position; } ByteBufferPtr ByteBuffer::asReadOnlyBuffer() { ByteBuffer* bb = duplicate(); bb->_readonly = true; ByteBufferPtr result; result.Attach(bb); return result; } void ByteBuffer::fill(byte v, size_t size) { if(_position > _capacity - size || _readonly) THROWEXCEPTIONPTR1(IllegalArgumentException,"position greater than limit"); for (int i = _position; i < (size+_position); i++) _data[i] = v; _position += size; } void ByteBuffer::put(bytearray& bytes, int pos ,int len) throw() { autoExpand(len); if(_position > _capacity - len || _readonly) THROWEXCEPTIONPTR1(IllegalArgumentException,"position greater than limit"); memcpy(&_data[_position],&bytes[pos] , len); _position += len; } void ByteBuffer::put(bytearray& bytes) throw() { autoExpand(bytes.size()); if(_position > _capacity - bytes.size() || _readonly) THROWEXCEPTIONPTR1(IllegalArgumentException,"position greater than limit"); memcpy(&_data[_position],&bytes[0] , bytes.size()); _position += bytes.size(); } void ByteBuffer::put(ByteBuffer* in) throw() { autoExpand(in->remaining()); int pos = in->position(); int lim = in->limit(); int rem = lim - pos; if(rem > remaining()) rem = remaining(); if(!in || _position > (int)_capacity - rem || _readonly) THROWEXCEPTIONPTR1(IllegalArgumentException,"position greater than limit"); memcpy(&_data[_position],& (in->array().data()[pos]), rem); _position += rem; in->position(pos + rem); } void ByteBuffer::get(bytearray& bytes) throw() { if(_position > _capacity - bytes.size()) THROWEXCEPTIONPTR1(IllegalArgumentException,"position greater than limit"); memcpy(&bytes[0], &_data[_position], bytes.size()); _position += bytes.size(); } void ByteBuffer::get(bytearray& bytes, int pos ,int len) throw() { if(_position > _capacity - len) THROWEXCEPTIONPTR1(IllegalArgumentException,"position greater than limit"); memcpy(&bytes[pos], &_data[_position], len); _position += len; } jushort ByteBuffer::getUnsignedShort() throw() { return getShort() & 0xffff; } ByteBuffer* ByteBuffer::compact()throw() { memmove(&_data[ix(0)], &_data[ix(position())], remaining()); position(remaining()); limit(capacity()); return this; } ByteBuffer* ByteBuffer::slice()throw() { memcpy(&_data[ix(0)], &_data[ix(position())], remaining()); position(remaining()); limit(capacity()); return this; } ByteBuffer* ByteBuffer::duplicate()throw() { ByteBuffer *newbuf = ByteBuffer::allocate(capacity()); newbuf->_capacity = this->_capacity; newbuf->_limit = this->_limit; newbuf->_mark = this->_mark; newbuf->_position = this->_position; newbuf->_marked = this->_marked; newbuf->_readonly = this->_readonly; memcpy(newbuf->_data, this->_data, limit()); return newbuf; } int ByteBuffer::skip(int n) throw () { if (n == 0) return 0; int canskip = _limit - _position; if (canskip > 0) { if (n < canskip) { canskip = n; } _position += canskip; n -= canskip; } if (n > 0) { canskip += n; _position += n; } return canskip; } bool ByteBuffer::isDirect() const throw () { return true; } bool ByteBuffer::hasArray() const throw () { return !_readonly; } int ByteBuffer::compareTo(const ByteBuffer& compare) const throw () { if (_capacity == 0) { if (compare._capacity == 0) { return 0; } else { return -1; } } else { if (compare._capacity == 0) { return 1; } else if (_capacity == compare._capacity) { return memcmp(_data, compare._data, _capacity); } else if (_capacity < compare._capacity) { if (memcmp(_data, compare._data, _capacity) == 0) return 1; else return -1; } else { if (memcmp(_data, compare._data, compare._capacity) == 0) return -1; else return 1; } } } const ByteOrder& ByteBuffer::order() const throw () { return bigEndian ? ByteOrder::BIG_ENDIAN : ByteOrder::LITTLE_ENDIAN; } void ByteBuffer::order(ByteOrder& o) throw () { } ByteBuffer* ByteBuffer::autoExpand( int expectedRemaining ) { if( isAutoExpand() ) { expand( expectedRemaining ); } return this; } ByteBuffer* ByteBuffer::expand( int expectedRemaining ) { return expand( position(), expectedRemaining ); } ByteBuffer* ByteBuffer::expand( int pos, int expectedRemaining ) { int end = pos + expectedRemaining; if( end > capacity() ) { capacity1( end ); } if( end > limit() ) { buf()->limit( end ); } return this; } ByteBuffer* ByteBuffer::capacity1( int newCapacity ) { if( newCapacity > capacity() ) { int pos = position(); int lim = limit(); capacity0( newCapacity ); buf()->limit( lim ); if( _mark >= 0 ) { buf()->position( _mark ); buf()->mark(); } buf()->position( pos ); } return this; } ByteBuffer* ByteBuffer::capacity0( int newCapacity ) { byte* _newdata = (byte*) malloc(newCapacity); if (!_newdata) throw std::bad_alloc(); memcpy(_newdata, _data, _capacity); free(_data); _data = _newdata; _capacity = newCapacity; _fake.set(_data, _capacity); return this; }
[ "soaris@46205fef-a337-0410-8429-7db05d171fc8" ]
[ [ [ 1, 365 ] ] ]
687d20598d9e24cdb0312c8482e9ce9bed56c6db
073dfce42b384c9438734daa8ee2b575ff100cc9
/RCF/include/RCF/Version.hpp
a11418933c780d0a7da9a83f3677d2ff897c840c
[]
no_license
r0ssar00/iTunesSpeechBridge
a489426bbe30ac9bf9c7ca09a0b1acd624c1d9bf
71a27a52e66f90ade339b2b8a7572b53577e2aaf
refs/heads/master
2020-12-24T17:45:17.838301
2009-08-24T22:04:48
2009-08-24T22:04:48
285,393
1
0
null
null
null
null
UTF-8
C++
false
false
1,521
hpp
//****************************************************************************** // RCF - Remote Call Framework // Copyright (c) 2005 - 2009, Jarl Lindrud. All rights reserved. // Consult your license for conditions of use. // Version: 1.1 // Contact: jarl.lindrud <at> gmail.com //****************************************************************************** #ifndef INCLUDE_RCF_VERSION_HPP #define INCLUDE_RCF_VERSION_HPP #include <RCF/Export.hpp> // RCF 0.9c - 903 // RCF 0.9d - 9040 // RCF 1.0 - 10000 // RCF 1.1 - 11000 #define RCF_VERSION 11000 namespace RCF { // legacy - version number 1 // 2007-04-26 - version number 2 // Released in 0.9c // 2008-03-29 - version number 3 // - Using I_SessionObjectFactory instead of I_ObjectFactoryService for session object creation and deletion. // Released in 0.9d // 2008-09-06 - version number 4 // - ByteBuffer compatible with std::vector etc. // Released in 1.0 // 2008-12-06 - version number 5 // - Pingback field in MethodInvocationRequest // Released in 1.1 RCF_EXPORT int getRuntimeVersionInherent(); RCF_EXPORT int getRuntimeVersion(); RCF_EXPORT void setRuntimeVersion(int version); // In the context of a remote call (server side or client side), retrieve // the currently negotiated runtime version. RCF_EXPORT int getMyRuntimeVersion(); } // namespace RCF #endif // ! INCLUDE_RCF_VERSION_HPP
[ [ [ 1, 51 ] ] ]
18cc9721cd98005d79567b36e46e8875f705c62b
fe413f8747ddddc011f4dd6783cc084881da870a
/Code/application/PlugIns/src/Pictures/Jpeg2000Page.cpp
ec6ce5b170230d8be5cec614409f6a81c5392280
[]
no_license
GRSEB9S/opticks-cmake
f070b7ee32e5fff03de673c178cd6894113bc50b
497f89ccbcbf50c83304606eb586302eec3e6651
refs/heads/master
2021-05-27T08:16:26.027755
2011-08-13T06:03:04
2011-08-13T06:03:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,794
cpp
/* * The information in this file is * Copyright(c) 2007 Ball Aerospace & Technologies Corporation * and is subject to the terms and conditions of the * GNU Lesser General Public License Version 2.1 * The license text is available from * http://www.gnu.org/licenses/lgpl.html */ #include "AppConfig.h" #if defined (JPEG2000_SUPPORT) #include "Jpeg2000Page.h" #include "Jpeg2000Pager.h" #include <functional> #include <algorithm> using namespace std; Jpeg2000Page::Jpeg2000Page(Jpeg2000Cache::CacheUnit* pCacheUnit, size_t offset, unsigned int rowSkip, unsigned int columnSkip, unsigned int bandSkip) : mpCacheUnit(pCacheUnit), mStartBlock(0), mEndBlock(0), mOffset(offset), mRowSkip(rowSkip), mColumnSkip(columnSkip), mBandSkip(bandSkip) { if (pCacheUnit != NULL) { mStartBlock = *min_element(pCacheUnit->blockNumbers().begin(), pCacheUnit->blockNumbers().end()); mEndBlock = *max_element(pCacheUnit->blockNumbers().begin(), pCacheUnit->blockNumbers().end()); } } Jpeg2000Page::~Jpeg2000Page() { if (mpCacheUnit != NULL) { mpCacheUnit->release(); } } void *Jpeg2000Page::getRawData() { if (mpCacheUnit == NULL) { return NULL; } return mpCacheUnit->data() + mOffset; } unsigned int Jpeg2000Page::getNumRows() { return mRowSkip; } unsigned int Jpeg2000Page::getNumColumns() { return mColumnSkip; } unsigned int Jpeg2000Page::getNumBands() { return mBandSkip; } unsigned int Jpeg2000Page::getInterlineBytes() { return 0; } unsigned int Jpeg2000Page::getStartBlock() const { return mStartBlock; } unsigned int Jpeg2000Page::getEndBlock() const { return mEndBlock; } #endif
[ [ [ 1, 85 ] ] ]
dc16f5c3ac3d6181dae4fb8a01d39956eac46f9d
7d349e6342c084a4d11234a0aa0846db41c50303
/themeagent/ThemeList.h
312ed3a00eb1cc20b9ece05b7d3875859ab140ac
[]
no_license
Tobbe/themeagent
8f72641228a9cbb4c57e3bcd7475aee5f755eb3d
cbdbf93859ee7ef5d43330da7dd270f7b966f0b2
refs/heads/master
2020-12-24T17:44:42.819782
2009-04-18T22:38:58
2009-04-18T22:38:58
97,412
3
0
null
null
null
null
UTF-8
C++
false
false
656
h
#ifndef THEME_LIST_H_ #define THEME_LIST_H_ #include "Theme.h" #include "NullTheme.h" #include "Observable.h" #include <vector> #include <string> #include <windows.h> class ThemeList : public Observable { private: std::vector<Theme> themeList; NullTheme nullTheme; bool isDir(const WIN32_FIND_DATA &wfd) const; bool fileExists(const std::string &path) const; public: ThemeList(std::string themesDir); size_t addTheme(Theme t); bool removeTheme(const Theme &t); void writeToFile(std::string path) const; size_t size() const; const Theme &operator[](size_t index) const; Theme &operator[](size_t index); }; #endif
[ [ [ 1, 29 ] ] ]
6abbecdc2a84c84e4fa18209cc99a2f8dfaf1507
f8b364974573f652d7916c3a830e1d8773751277
/emulator/allegrex/instructions/VADD.h
2b4b54dad591b6b394ed30b5bea3e1691f1e22f5
[]
no_license
lemmore22/pspe4all
7a234aece25340c99f49eac280780e08e4f8ef49
77ad0acf0fcb7eda137fdfcb1e93a36428badfd0
refs/heads/master
2021-01-10T08:39:45.222505
2009-08-02T11:58:07
2009-08-02T11:58:07
55,047,469
0
0
null
null
null
null
UTF-8
C++
false
false
1,035
h
template< > struct AllegrexInstructionTemplate< 0x60000000, 0xff800000 > : AllegrexInstructionUnknown { static AllegrexInstructionTemplate &self() { static AllegrexInstructionTemplate insn; return insn; } static AllegrexInstruction *get_instance() { return &AllegrexInstructionTemplate::self(); } virtual AllegrexInstruction *instruction(u32 opcode) { return this; } virtual char const *opcode_name() { return "VADD"; } virtual void interpret(Processor &processor, u32 opcode); virtual void disassemble(u32 address, u32 opcode, char *opcode_name, char *operands, char *comment); protected: AllegrexInstructionTemplate() {} }; typedef AllegrexInstructionTemplate< 0x60000000, 0xff800000 > AllegrexInstruction_VADD; namespace Allegrex { extern AllegrexInstruction_VADD &VADD; } #ifdef IMPLEMENT_INSTRUCTION AllegrexInstruction_VADD &Allegrex::VADD = AllegrexInstruction_VADD::self(); #endif
[ [ [ 1, 41 ] ] ]
6b309dabbff08a3c903421c48269e64ce9e5f307
fcdddf0f27e52ece3f594c14fd47d1123f4ac863
/terralib/src/DSDK/include/base/lti_sample.h
5690a2091cbfbd04b604ead3245ebfbdcb6663bb
[]
no_license
radtek/terra-printer
32a2568b1e92cb5a0495c651d7048db6b2bbc8e5
959241e52562128d196ccb806b51fda17d7342ae
refs/heads/master
2020-06-11T01:49:15.043478
2011-12-12T13:31:19
2011-12-12T13:31:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,976
h
/* $Id: lti_sample.h 5124 2006-10-27 11:40:40Z lubia $ */ /* ////////////////////////////////////////////////////////////////////////// // // // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, // // Suite 200, Seattle, WA 98104. Unauthorized use or distribution // // prohibited. Access to and use of this code is permitted only under // // license from LizardTech, Inc. Portions of the code are protected by // // US and foreign patents and other filings. All Rights Reserved. // // // ////////////////////////////////////////////////////////////////////////// */ /* PUBLIC */ #ifndef LTI_SAMPLE_H #define LTI_SAMPLE_H // lt_lib_mrsid_core #include "lti_types.h" #if defined(LT_COMPILER_MS) #pragma warning(push,4) #endif LT_BEGIN_NAMESPACE(LizardTech) /** * basic properties of a sample * * This class stores the basic properties of a sample: the color and the * datatype. A set of one or more (possibly dissimilar) LTISample objects is * used in the representation of a pixel (LTIPixel). */ class LTISample { public: /** * default constructor * * This constructor creates an LTISample object with the given * properties. * * @param color the sample's color * @param dataType the datatype of the sample * @param data initial data for sample value (defaults to 0) */ LTISample(LTIColor color, LTIDataType dataType, const void* data=0); LTISample(); /** * copy constructor */ LTISample(const LTISample&); /** * destructor */ virtual ~LTISample(); /** * assignment operator */ virtual LTISample& operator=(const LTISample&); /** * equality operator */ bool operator==(const LTISample&) const; /** * equality operator */ bool operator!=(const LTISample&) const; /** * sets the precision of the sample * * Sets the precision of the sample. By default, the number of bits of * precision is equal to the number of bits in the underlying datatype. * * @note The data is assumed to be justified to the least significant bit * of the word. * * @param precision the number of bits */ void setPrecision(lt_uint32 precision); /** * returns the precision of the sample * * Returns the precision of the sample. * * @return the number of bits used in the datatype */ lt_uint32 getPrecision() const; /** * get the sample datatype * * This function returns the datatype of the sample. * * @return the datatype of the sample */ LTIDataType getDataType() const; /** * get the color * * This function returns the color of the sample. * * @return the color of the sample */ LTIColor getColor() const; /** * get the size of a sample * * This function returns the size of the sample, in bytes. * * This is equivalent to calling LTITypes::getNumBytes( getDataType() ). * * @return the number of bytes in the sample */ lt_uint32 getNumBytes() const; /** * returns status code comparing two samples * * Returns status code comparing two samples. This is just a different * version of operator==, which returns a status code instead of a bool. * * @param sample the sample to compare this sample to * @return a specific code indicating if impedance matches */ LT_STATUS checkImpedance(const LTISample& sample) const; /** * sets the sample value maximum * * Sets the sample's value to the datatype's maximum. */ void setValueToMin(); /** * sets the sample value minimum * * Sets the sample's value to the datatype's minimum. */ void setValueToMax(); /** * sets the sample value maximum * * Sets the sample's value to max of itself and the argument. * (The argument sample assumed to have the same datatype.) */ void setValueToMin(const LTISample&); /** * sets the sample value minimum * * Sets the sample's value to the min of itself and the argument * (The argument sample assumed to have the same datatype.) */ void setValueToMax(const LTISample&); /** * @name Sample value functions * * Sets the sample's value to the value given. The sample is assumed to * be known to have the given datatype. (For the void* "addr" functions, * the caller must assure datatype correctness underneath the void* pointer.) */ /*@{*/ void setValueAddr(const void*); const void* getValueAddr() const; void setValueUint8(lt_uint8); void setValueUint16(lt_uint16); void setValueUint32(lt_uint32); void setValueUint64(lt_uint64); void setValueSint8(lt_int8); void setValueSint16(lt_int16); void setValueSint32(lt_int32); void setValueSint64(lt_int64); void setValueFloat32(float); void setValueFloat64(double); lt_uint8 getValueUint8() const; lt_uint16 getValueUint16() const; lt_uint32 getValueUint32() const; lt_uint64 getValueUint64() const; lt_int8 getValueSint8() const; lt_int16 getValueSint16() const; lt_int32 getValueSint32() const; lt_int64 getValueSint64() const; float getValueFloat32() const; double getValueFloat64() const; /*@}*/ private: lt_uint8 *m_value; lt_uint32 m_numBytes; lt_uint32 m_precision; LTIDataType m_dataType; LTIColor m_color; }; LT_END_NAMESPACE(LizardTech) #if defined(LT_COMPILER_MS) #pragma warning(pop) #endif #endif // LTI_SAMPLE_H
[ "[email protected]@58180da6-ba8b-8960-36a5-00cc02a3ddec" ]
[ [ [ 1, 220 ] ] ]
44ec845a92a56670758e36b548ab52210a25b16e
971b000b9e6c4bf91d28f3723923a678520f5bcf
/PaperSizeScroll/_snip_pieces/xsl-fo_open/srcm/struct/richdoc_structure.h
900742d8db308cc0467a7f7948da7d4992653eff
[]
no_license
google-code-export/fop-miniscribus
14ce53d21893ce1821386a94d42485ee0465121f
966a9ca7097268c18e690aa0ea4b24b308475af9
refs/heads/master
2020-12-24T17:08:51.551987
2011-09-02T07:55:05
2011-09-02T07:55:05
32,133,292
2
0
null
null
null
null
UTF-8
C++
false
false
11,510
h
/******************************************************************************* * class RichDoc ******************************************************************************* * Copyright (C) 2007 by Peter Hohl * e-Mail: [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *******************************************************************************/ #ifndef RICHDOC_STRUCTURE_H #define RICHDOC_STRUCTURE_H #include <QtGui> #include <QtCore> #include "pics_structure.h" #include <QMetaType> #define _IMAGE_PICS_ITEM_ 100 class RichDoc { public: enum { MAGICNUMBER = 0xFFAAFFAA, VERSION = 2 }; RichDoc() { html = QByteArray("<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Your text</p>"); style = QString("min-height:60px;margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:0px;padding:0px;background-color:transparent;"); nullmargin = false; css2value << "position" << "margin-left" << "margin-right" << "margin-top" << "margin-bottom" << "padding" << "top" << "left" << "width" << "min-height" << "degree-rotation" << "opacity" << "height" << "background-color" << "z-index" << "id" << "border-width" << "border-color" << "border-style" << "l-lock"; } void margin( bool e ) { nullmargin = e; } RichDoc& operator=( const RichDoc& d ) { resource.clear(); resource = d.resource; html = d.html; style = d.style; return *this; } operator QVariant() const { return QVariant::fromValue(*this); } void Register( QTextDocument *doc , QMap<QString,SPics> list , QString s = QString("min-height:300px;padding:0px 0px 0px 0px;background-color:#ffffff;") ) { style = s; //////////QTextDocument *d = RelinkFormat(doc); html.clear(); html.append(doc->toHtml("utf-8")); resource.clear(); if (list.size() > 0) { resource = list; } } void Register( const QString xhtml , QMap<QString,SPics> list , QString s = QString("min-height:300px;padding:0px 0px 0px 0px;background-color:#ffffff;") ) { style = s; html.clear(); html.append(xhtml); resource.clear(); if (list.size() > 0) { resource = list; } } QString Hxtml() { return QString(html.constData()); } bool isAbsolute() { return style.contains("absolute"); } QString styler() { if (isAbsolute()) { return style; } else { return QString(); } } QTextDocument *easydoc() { QTextDocument *d = new QTextDocument(); d->setHtml(QString(html)); return d; } QTextDocument *todoc() { QTextDocument *d = new QTextDocument(); d->setHtml(QString(html)); writtelnDoc(d); return d; } void writtelnDoc( QTextDocument * d ) { QTextCursor helper = QTextCursor(d); //////FlashItem One; //////FlashReference* flahandler = new FlashReference(One,d); /////////d->documentLayout()->registerHandler(QTextCharFormat::UserObject + 1,flahandler); QMapIterator<QString,SPics> i(resource); while (i.hasNext()) { i.next(); SPics record = i.value(); d->addResource( QTextDocument::ImageResource,QUrl(record.name),record.pix()); } QTextFrame *Tframe = d->rootFrame(); if (nullmargin) { QTextFrameFormat Ftf = Tframe->frameFormat(); Ftf.setLeftMargin(0); Ftf.setBottomMargin(0); Ftf.setTopMargin(0); Ftf.setRightMargin(0); Tframe->setFrameFormat(Ftf); } QTextFrame::iterator it; for (it = Tframe->begin(); !(it.atEnd()); ++it) { QTextBlock para = it.currentBlock(); if (para.isValid()) { QTextBlockFormat Parformat = para.blockFormat(); if (Parformat.bottomMargin() == 12 && Parformat.topMargin() == 12 || nullmargin ) { Parformat.setBottomMargin(0); Parformat.setTopMargin(0); Parformat.setRightMargin(0); Parformat.setLeftMargin(0); helper.setPosition(para.position(),QTextCursor::MoveAnchor); helper.setBlockFormat(Parformat); } QTextBlock::iterator de; for (de = para.begin(); !(de.atEnd()); ++de) { QTextFragment fr = de.fragment(); if (fr.isValid()) { QTextCharFormat base = fr.charFormat(); QTextImageFormat pico = base.toImageFormat(); if (base.isAnchor()) { QString href = base.anchorHref(); QStringList namelist = base.anchorNames(); ///////qDebug() << "### loading link found ..... " << href; /* default color from link and insert fla flash item to edit */ if (namelist.size() > 0 || !base.anchorName().isEmpty() ) { /////////////qDebug() << "### loading namelist found ..... " << namelist; QString first; if (!base.anchorName().isEmpty()) { first = base.anchorName(); } else { first = namelist.first(); } if (first.startsWith("mediaf")) { } } else { /* normal link */ base.setForeground(QBrush(_LINK_COLOR_)); base.setUnderlineStyle(QTextCharFormat::SingleUnderline); helper.setPosition(fr.position()); helper.setPosition(fr.position() + fr.length(),QTextCursor::KeepAnchor); helper.setCharFormat(base); } } if (pico.isValid()) { const QString hrefadress = pico.name(); SPics spico = resource[hrefadress]; ////////////qDebug() << "### from RichDoc add resource " << hrefadress; ////////////////qDebug() << "### from RichDoc info " << spico.info; pico.setToolTip(spico.info); pico.setProperty(_IMAGE_PICS_ITEM_,spico); helper.setPosition(fr.position()); helper.setPosition(fr.position() + fr.length(),QTextCursor::KeepAnchor); helper.setCharFormat(pico); } } } } } } QStringList css2value; /* not save */ bool nullmargin; QString style; QMap<QString,SPics> resource; QByteArray html; /* qCompress */ }; inline QDataStream& operator<<(QDataStream& out, RichDoc& e) { out << e.html; out << e.style; QMapIterator<QString,SPics> i(e.resource); while (i.hasNext()) { i.next(); SPics record = i.value(); out << record; } return out; } inline QDataStream& operator>>(QDataStream& in, RichDoc& e) { in >> e.html; in >> e.style; while (!in.atEnd()) { SPics appoint; in >> appoint; e.resource.insert(appoint.name,appoint); } return in; } Q_DECLARE_METATYPE(RichDoc); typedef QMap<int,RichDoc> LayerList; typedef QList<RichDoc> QLayerList; Q_DECLARE_METATYPE(LayerList) Q_DECLARE_METATYPE(QLayerList) QString SaveRichDoc( RichDoc e ); RichDoc OpenRichDoc( const QString datastream_base64 ); QByteArray HeSaveLayer( RichDoc e , const int position ); QPair<int,RichDoc> HeOpenLayer( const QByteArray stream ); class PageDoc { public: enum { MAGICNUMBER = 0xFFFAFFAA, VERSION = 1 }; PageDoc() { Listening.clear(); binformat.clear(); modus = 1; } operator QVariant() const { return QVariant::fromValue(*this); } int size() { return Listening.size(); } QByteArray save() { QString line("\n\n"); QByteArray bytes; QByteArray signature("PAGE\n"); binformat.clear(); QMapIterator<int,RichDoc> o(Listening); while (o.hasNext()) { o.next(); RichDoc record = o.value(); QByteArray dat = HeSaveLayer(record,o.key()); binformat.append(dat); } QBuffer buffer(&bytes); if (!buffer.open(QIODevice::WriteOnly)) { return QByteArray(); } QDataStream ds(&buffer); /* place header */ ds.setVersion(QDataStream::Qt_4_2); ds << signature; ds << (quint32)MAGICNUMBER; ds << (quint32)VERSION; ds << rect; ds << line; for (int i = 0; i < binformat.size(); ++i) { ds << binformat.at(i); } buffer.close(); QCryptographicHash formats( QCryptographicHash::Md5 ); formats.addData(bytes); smd5 = formats.result(); return bytes; } void open( QByteArray stream ) { QCryptographicHash formats( QCryptographicHash::Md5 ); formats.addData(stream); smd5 = formats.result(); QBuffer buffer(&stream); if (!buffer.open(QIODevice::ReadOnly)) { return; } QString infostream; quint32 magic, version; QByteArray signer; QDataStream ds(&buffer); ds.setVersion(QDataStream::Qt_4_2); ds >> signer; if ( !signer.contains(QByteArray("PAGE")) ) { buffer.close(); return; } ds >> magic; if ( (quint32)MAGICNUMBER != magic ) { qWarning() << "######## PageDoc::MAGICNUMBER not ok " << magic; buffer.close(); return; } ds >> version; if ( (quint32)VERSION != version ) { qWarning() << "######## PageDoc::VERSION not ok " << version; buffer.close(); return; } ds >> rect; ds >> infostream; QByteArray daten; Listening.clear(); while (!ds.atEnd()) { ds >> daten; QPair<int,RichDoc> Layers = HeOpenLayer(daten); Listening.insert(Layers.first,Layers.second); } buffer.close(); } QRectF rect; QByteArray smd5; int modus; QMap<int,RichDoc> Listening; /* QMap<int,RichDoc> */ QList<QByteArray> binformat; }; Q_DECLARE_METATYPE(PageDoc); #endif // RICHDOC_STRUCTURE_H
[ "ppkciz@9af58faf-7e3e-0410-b956-55d145112073" ]
[ [ [ 1, 390 ] ] ]
b37974720991f3f993402b4e798e2bf606ab9205
3d24f3a3ad16eae19b41812f4f0610321d73a970
/S60DbView/S60DbView/inc/S60DbViewView2.h
36629a15a8cdfd30a1cfcc403c065cf5e107617c
[]
no_license
SymbiSoft/s60dbview
26b0042492f785da447a3d4899f89f61be725b38
a5fbc620949c22e7d27eb0fabc1d855883442787
refs/heads/master
2021-01-10T15:04:45.176140
2008-05-18T13:53:31
2008-05-18T13:53:31
48,187,129
0
0
null
null
null
null
UTF-8
C++
false
false
1,728
h
/* ============================================================================ Name : CS60DbViewView2 from S60DbViewView2.h Author : ioernt Version : Copyright : ioerntLoveQiQi Description : Declares view for application. ============================================================================ */ #ifndef S60DBVIEWVIEW2_H #define S60DBVIEWVIEW2_H // INCLUDES #include <aknview.h> // CONSTANTS // UID of view const TUid KView2Id = {2}; // FORWARD DECLARATIONS class CS60DbViewContainer2; // CLASS DECLARATION /** * CS60DbViewView2 view class. * */ class CS60DbViewView2 : public CAknView { public: // Constructors and destructor /** * EPOC default constructor. */ void ConstructL(); /** * Destructor. */ ~CS60DbViewView2(); public: // Functions from base classes /** * From CAknView returns Uid of View * @return TUid uid of the view */ TUid Id() const; /** * From MEikMenuObserver delegate commands from the menu * @param aCommand a command emitted by the menu * @return void */ void HandleCommandL(TInt aCommand); /** * From CAknView reaction if size change * @return void */ void HandleClientRectChange(); private: /** * From CAknView activate the view * @param aPrevViewId * @param aCustomMessageId * @param aCustomMessage * @return void */ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId, const TDesC8& aCustomMessage); /** * From CAknView deactivate the view (free resources) * @return void */ void DoDeactivate(); private: // Data CS60DbViewContainer2* iContainer; }; #endif
[ "yyc520@aaf011ab-804d-0410-8e4c-c1c04eb9eed9" ]
[ [ [ 1, 88 ] ] ]
586971450b05dc790a44aa303c46db5685d2f00a
c5970777aa5fbb7fc8b2536da1c07c1461f55255
/tests/test-git.cpp
39149030134369a5f92dd3c5c862a2be2472cf5c
[]
no_license
olipfei/cbvcs
6a5d8d9d750cd552644ebf370b7cfac130a88586
526fc5e6c4ba79dba20c50db5b810c3c9a21dc90
refs/heads/master
2020-07-06T07:40:10.351328
2011-03-05T12:07:32
2011-03-05T12:07:32
33,919,955
0
0
null
null
null
null
UTF-8
C++
false
false
1,055
cpp
#include <UnitTest++/UnitTest++.h> #include <git.h> #include <VcsTreeItem.h> #include <icommandexecuter.h> namespace { const wxString ProjectName = _("src/gitroot/projroot/project.cbp"); const wxString VcsRoot(_("src/gitroot")); class GitRootTrueExecutor : public ICommandExecuter { public: virtual bool execute(const wxString& shellCommand, wxArrayString& outCapture, wxArrayString& errCapture) const { if(!shellCommand.Cmp(_("git rev-parse --show-toplevel"))) { outCapture.Add(_("src/gitroot")); } else { return false; } return true; } virtual bool FileExists(const wxString& filePath) const { return true; } virtual void pushd(const wxString& ) {}; virtual void popd() {}; }; TEST(IsGitRoot_ProjectFileWithinGit_ReturnsTrue) { GitRootTrueExecutor exec; CHECK_EQUAL(true, git::IsGitRepo(ProjectName, exec)); } }
[ "[email protected]@7aca8338-beae-cf89-b0b1-2e0b104211d0" ]
[ [ [ 1, 41 ] ] ]
3883a408e6e4cef8d6da878aeac4f760a8d57edb
cfcd2a448c91b249ea61d0d0d747129900e9e97f
/thirdparty/OpenCOLLADA/COLLADASaxFrameworkLoader/include/COLLADASaxFWLColladaParserAutoGenAttributes.h
abd85c5c7a4c64d1b417fe34f5186bfc8a0f785c
[]
no_license
fire-archive/OgreCollada
b1686b1b84b512ffee65baddb290503fb1ebac9c
49114208f176eb695b525dca4f79fc0cfd40e9de
refs/heads/master
2020-04-10T10:04:15.187350
2009-05-31T15:33:15
2009-05-31T15:33:15
268,046
0
0
null
null
null
null
UTF-8
C++
false
false
235,033
h
/* Copyright (c) 2008 NetAllied Systems GmbH This file is part of COLLADASaxFrameworkLoader. Licensed under the MIT Open Source License, for details please see LICENSE file or the website http://www.opensource.org/licenses/mit-license.php */ #ifndef __COLLADASAXFWL_COLLADAPARSERAUTOGENATTRIBUTES_H__ #define __COLLADASAXFWL_COLLADAPARSERAUTOGENATTRIBUTES_H__ #include "COLLADASaxFWLColladaParserAutoGenEnums.h" namespace COLLADASaxFWL { const StringHash HASH_ELEMENT_PROFILE_GLES = 99286435; extern const char* NAME_ELEMENT_PROFILE_GLES; const StringHash HASH_ATTRIBUTE_ID = 1780; extern const char* NAME_ATTRIBUTE_ID; const StringHash HASH_ATTRIBUTE_PLATFORM = 42652157; extern const char* NAME_ATTRIBUTE_PLATFORM; struct profile_GLES__AttributeData { static const profile_GLES__AttributeData DEFAULT; const ParserChar* id; const ParserChar* platform; }; const StringHash HASH_ELEMENT_ASSET = 200766244; extern const char* NAME_ELEMENT_ASSET; const StringHash HASH_ELEMENT_PROFILE_GLES__ASSET = 200766244; extern const char* NAME_ELEMENT_PROFILE_GLES__ASSET; const StringHash HASH_ELEMENT_CONTRIBUTOR = 187503730; extern const char* NAME_ELEMENT_CONTRIBUTOR; const StringHash HASH_ELEMENT_ASSET__CONTRIBUTOR = 187503730; extern const char* NAME_ELEMENT_ASSET__CONTRIBUTOR; const StringHash HASH_ELEMENT_AUTHOR = 104615810; extern const char* NAME_ELEMENT_AUTHOR; const StringHash HASH_ELEMENT_CONTRIBUTOR__AUTHOR = 104615810; extern const char* NAME_ELEMENT_CONTRIBUTOR__AUTHOR; const StringHash HASH_ELEMENT_AUTHORING_TOOL = 144260236; extern const char* NAME_ELEMENT_AUTHORING_TOOL; const StringHash HASH_ELEMENT_CONTRIBUTOR__AUTHORING_TOOL = 144260236; extern const char* NAME_ELEMENT_CONTRIBUTOR__AUTHORING_TOOL; const StringHash HASH_ELEMENT_COMMENTS = 115565443; extern const char* NAME_ELEMENT_COMMENTS; const StringHash HASH_ELEMENT_CONTRIBUTOR__COMMENTS = 115565443; extern const char* NAME_ELEMENT_CONTRIBUTOR__COMMENTS; const StringHash HASH_ELEMENT_COPYRIGHT = 168205972; extern const char* NAME_ELEMENT_COPYRIGHT; const StringHash HASH_ELEMENT_CONTRIBUTOR__COPYRIGHT = 168205972; extern const char* NAME_ELEMENT_CONTRIBUTOR__COPYRIGHT; const StringHash HASH_ELEMENT_SOURCE_DATA = 134662689; extern const char* NAME_ELEMENT_SOURCE_DATA; const StringHash HASH_ELEMENT_CONTRIBUTOR__SOURCE_DATA = 134662689; extern const char* NAME_ELEMENT_CONTRIBUTOR__SOURCE_DATA; const StringHash HASH_ELEMENT_CREATED = 1517924; extern const char* NAME_ELEMENT_CREATED; const StringHash HASH_ELEMENT_ASSET__CREATED = 1517924; extern const char* NAME_ELEMENT_ASSET__CREATED; const StringHash HASH_ELEMENT_KEYWORDS = 113792515; extern const char* NAME_ELEMENT_KEYWORDS; const StringHash HASH_ELEMENT_ASSET__KEYWORDS = 113792515; extern const char* NAME_ELEMENT_ASSET__KEYWORDS; const StringHash HASH_ELEMENT_MODIFIED = 208007444; extern const char* NAME_ELEMENT_MODIFIED; const StringHash HASH_ELEMENT_ASSET__MODIFIED = 208007444; extern const char* NAME_ELEMENT_ASSET__MODIFIED; const StringHash HASH_ELEMENT_REVISION = 85631614; extern const char* NAME_ELEMENT_REVISION; const StringHash HASH_ELEMENT_ASSET__REVISION = 85631614; extern const char* NAME_ELEMENT_ASSET__REVISION; const StringHash HASH_ELEMENT_SUBJECT = 2467908; extern const char* NAME_ELEMENT_SUBJECT; const StringHash HASH_ELEMENT_ASSET__SUBJECT = 2467908; extern const char* NAME_ELEMENT_ASSET__SUBJECT; const StringHash HASH_ELEMENT_TITLE = 65116037; extern const char* NAME_ELEMENT_TITLE; const StringHash HASH_ELEMENT_ASSET__TITLE = 65116037; extern const char* NAME_ELEMENT_ASSET__TITLE; const StringHash HASH_ELEMENT_UNIT = 171847364; extern const char* NAME_ELEMENT_UNIT; const StringHash HASH_ELEMENT_ASSET__UNIT = 171847364; extern const char* NAME_ELEMENT_ASSET__UNIT; const StringHash HASH_ATTRIBUTE_METER = 7588546; extern const char* NAME_ATTRIBUTE_METER; const StringHash HASH_ATTRIBUTE_NAME = 477237; extern const char* NAME_ATTRIBUTE_NAME; struct unit__AttributeData { static const unit__AttributeData DEFAULT; double meter; const ParserChar* name; }; const StringHash HASH_ELEMENT_UP_AXIS = 114896611; extern const char* NAME_ELEMENT_UP_AXIS; const StringHash HASH_ELEMENT_ASSET__UP_AXIS = 114896611; extern const char* NAME_ELEMENT_ASSET__UP_AXIS; const StringHash HASH_ELEMENT_IMAGE = 200404277; extern const char* NAME_ELEMENT_IMAGE; const StringHash HASH_ELEMENT_PROFILE_GLES__IMAGE = 200404277; extern const char* NAME_ELEMENT_PROFILE_GLES__IMAGE; const StringHash HASH_ATTRIBUTE_FORMAT = 114725764; extern const char* NAME_ATTRIBUTE_FORMAT; const StringHash HASH_ATTRIBUTE_HEIGHT = 116129268; extern const char* NAME_ATTRIBUTE_HEIGHT; const StringHash HASH_ATTRIBUTE_WIDTH = 8256424; extern const char* NAME_ATTRIBUTE_WIDTH; const StringHash HASH_ATTRIBUTE_DEPTH = 6997928; extern const char* NAME_ATTRIBUTE_DEPTH; struct image__AttributeData { static const image__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; const ParserChar* format; unsigned long long height; unsigned long long width; unsigned long long depth; }; const StringHash HASH_ELEMENT_IMAGE__ASSET = 73127028; extern const char* NAME_ELEMENT_IMAGE__ASSET; const StringHash HASH_ELEMENT_DATA = 189112177; extern const char* NAME_ELEMENT_DATA; const StringHash HASH_ELEMENT_IMAGE__DATA = 189112177; extern const char* NAME_ELEMENT_IMAGE__DATA; const StringHash HASH_ELEMENT_INIT_FROM = 221349405; extern const char* NAME_ELEMENT_INIT_FROM; const StringHash HASH_ELEMENT_IMAGE__INIT_FROM = 221349405; extern const char* NAME_ELEMENT_IMAGE__INIT_FROM; const StringHash HASH_ELEMENT_EXTRA = 73369137; extern const char* NAME_ELEMENT_EXTRA; const StringHash HASH_ELEMENT_IMAGE__EXTRA = 73369137; extern const char* NAME_ELEMENT_IMAGE__EXTRA; const StringHash HASH_ATTRIBUTE_TYPE = 508005; extern const char* NAME_ATTRIBUTE_TYPE; struct extra__AttributeData { static const extra__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; const ParserChar* type; }; const StringHash HASH_ELEMENT_EXTRA__ASSET = 60232116; extern const char* NAME_ELEMENT_EXTRA__ASSET; const StringHash HASH_ELEMENT_TECHNIQUE = 27831733; extern const char* NAME_ELEMENT_TECHNIQUE; const StringHash HASH_ELEMENT_EXTRA__TECHNIQUE = 27831733; extern const char* NAME_ELEMENT_EXTRA__TECHNIQUE; const StringHash HASH_ATTRIBUTE_PROFILE = 127258709; extern const char* NAME_ATTRIBUTE_PROFILE; struct extra__technique__AttributeData { static const extra__technique__AttributeData DEFAULT; const ParserChar* profile; }; const StringHash HASH_ELEMENT_NEWPARAM = 21514445; extern const char* NAME_ELEMENT_NEWPARAM; const StringHash HASH_ELEMENT_PROFILE_GLES__NEWPARAM = 21514445; extern const char* NAME_ELEMENT_PROFILE_GLES__NEWPARAM; const StringHash HASH_ATTRIBUTE_SID = 31220; extern const char* NAME_ATTRIBUTE_SID; struct profile_GLES__newparam__AttributeData { static const profile_GLES__newparam__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_ANNOTATE = 202972325; extern const char* NAME_ELEMENT_ANNOTATE; const StringHash HASH_ELEMENT_NEWPARAM__ANNOTATE = 202972325; extern const char* NAME_ELEMENT_NEWPARAM__ANNOTATE; struct annotate__AttributeData { static const annotate__AttributeData DEFAULT; const ParserChar* name; }; const StringHash HASH_ELEMENT_BOOL = 2309228; extern const char* NAME_ELEMENT_BOOL; const StringHash HASH_ELEMENT_ANNOTATE__BOOL = 2309228; extern const char* NAME_ELEMENT_ANNOTATE__BOOL; const StringHash HASH_ELEMENT_BOOL2 = 36947698; extern const char* NAME_ELEMENT_BOOL2; const StringHash HASH_ELEMENT_ANNOTATE__BOOL2 = 36947698; extern const char* NAME_ELEMENT_ANNOTATE__BOOL2; const StringHash HASH_ELEMENT_BOOL3 = 36947699; extern const char* NAME_ELEMENT_BOOL3; const StringHash HASH_ELEMENT_ANNOTATE__BOOL3 = 36947699; extern const char* NAME_ELEMENT_ANNOTATE__BOOL3; const StringHash HASH_ELEMENT_BOOL4 = 36947700; extern const char* NAME_ELEMENT_BOOL4; const StringHash HASH_ELEMENT_ANNOTATE__BOOL4 = 36947700; extern const char* NAME_ELEMENT_ANNOTATE__BOOL4; const StringHash HASH_ELEMENT_INT = 50476724; extern const char* NAME_ELEMENT_INT; const StringHash HASH_ELEMENT_ANNOTATE__INT = 50476724; extern const char* NAME_ELEMENT_ANNOTATE__INT; const StringHash HASH_ELEMENT_INT2 = 2321218; extern const char* NAME_ELEMENT_INT2; const StringHash HASH_ELEMENT_ANNOTATE__INT2 = 2321218; extern const char* NAME_ELEMENT_ANNOTATE__INT2; const StringHash HASH_ELEMENT_INT3 = 2321219; extern const char* NAME_ELEMENT_INT3; const StringHash HASH_ELEMENT_ANNOTATE__INT3 = 2321219; extern const char* NAME_ELEMENT_ANNOTATE__INT3; const StringHash HASH_ELEMENT_INT4 = 2321220; extern const char* NAME_ELEMENT_INT4; const StringHash HASH_ELEMENT_ANNOTATE__INT4 = 2321220; extern const char* NAME_ELEMENT_ANNOTATE__INT4; const StringHash HASH_ELEMENT_FLOAT = 37213828; extern const char* NAME_ELEMENT_FLOAT; const StringHash HASH_ELEMENT_ANNOTATE__FLOAT = 37213828; extern const char* NAME_ELEMENT_ANNOTATE__FLOAT; const StringHash HASH_ELEMENT_FLOAT2 = 58550354; extern const char* NAME_ELEMENT_FLOAT2; const StringHash HASH_ELEMENT_ANNOTATE__FLOAT2 = 58550354; extern const char* NAME_ELEMENT_ANNOTATE__FLOAT2; const StringHash HASH_ELEMENT_FLOAT3 = 58550355; extern const char* NAME_ELEMENT_FLOAT3; const StringHash HASH_ELEMENT_ANNOTATE__FLOAT3 = 58550355; extern const char* NAME_ELEMENT_ANNOTATE__FLOAT3; const StringHash HASH_ELEMENT_FLOAT4 = 58550356; extern const char* NAME_ELEMENT_FLOAT4; const StringHash HASH_ELEMENT_ANNOTATE__FLOAT4 = 58550356; extern const char* NAME_ELEMENT_ANNOTATE__FLOAT4; const StringHash HASH_ELEMENT_FLOAT2X2 = 224942786; extern const char* NAME_ELEMENT_FLOAT2X2; const StringHash HASH_ELEMENT_ANNOTATE__FLOAT2X2 = 224942786; extern const char* NAME_ELEMENT_ANNOTATE__FLOAT2X2; const StringHash HASH_ELEMENT_FLOAT3X3 = 224942531; extern const char* NAME_ELEMENT_FLOAT3X3; const StringHash HASH_ELEMENT_ANNOTATE__FLOAT3X3 = 224942531; extern const char* NAME_ELEMENT_ANNOTATE__FLOAT3X3; const StringHash HASH_ELEMENT_FLOAT4X4 = 224942276; extern const char* NAME_ELEMENT_FLOAT4X4; const StringHash HASH_ELEMENT_ANNOTATE__FLOAT4X4 = 224942276; extern const char* NAME_ELEMENT_ANNOTATE__FLOAT4X4; const StringHash HASH_ELEMENT_STRING = 376935; extern const char* NAME_ELEMENT_STRING; const StringHash HASH_ELEMENT_ANNOTATE__STRING = 376935; extern const char* NAME_ELEMENT_ANNOTATE__STRING; const StringHash HASH_ELEMENT_SEMANTIC = 91876067; extern const char* NAME_ELEMENT_SEMANTIC; const StringHash HASH_ELEMENT_NEWPARAM__SEMANTIC = 91876067; extern const char* NAME_ELEMENT_NEWPARAM__SEMANTIC; const StringHash HASH_ELEMENT_MODIFIER = 182483714; extern const char* NAME_ELEMENT_MODIFIER; const StringHash HASH_ELEMENT_NEWPARAM__MODIFIER = 182483714; extern const char* NAME_ELEMENT_NEWPARAM__MODIFIER; const StringHash HASH_ELEMENT_NEWPARAM__BOOL = 263396124; extern const char* NAME_ELEMENT_NEWPARAM__BOOL; const StringHash HASH_ELEMENT_NEWPARAM__BOOL2 = 187805954; extern const char* NAME_ELEMENT_NEWPARAM__BOOL2; const StringHash HASH_ELEMENT_NEWPARAM__BOOL3 = 187805955; extern const char* NAME_ELEMENT_NEWPARAM__BOOL3; const StringHash HASH_ELEMENT_NEWPARAM__BOOL4 = 187805956; extern const char* NAME_ELEMENT_NEWPARAM__BOOL4; const StringHash HASH_ELEMENT_NEWPARAM__INT = 83572900; extern const char* NAME_ELEMENT_NEWPARAM__INT; const StringHash HASH_ELEMENT_NEWPARAM__INT2 = 263424562; extern const char* NAME_ELEMENT_NEWPARAM__INT2; const StringHash HASH_ELEMENT_NEWPARAM__INT3 = 263424563; extern const char* NAME_ELEMENT_NEWPARAM__INT3; const StringHash HASH_ELEMENT_NEWPARAM__INT4 = 263424564; extern const char* NAME_ELEMENT_NEWPARAM__INT4; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT = 188080500; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT2 = 56498114; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT2; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT3 = 56498115; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT3; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT4 = 56498116; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT4; const StringHash HASH_ELEMENT_FLOAT1X1 = 236440545; extern const char* NAME_ELEMENT_FLOAT1X1; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT1X1 = 236440545; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT1X1; const StringHash HASH_ELEMENT_FLOAT1X2 = 236440546; extern const char* NAME_ELEMENT_FLOAT1X2; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT1X2 = 236440546; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT1X2; const StringHash HASH_ELEMENT_FLOAT1X3 = 236440547; extern const char* NAME_ELEMENT_FLOAT1X3; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT1X3 = 236440547; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT1X3; const StringHash HASH_ELEMENT_FLOAT1X4 = 236440548; extern const char* NAME_ELEMENT_FLOAT1X4; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT1X4 = 236440548; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT1X4; const StringHash HASH_ELEMENT_FLOAT2X1 = 236440289; extern const char* NAME_ELEMENT_FLOAT2X1; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT2X1 = 236440289; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT2X1; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT2X2 = 236440290; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT2X2; const StringHash HASH_ELEMENT_FLOAT2X3 = 236440291; extern const char* NAME_ELEMENT_FLOAT2X3; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT2X3 = 236440291; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT2X3; const StringHash HASH_ELEMENT_FLOAT2X4 = 236440292; extern const char* NAME_ELEMENT_FLOAT2X4; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT2X4 = 236440292; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT2X4; const StringHash HASH_ELEMENT_FLOAT3X1 = 236440033; extern const char* NAME_ELEMENT_FLOAT3X1; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT3X1 = 236440033; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT3X1; const StringHash HASH_ELEMENT_FLOAT3X2 = 236440034; extern const char* NAME_ELEMENT_FLOAT3X2; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT3X2 = 236440034; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT3X2; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT3X3 = 236440035; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT3X3; const StringHash HASH_ELEMENT_FLOAT3X4 = 236440036; extern const char* NAME_ELEMENT_FLOAT3X4; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT3X4 = 236440036; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT3X4; const StringHash HASH_ELEMENT_FLOAT4X1 = 236439777; extern const char* NAME_ELEMENT_FLOAT4X1; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT4X1 = 236439777; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT4X1; const StringHash HASH_ELEMENT_FLOAT4X2 = 236439778; extern const char* NAME_ELEMENT_FLOAT4X2; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT4X2 = 236439778; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT4X2; const StringHash HASH_ELEMENT_FLOAT4X3 = 236439779; extern const char* NAME_ELEMENT_FLOAT4X3; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT4X3 = 236439779; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT4X3; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT4X4 = 236439780; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT4X4; const StringHash HASH_ELEMENT_SURFACE = 37502101; extern const char* NAME_ELEMENT_SURFACE; const StringHash HASH_ELEMENT_NEWPARAM__SURFACE = 37502101; extern const char* NAME_ELEMENT_NEWPARAM__SURFACE; struct newparam__surface__AttributeData { static const newparam__surface__AttributeData DEFAULT; fx_surface_type_enum type; }; const StringHash HASH_ELEMENT_INIT_AS_NULL = 97694700; extern const char* NAME_ELEMENT_INIT_AS_NULL; const StringHash HASH_ELEMENT_SURFACE__INIT_AS_NULL = 97694700; extern const char* NAME_ELEMENT_SURFACE__INIT_AS_NULL; const StringHash HASH_ELEMENT_INIT_AS_TARGET = 37832724; extern const char* NAME_ELEMENT_INIT_AS_TARGET; const StringHash HASH_ELEMENT_SURFACE__INIT_AS_TARGET = 37832724; extern const char* NAME_ELEMENT_SURFACE__INIT_AS_TARGET; const StringHash HASH_ELEMENT_INIT_CUBE = 245137349; extern const char* NAME_ELEMENT_INIT_CUBE; const StringHash HASH_ELEMENT_SURFACE__INIT_CUBE = 245137349; extern const char* NAME_ELEMENT_SURFACE__INIT_CUBE; const StringHash HASH_ELEMENT_ALL = 230624156; extern const char* NAME_ELEMENT_ALL; const StringHash HASH_ELEMENT_INIT_CUBE__ALL = 230624156; extern const char* NAME_ELEMENT_INIT_CUBE__ALL; const StringHash HASH_ATTRIBUTE_REF = 30902; extern const char* NAME_ATTRIBUTE_REF; struct init_cube__all__AttributeData { static const init_cube__all__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_PRIMARY = 171149225; extern const char* NAME_ELEMENT_PRIMARY; const StringHash HASH_ELEMENT_INIT_CUBE__PRIMARY = 171149225; extern const char* NAME_ELEMENT_INIT_CUBE__PRIMARY; struct init_cube__primary__AttributeData { static const init_cube__primary__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_ORDER = 241501282; extern const char* NAME_ELEMENT_ORDER; const StringHash HASH_ELEMENT_PRIMARY__ORDER = 241501282; extern const char* NAME_ELEMENT_PRIMARY__ORDER; const StringHash HASH_ELEMENT_FACE = 200285253; extern const char* NAME_ELEMENT_FACE; const StringHash HASH_ELEMENT_INIT_CUBE__FACE = 200285253; extern const char* NAME_ELEMENT_INIT_CUBE__FACE; struct init_cube__face__AttributeData { static const init_cube__face__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_INIT_VOLUME = 253916837; extern const char* NAME_ELEMENT_INIT_VOLUME; const StringHash HASH_ELEMENT_SURFACE__INIT_VOLUME = 253916837; extern const char* NAME_ELEMENT_SURFACE__INIT_VOLUME; const StringHash HASH_ELEMENT_INIT_VOLUME__ALL = 165229292; extern const char* NAME_ELEMENT_INIT_VOLUME__ALL; struct init_volume__all__AttributeData { static const init_volume__all__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_INIT_VOLUME__PRIMARY = 21488025; extern const char* NAME_ELEMENT_INIT_VOLUME__PRIMARY; struct init_volume__primary__AttributeData { static const init_volume__primary__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_INIT_PLANAR = 264653330; extern const char* NAME_ELEMENT_INIT_PLANAR; const StringHash HASH_ELEMENT_SURFACE__INIT_PLANAR = 264653330; extern const char* NAME_ELEMENT_SURFACE__INIT_PLANAR; const StringHash HASH_ELEMENT_INIT_PLANAR__ALL = 36140396; extern const char* NAME_ELEMENT_INIT_PLANAR__ALL; struct init_planar__all__AttributeData { static const init_planar__all__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_SURFACE__INIT_FROM = 245107997; extern const char* NAME_ELEMENT_SURFACE__INIT_FROM; const StringHash HASH_ATTRIBUTE_MIP = 29696; extern const char* NAME_ATTRIBUTE_MIP; const StringHash HASH_ATTRIBUTE_SLICE = 8007573; extern const char* NAME_ATTRIBUTE_SLICE; const StringHash HASH_ATTRIBUTE_FACE = 444309; extern const char* NAME_ATTRIBUTE_FACE; struct surface__init_from__AttributeData { static const surface__init_from__AttributeData DEFAULT; unsigned long mip; unsigned long slice; fx_surface_face_enum face; }; const StringHash HASH_ELEMENT_FORMAT = 219247124; extern const char* NAME_ELEMENT_FORMAT; const StringHash HASH_ELEMENT_SURFACE__FORMAT = 219247124; extern const char* NAME_ELEMENT_SURFACE__FORMAT; const StringHash HASH_ELEMENT_FORMAT_HINT = 22346100; extern const char* NAME_ELEMENT_FORMAT_HINT; const StringHash HASH_ELEMENT_SURFACE__FORMAT_HINT = 22346100; extern const char* NAME_ELEMENT_SURFACE__FORMAT_HINT; const StringHash HASH_ELEMENT_CHANNELS = 153491235; extern const char* NAME_ELEMENT_CHANNELS; const StringHash HASH_ELEMENT_FORMAT_HINT__CHANNELS = 153491235; extern const char* NAME_ELEMENT_FORMAT_HINT__CHANNELS; const StringHash HASH_ELEMENT_RANGE = 98570949; extern const char* NAME_ELEMENT_RANGE; const StringHash HASH_ELEMENT_FORMAT_HINT__RANGE = 98570949; extern const char* NAME_ELEMENT_FORMAT_HINT__RANGE; const StringHash HASH_ELEMENT_PRECISION = 227897774; extern const char* NAME_ELEMENT_PRECISION; const StringHash HASH_ELEMENT_FORMAT_HINT__PRECISION = 227897774; extern const char* NAME_ELEMENT_FORMAT_HINT__PRECISION; const StringHash HASH_ELEMENT_OPTION = 249614094; extern const char* NAME_ELEMENT_OPTION; const StringHash HASH_ELEMENT_FORMAT_HINT__OPTION = 249614094; extern const char* NAME_ELEMENT_FORMAT_HINT__OPTION; const StringHash HASH_ELEMENT_FORMAT_HINT__EXTRA = 97815953; extern const char* NAME_ELEMENT_FORMAT_HINT__EXTRA; const StringHash HASH_ELEMENT_SIZE = 27158757; extern const char* NAME_ELEMENT_SIZE; const StringHash HASH_ELEMENT_SURFACE__SIZE = 27158757; extern const char* NAME_ELEMENT_SURFACE__SIZE; const StringHash HASH_ELEMENT_VIEWPORT_RATIO = 39354991; extern const char* NAME_ELEMENT_VIEWPORT_RATIO; const StringHash HASH_ELEMENT_SURFACE__VIEWPORT_RATIO = 39354991; extern const char* NAME_ELEMENT_SURFACE__VIEWPORT_RATIO; const StringHash HASH_ELEMENT_MIP_LEVELS = 95669747; extern const char* NAME_ELEMENT_MIP_LEVELS; const StringHash HASH_ELEMENT_SURFACE__MIP_LEVELS = 95669747; extern const char* NAME_ELEMENT_SURFACE__MIP_LEVELS; const StringHash HASH_ELEMENT_MIPMAP_GENERATE = 57490693; extern const char* NAME_ELEMENT_MIPMAP_GENERATE; const StringHash HASH_ELEMENT_SURFACE__MIPMAP_GENERATE = 57490693; extern const char* NAME_ELEMENT_SURFACE__MIPMAP_GENERATE; const StringHash HASH_ELEMENT_SURFACE__EXTRA = 164660625; extern const char* NAME_ELEMENT_SURFACE__EXTRA; const StringHash HASH_ELEMENT_TEXTURE_PIPELINE = 68467621; extern const char* NAME_ELEMENT_TEXTURE_PIPELINE; const StringHash HASH_ELEMENT_NEWPARAM__TEXTURE_PIPELINE = 68467621; extern const char* NAME_ELEMENT_NEWPARAM__TEXTURE_PIPELINE; struct newparam__texture_pipeline__AttributeData { static const newparam__texture_pipeline__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_TEXCOMBINER = 184640514; extern const char* NAME_ELEMENT_TEXCOMBINER; const StringHash HASH_ELEMENT_TEXTURE_PIPELINE__TEXCOMBINER = 184640514; extern const char* NAME_ELEMENT_TEXTURE_PIPELINE__TEXCOMBINER; const StringHash HASH_ELEMENT_CONSTANT = 3715492; extern const char* NAME_ELEMENT_CONSTANT; const StringHash HASH_ELEMENT_TEXCOMBINER__CONSTANT = 3715492; extern const char* NAME_ELEMENT_TEXCOMBINER__CONSTANT; const StringHash HASH_ATTRIBUTE_VALUE = 8160181; extern const char* NAME_ATTRIBUTE_VALUE; const StringHash HASH_ATTRIBUTE_PARAM = 7768189; extern const char* NAME_ATTRIBUTE_PARAM; struct texcombiner__constant__AttributeData { static const texcombiner__constant__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_RGB = 102851090; extern const char* NAME_ELEMENT_RGB; const StringHash HASH_ELEMENT_TEXCOMBINER__RGB = 102851090; extern const char* NAME_ELEMENT_TEXCOMBINER__RGB; const StringHash HASH_ATTRIBUTE__OPERATOR = 113831170; extern const char* NAME_ATTRIBUTE__OPERATOR; const StringHash HASH_ATTRIBUTE_SCALE = 7968805; extern const char* NAME_ATTRIBUTE_SCALE; struct RGB__AttributeData { static const RGB__AttributeData DEFAULT; gles_texcombiner_operatorRGB_enums _operator; double scale; }; const StringHash HASH_ELEMENT_ARGUMENT = 240414596; extern const char* NAME_ELEMENT_ARGUMENT; const StringHash HASH_ELEMENT_RGB__ARGUMENT = 240414596; extern const char* NAME_ELEMENT_RGB__ARGUMENT; const StringHash HASH_ATTRIBUTE_SOURCE = 128370837; extern const char* NAME_ATTRIBUTE_SOURCE; const StringHash HASH_ATTRIBUTE_OPERAND = 107776052; extern const char* NAME_ATTRIBUTE_OPERAND; const StringHash HASH_ATTRIBUTE_UNIT = 509188; extern const char* NAME_ATTRIBUTE_UNIT; struct RGB__argument__AttributeData { static const RGB__argument__AttributeData DEFAULT; gles_texcombiner_source_enums source; gles_texcombiner_operandRGB_enums operand; const ParserChar* unit; }; const StringHash HASH_ELEMENT_ALPHA = 24416449; extern const char* NAME_ELEMENT_ALPHA; const StringHash HASH_ELEMENT_TEXCOMBINER__ALPHA = 24416449; extern const char* NAME_ELEMENT_TEXCOMBINER__ALPHA; struct texcombiner__alpha__AttributeData { static const texcombiner__alpha__AttributeData DEFAULT; gles_texcombiner_operatorAlpha_enums _operator; double scale; }; const StringHash HASH_ELEMENT_ALPHA__ARGUMENT = 235735012; extern const char* NAME_ELEMENT_ALPHA__ARGUMENT; struct alpha__argument__AttributeData { static const alpha__argument__AttributeData DEFAULT; gles_texcombiner_source_enums source; gles_texcombiner_operandAlpha_enums operand; const ParserChar* unit; }; const StringHash HASH_ELEMENT_TEXENV = 60426918; extern const char* NAME_ELEMENT_TEXENV; const StringHash HASH_ELEMENT_TEXTURE_PIPELINE__TEXENV = 60426918; extern const char* NAME_ELEMENT_TEXTURE_PIPELINE__TEXENV; struct texenv__AttributeData { static const texenv__AttributeData DEFAULT; gles_texenv_mode_enums _operator; const ParserChar* unit; }; const StringHash HASH_ELEMENT_TEXENV__CONSTANT = 168255444; extern const char* NAME_ELEMENT_TEXENV__CONSTANT; typedef texcombiner__constant__AttributeData texenv__constant__AttributeData; const StringHash HASH_ELEMENT_TEXTURE_PIPELINE__EXTRA = 252679585; extern const char* NAME_ELEMENT_TEXTURE_PIPELINE__EXTRA; const StringHash HASH_ELEMENT_SAMPLER_STATE = 133824869; extern const char* NAME_ELEMENT_SAMPLER_STATE; const StringHash HASH_ELEMENT_NEWPARAM__SAMPLER_STATE = 133824869; extern const char* NAME_ELEMENT_NEWPARAM__SAMPLER_STATE; struct newparam__sampler_state__AttributeData { static const newparam__sampler_state__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_WRAP_S = 137532627; extern const char* NAME_ELEMENT_WRAP_S; const StringHash HASH_ELEMENT_SAMPLER_STATE__WRAP_S = 137532627; extern const char* NAME_ELEMENT_SAMPLER_STATE__WRAP_S; const StringHash HASH_ELEMENT_WRAP_T = 137532628; extern const char* NAME_ELEMENT_WRAP_T; const StringHash HASH_ELEMENT_SAMPLER_STATE__WRAP_T = 137532628; extern const char* NAME_ELEMENT_SAMPLER_STATE__WRAP_T; const StringHash HASH_ELEMENT_MINFILTER = 94762146; extern const char* NAME_ELEMENT_MINFILTER; const StringHash HASH_ELEMENT_SAMPLER_STATE__MINFILTER = 94762146; extern const char* NAME_ELEMENT_SAMPLER_STATE__MINFILTER; const StringHash HASH_ELEMENT_MAGFILTER = 212202514; extern const char* NAME_ELEMENT_MAGFILTER; const StringHash HASH_ELEMENT_SAMPLER_STATE__MAGFILTER = 212202514; extern const char* NAME_ELEMENT_SAMPLER_STATE__MAGFILTER; const StringHash HASH_ELEMENT_MIPFILTER = 128316770; extern const char* NAME_ELEMENT_MIPFILTER; const StringHash HASH_ELEMENT_SAMPLER_STATE__MIPFILTER = 128316770; extern const char* NAME_ELEMENT_SAMPLER_STATE__MIPFILTER; const StringHash HASH_ELEMENT_MIPMAP_MAXLEVEL = 12674860; extern const char* NAME_ELEMENT_MIPMAP_MAXLEVEL; const StringHash HASH_ELEMENT_SAMPLER_STATE__MIPMAP_MAXLEVEL = 12674860; extern const char* NAME_ELEMENT_SAMPLER_STATE__MIPMAP_MAXLEVEL; const StringHash HASH_ELEMENT_MIPMAP_BIAS = 61482963; extern const char* NAME_ELEMENT_MIPMAP_BIAS; const StringHash HASH_ELEMENT_SAMPLER_STATE__MIPMAP_BIAS = 61482963; extern const char* NAME_ELEMENT_SAMPLER_STATE__MIPMAP_BIAS; const StringHash HASH_ELEMENT_SAMPLER_STATE__EXTRA = 196172513; extern const char* NAME_ELEMENT_SAMPLER_STATE__EXTRA; const StringHash HASH_ELEMENT_TEXTURE_UNIT = 143987060; extern const char* NAME_ELEMENT_TEXTURE_UNIT; const StringHash HASH_ELEMENT_NEWPARAM__TEXTURE_UNIT = 143987060; extern const char* NAME_ELEMENT_NEWPARAM__TEXTURE_UNIT; struct texture_unit__AttributeData { static const texture_unit__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_TEXTURE_UNIT__SURFACE = 214217045; extern const char* NAME_ELEMENT_TEXTURE_UNIT__SURFACE; const StringHash HASH_ELEMENT_TEXTURE_UNIT__SAMPLER_STATE = 165842085; extern const char* NAME_ELEMENT_TEXTURE_UNIT__SAMPLER_STATE; const StringHash HASH_ELEMENT_TEXCOORD = 204425796; extern const char* NAME_ELEMENT_TEXCOORD; const StringHash HASH_ELEMENT_TEXTURE_UNIT__TEXCOORD = 204425796; extern const char* NAME_ELEMENT_TEXTURE_UNIT__TEXCOORD; const StringHash HASH_ATTRIBUTE_SEMANTIC = 205020515; extern const char* NAME_ATTRIBUTE_SEMANTIC; struct texcoord__AttributeData { static const texcoord__AttributeData DEFAULT; const ParserChar* semantic; }; const StringHash HASH_ELEMENT_TEXTURE_UNIT__EXTRA = 117110769; extern const char* NAME_ELEMENT_TEXTURE_UNIT__EXTRA; const StringHash HASH_ELEMENT_ENUM = 263408381; extern const char* NAME_ELEMENT_ENUM; const StringHash HASH_ELEMENT_NEWPARAM__ENUM = 263408381; extern const char* NAME_ELEMENT_NEWPARAM__ENUM; const StringHash HASH_ELEMENT_PROFILE_GLES__TECHNIQUE = 52481493; extern const char* NAME_ELEMENT_PROFILE_GLES__TECHNIQUE; struct profile_GLES__technique__AttributeData { static const profile_GLES__technique__AttributeData DEFAULT; const ParserChar* id; const ParserChar* sid; }; const StringHash HASH_ELEMENT_TECHNIQUE__ASSET = 202344836; extern const char* NAME_ELEMENT_TECHNIQUE__ASSET; const StringHash HASH_ELEMENT_TECHNIQUE__ANNOTATE = 122841269; extern const char* NAME_ELEMENT_TECHNIQUE__ANNOTATE; const StringHash HASH_ELEMENT_TECHNIQUE__IMAGE = 201922453; extern const char* NAME_ELEMENT_TECHNIQUE__IMAGE; const StringHash HASH_ELEMENT_TECHNIQUE__NEWPARAM = 249710925; extern const char* NAME_ELEMENT_TECHNIQUE__NEWPARAM; typedef profile_GLES__newparam__AttributeData technique__newparam__AttributeData; const StringHash HASH_ELEMENT_SETPARAM = 246565789; extern const char* NAME_ELEMENT_SETPARAM; const StringHash HASH_ELEMENT_TECHNIQUE__SETPARAM = 246565789; extern const char* NAME_ELEMENT_TECHNIQUE__SETPARAM; struct technique__setparam__AttributeData { static const technique__setparam__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_SETPARAM__ANNOTATE = 89566037; extern const char* NAME_ELEMENT_SETPARAM__ANNOTATE; const StringHash HASH_ELEMENT_SETPARAM__BOOL = 206428; extern const char* NAME_ELEMENT_SETPARAM__BOOL; const StringHash HASH_ELEMENT_SETPARAM__BOOL2 = 3302898; extern const char* NAME_ELEMENT_SETPARAM__BOOL2; const StringHash HASH_ELEMENT_SETPARAM__BOOL3 = 3302899; extern const char* NAME_ELEMENT_SETPARAM__BOOL3; const StringHash HASH_ELEMENT_SETPARAM__BOOL4 = 3302900; extern const char* NAME_ELEMENT_SETPARAM__BOOL4; const StringHash HASH_ELEMENT_SETPARAM__INT = 14164; extern const char* NAME_ELEMENT_SETPARAM__INT; const StringHash HASH_ELEMENT_SETPARAM__INT2 = 226674; extern const char* NAME_ELEMENT_SETPARAM__INT2; const StringHash HASH_ELEMENT_SETPARAM__INT3 = 226675; extern const char* NAME_ELEMENT_SETPARAM__INT3; const StringHash HASH_ELEMENT_SETPARAM__INT4 = 226676; extern const char* NAME_ELEMENT_SETPARAM__INT4; const StringHash HASH_ELEMENT_SETPARAM__FLOAT = 3552644; extern const char* NAME_ELEMENT_SETPARAM__FLOAT; const StringHash HASH_ELEMENT_SETPARAM__FLOAT2 = 56842354; extern const char* NAME_ELEMENT_SETPARAM__FLOAT2; const StringHash HASH_ELEMENT_SETPARAM__FLOAT3 = 56842355; extern const char* NAME_ELEMENT_SETPARAM__FLOAT3; const StringHash HASH_ELEMENT_SETPARAM__FLOAT4 = 56842356; extern const char* NAME_ELEMENT_SETPARAM__FLOAT4; const StringHash HASH_ELEMENT_SETPARAM__FLOAT1X1 = 56130513; extern const char* NAME_ELEMENT_SETPARAM__FLOAT1X1; const StringHash HASH_ELEMENT_SETPARAM__FLOAT1X2 = 56130514; extern const char* NAME_ELEMENT_SETPARAM__FLOAT1X2; const StringHash HASH_ELEMENT_SETPARAM__FLOAT1X3 = 56130515; extern const char* NAME_ELEMENT_SETPARAM__FLOAT1X3; const StringHash HASH_ELEMENT_SETPARAM__FLOAT1X4 = 56130516; extern const char* NAME_ELEMENT_SETPARAM__FLOAT1X4; const StringHash HASH_ELEMENT_SETPARAM__FLOAT2X1 = 56130257; extern const char* NAME_ELEMENT_SETPARAM__FLOAT2X1; const StringHash HASH_ELEMENT_SETPARAM__FLOAT2X2 = 56130258; extern const char* NAME_ELEMENT_SETPARAM__FLOAT2X2; const StringHash HASH_ELEMENT_SETPARAM__FLOAT2X3 = 56130259; extern const char* NAME_ELEMENT_SETPARAM__FLOAT2X3; const StringHash HASH_ELEMENT_SETPARAM__FLOAT2X4 = 56130260; extern const char* NAME_ELEMENT_SETPARAM__FLOAT2X4; const StringHash HASH_ELEMENT_SETPARAM__FLOAT3X1 = 56130001; extern const char* NAME_ELEMENT_SETPARAM__FLOAT3X1; const StringHash HASH_ELEMENT_SETPARAM__FLOAT3X2 = 56130002; extern const char* NAME_ELEMENT_SETPARAM__FLOAT3X2; const StringHash HASH_ELEMENT_SETPARAM__FLOAT3X3 = 56130003; extern const char* NAME_ELEMENT_SETPARAM__FLOAT3X3; const StringHash HASH_ELEMENT_SETPARAM__FLOAT3X4 = 56130004; extern const char* NAME_ELEMENT_SETPARAM__FLOAT3X4; const StringHash HASH_ELEMENT_SETPARAM__FLOAT4X1 = 56129745; extern const char* NAME_ELEMENT_SETPARAM__FLOAT4X1; const StringHash HASH_ELEMENT_SETPARAM__FLOAT4X2 = 56129746; extern const char* NAME_ELEMENT_SETPARAM__FLOAT4X2; const StringHash HASH_ELEMENT_SETPARAM__FLOAT4X3 = 56129747; extern const char* NAME_ELEMENT_SETPARAM__FLOAT4X3; const StringHash HASH_ELEMENT_SETPARAM__FLOAT4X4 = 56129748; extern const char* NAME_ELEMENT_SETPARAM__FLOAT4X4; const StringHash HASH_ELEMENT_SETPARAM__SURFACE = 63489941; extern const char* NAME_ELEMENT_SETPARAM__SURFACE; typedef newparam__surface__AttributeData setparam__surface__AttributeData; const StringHash HASH_ELEMENT_SETPARAM__TEXTURE_PIPELINE = 195331813; extern const char* NAME_ELEMENT_SETPARAM__TEXTURE_PIPELINE; typedef newparam__texture_pipeline__AttributeData setparam__texture_pipeline__AttributeData; const StringHash HASH_ELEMENT_SETPARAM__SAMPLER_STATE = 149871205; extern const char* NAME_ELEMENT_SETPARAM__SAMPLER_STATE; typedef newparam__sampler_state__AttributeData setparam__sampler_state__AttributeData; const StringHash HASH_ELEMENT_SETPARAM__TEXTURE_UNIT = 145383620; extern const char* NAME_ELEMENT_SETPARAM__TEXTURE_UNIT; const StringHash HASH_ELEMENT_SETPARAM__ENUM = 210365; extern const char* NAME_ELEMENT_SETPARAM__ENUM; const StringHash HASH_ELEMENT_PASS = 79895203; extern const char* NAME_ELEMENT_PASS; const StringHash HASH_ELEMENT_TECHNIQUE__PASS = 79895203; extern const char* NAME_ELEMENT_TECHNIQUE__PASS; struct pass__AttributeData { static const pass__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_PASS__ANNOTATE = 234879621; extern const char* NAME_ELEMENT_PASS__ANNOTATE; const StringHash HASH_ELEMENT_COLOR_TARGET = 94769908; extern const char* NAME_ELEMENT_COLOR_TARGET; const StringHash HASH_ELEMENT_PASS__COLOR_TARGET = 94769908; extern const char* NAME_ELEMENT_PASS__COLOR_TARGET; const StringHash HASH_ELEMENT_DEPTH_TARGET = 74210900; extern const char* NAME_ELEMENT_DEPTH_TARGET; const StringHash HASH_ELEMENT_PASS__DEPTH_TARGET = 74210900; extern const char* NAME_ELEMENT_PASS__DEPTH_TARGET; const StringHash HASH_ELEMENT_STENCIL_TARGET = 75842084; extern const char* NAME_ELEMENT_STENCIL_TARGET; const StringHash HASH_ELEMENT_PASS__STENCIL_TARGET = 75842084; extern const char* NAME_ELEMENT_PASS__STENCIL_TARGET; const StringHash HASH_ELEMENT_COLOR_CLEAR = 57328242; extern const char* NAME_ELEMENT_COLOR_CLEAR; const StringHash HASH_ELEMENT_PASS__COLOR_CLEAR = 57328242; extern const char* NAME_ELEMENT_PASS__COLOR_CLEAR; const StringHash HASH_ELEMENT_DEPTH_CLEAR = 158754482; extern const char* NAME_ELEMENT_DEPTH_CLEAR; const StringHash HASH_ELEMENT_PASS__DEPTH_CLEAR = 158754482; extern const char* NAME_ELEMENT_PASS__DEPTH_CLEAR; const StringHash HASH_ELEMENT_STENCIL_CLEAR = 243070834; extern const char* NAME_ELEMENT_STENCIL_CLEAR; const StringHash HASH_ELEMENT_PASS__STENCIL_CLEAR = 243070834; extern const char* NAME_ELEMENT_PASS__STENCIL_CLEAR; const StringHash HASH_ELEMENT_DRAW = 156422183; extern const char* NAME_ELEMENT_DRAW; const StringHash HASH_ELEMENT_PASS__DRAW = 156422183; extern const char* NAME_ELEMENT_PASS__DRAW; const StringHash HASH_ELEMENT_ALPHA_FUNC = 122155395; extern const char* NAME_ELEMENT_ALPHA_FUNC; const StringHash HASH_ELEMENT_PASS__ALPHA_FUNC = 122155395; extern const char* NAME_ELEMENT_PASS__ALPHA_FUNC; const StringHash HASH_ELEMENT_FUNC = 122061667; extern const char* NAME_ELEMENT_FUNC; const StringHash HASH_ELEMENT_ALPHA_FUNC__FUNC = 122061667; extern const char* NAME_ELEMENT_ALPHA_FUNC__FUNC; struct alpha_func__func__AttributeData { static const alpha_func__func__AttributeData DEFAULT; gl_func_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_VALUE = 73003461; extern const char* NAME_ELEMENT_VALUE; const StringHash HASH_ELEMENT_ALPHA_FUNC__VALUE = 73003461; extern const char* NAME_ELEMENT_ALPHA_FUNC__VALUE; struct alpha_func__value__AttributeData { static const alpha_func__value__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_BLEND_FUNC = 232202851; extern const char* NAME_ELEMENT_BLEND_FUNC; const StringHash HASH_ELEMENT_PASS__BLEND_FUNC = 232202851; extern const char* NAME_ELEMENT_PASS__BLEND_FUNC; const StringHash HASH_ELEMENT_SRC = 148856355; extern const char* NAME_ELEMENT_SRC; const StringHash HASH_ELEMENT_BLEND_FUNC__SRC = 148856355; extern const char* NAME_ELEMENT_BLEND_FUNC__SRC; struct src__AttributeData { static const src__AttributeData DEFAULT; gl_blend_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_DEST = 234284580; extern const char* NAME_ELEMENT_DEST; const StringHash HASH_ELEMENT_BLEND_FUNC__DEST = 234284580; extern const char* NAME_ELEMENT_BLEND_FUNC__DEST; struct dest__AttributeData { static const dest__AttributeData DEFAULT; gl_blend_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_CLEAR_COLOR = 57345138; extern const char* NAME_ELEMENT_CLEAR_COLOR; const StringHash HASH_ELEMENT_PASS__CLEAR_COLOR = 57345138; extern const char* NAME_ELEMENT_PASS__CLEAR_COLOR; struct clear_color__AttributeData { static const clear_color__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_CLEAR_STENCIL = 168516268; extern const char* NAME_ELEMENT_CLEAR_STENCIL; const StringHash HASH_ELEMENT_PASS__CLEAR_STENCIL = 168516268; extern const char* NAME_ELEMENT_PASS__CLEAR_STENCIL; struct clear_stencil__AttributeData { static const clear_stencil__AttributeData DEFAULT; long value; const ParserChar* param; }; const StringHash HASH_ELEMENT_CLEAR_DEPTH = 57304760; extern const char* NAME_ELEMENT_CLEAR_DEPTH; const StringHash HASH_ELEMENT_PASS__CLEAR_DEPTH = 57304760; extern const char* NAME_ELEMENT_PASS__CLEAR_DEPTH; struct clear_depth__AttributeData { static const clear_depth__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_CLIP_PLANE = 221654501; extern const char* NAME_ELEMENT_CLIP_PLANE; const StringHash HASH_ELEMENT_PASS__CLIP_PLANE = 221654501; extern const char* NAME_ELEMENT_PASS__CLIP_PLANE; const StringHash HASH_ATTRIBUTE_INDEX = 7359176; extern const char* NAME_ATTRIBUTE_INDEX; struct clip_plane__AttributeData { static const clip_plane__AttributeData DEFAULT; GeneratedSaxParser::XSList<bool> value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_COLOR_MASK = 255276555; extern const char* NAME_ELEMENT_COLOR_MASK; const StringHash HASH_ELEMENT_PASS__COLOR_MASK = 255276555; extern const char* NAME_ELEMENT_PASS__COLOR_MASK; struct color_mask__AttributeData { static const color_mask__AttributeData DEFAULT; GeneratedSaxParser::XSList<bool> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_CULL_FACE = 160492501; extern const char* NAME_ELEMENT_CULL_FACE; const StringHash HASH_ELEMENT_PASS__CULL_FACE = 160492501; extern const char* NAME_ELEMENT_PASS__CULL_FACE; struct cull_face__AttributeData { static const cull_face__AttributeData DEFAULT; gl_face_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_DEPTH_FUNC = 60235923; extern const char* NAME_ELEMENT_DEPTH_FUNC; const StringHash HASH_ELEMENT_PASS__DEPTH_FUNC = 60235923; extern const char* NAME_ELEMENT_PASS__DEPTH_FUNC; struct depth_func__AttributeData { static const depth_func__AttributeData DEFAULT; gl_func_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_DEPTH_MASK = 60357707; extern const char* NAME_ELEMENT_DEPTH_MASK; const StringHash HASH_ELEMENT_PASS__DEPTH_MASK = 60357707; extern const char* NAME_ELEMENT_PASS__DEPTH_MASK; struct depth_mask__AttributeData { static const depth_mask__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_DEPTH_RANGE = 155470309; extern const char* NAME_ELEMENT_DEPTH_RANGE; const StringHash HASH_ELEMENT_PASS__DEPTH_RANGE = 155470309; extern const char* NAME_ELEMENT_PASS__DEPTH_RANGE; struct depth_range__AttributeData { static const depth_range__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_FOG_COLOR = 130910898; extern const char* NAME_ELEMENT_FOG_COLOR; const StringHash HASH_ELEMENT_PASS__FOG_COLOR = 130910898; extern const char* NAME_ELEMENT_PASS__FOG_COLOR; struct fog_color__AttributeData { static const fog_color__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_FOG_DENSITY = 263083897; extern const char* NAME_ELEMENT_FOG_DENSITY; const StringHash HASH_ELEMENT_PASS__FOG_DENSITY = 263083897; extern const char* NAME_ELEMENT_PASS__FOG_DENSITY; struct fog_density__AttributeData { static const fog_density__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_FOG_MODE = 226326293; extern const char* NAME_ELEMENT_FOG_MODE; const StringHash HASH_ELEMENT_PASS__FOG_MODE = 226326293; extern const char* NAME_ELEMENT_PASS__FOG_MODE; struct fog_mode__AttributeData { static const fog_mode__AttributeData DEFAULT; gl_fog_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_FOG_START = 134185796; extern const char* NAME_ELEMENT_FOG_START; const StringHash HASH_ELEMENT_PASS__FOG_START = 134185796; extern const char* NAME_ELEMENT_PASS__FOG_START; struct fog_start__AttributeData { static const fog_start__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_FOG_END = 198692708; extern const char* NAME_ELEMENT_FOG_END; const StringHash HASH_ELEMENT_PASS__FOG_END = 198692708; extern const char* NAME_ELEMENT_PASS__FOG_END; struct fog_end__AttributeData { static const fog_end__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_FRONT_FACE = 215446933; extern const char* NAME_ELEMENT_FRONT_FACE; const StringHash HASH_ELEMENT_PASS__FRONT_FACE = 215446933; extern const char* NAME_ELEMENT_PASS__FRONT_FACE; struct front_face__AttributeData { static const front_face__AttributeData DEFAULT; gl_front_face_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_PASS__TEXTURE_PIPELINE = 49503749; extern const char* NAME_ELEMENT_PASS__TEXTURE_PIPELINE; struct pass__texture_pipeline__AttributeData { static const pass__texture_pipeline__AttributeData DEFAULT; const ParserChar* param; }; const StringHash HASH_ELEMENT_TEXTURE_PIPELINE__VALUE = 255798677; extern const char* NAME_ELEMENT_TEXTURE_PIPELINE__VALUE; typedef newparam__texture_pipeline__AttributeData texture_pipeline__value__AttributeData; const StringHash HASH_ELEMENT_VALUE__TEXCOMBINER = 43651570; extern const char* NAME_ELEMENT_VALUE__TEXCOMBINER; const StringHash HASH_ELEMENT_VALUE__TEXENV = 170873110; extern const char* NAME_ELEMENT_VALUE__TEXENV; const StringHash HASH_ELEMENT_VALUE__EXTRA = 76857393; extern const char* NAME_ELEMENT_VALUE__EXTRA; const StringHash HASH_ELEMENT_LOGIC_OP = 225896240; extern const char* NAME_ELEMENT_LOGIC_OP; const StringHash HASH_ELEMENT_PASS__LOGIC_OP = 225896240; extern const char* NAME_ELEMENT_PASS__LOGIC_OP; struct logic_op__AttributeData { static const logic_op__AttributeData DEFAULT; gl_logic_op_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_LIGHT_AMBIENT = 72324916; extern const char* NAME_ELEMENT_LIGHT_AMBIENT; const StringHash HASH_ELEMENT_PASS__LIGHT_AMBIENT = 72324916; extern const char* NAME_ELEMENT_PASS__LIGHT_AMBIENT; struct light_ambient__AttributeData { static const light_ambient__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHT_DIFFUSE = 244036085; extern const char* NAME_ELEMENT_LIGHT_DIFFUSE; const StringHash HASH_ELEMENT_PASS__LIGHT_DIFFUSE = 244036085; extern const char* NAME_ELEMENT_PASS__LIGHT_DIFFUSE; struct light_diffuse__AttributeData { static const light_diffuse__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHT_SPECULAR = 30177122; extern const char* NAME_ELEMENT_LIGHT_SPECULAR; const StringHash HASH_ELEMENT_PASS__LIGHT_SPECULAR = 30177122; extern const char* NAME_ELEMENT_PASS__LIGHT_SPECULAR; struct light_specular__AttributeData { static const light_specular__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHT_POSITION = 32930670; extern const char* NAME_ELEMENT_LIGHT_POSITION; const StringHash HASH_ELEMENT_PASS__LIGHT_POSITION = 32930670; extern const char* NAME_ELEMENT_PASS__LIGHT_POSITION; struct light_position__AttributeData { static const light_position__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHT_CONSTANT_ATTENUATION = 248277070; extern const char* NAME_ELEMENT_LIGHT_CONSTANT_ATTENUATION; const StringHash HASH_ELEMENT_PASS__LIGHT_CONSTANT_ATTENUATION = 248277070; extern const char* NAME_ELEMENT_PASS__LIGHT_CONSTANT_ATTENUATION; struct light_constant_attenuation__AttributeData { static const light_constant_attenuation__AttributeData DEFAULT; double value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHT_LINEAR_ATTENUTATION = 263246110; extern const char* NAME_ELEMENT_LIGHT_LINEAR_ATTENUTATION; const StringHash HASH_ELEMENT_PASS__LIGHT_LINEAR_ATTENUTATION = 263246110; extern const char* NAME_ELEMENT_PASS__LIGHT_LINEAR_ATTENUTATION; struct light_linear_attenutation__AttributeData { static const light_linear_attenutation__AttributeData DEFAULT; double value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHT_QUADRATIC_ATTENUATION = 204850382; extern const char* NAME_ELEMENT_LIGHT_QUADRATIC_ATTENUATION; const StringHash HASH_ELEMENT_PASS__LIGHT_QUADRATIC_ATTENUATION = 204850382; extern const char* NAME_ELEMENT_PASS__LIGHT_QUADRATIC_ATTENUATION; struct light_quadratic_attenuation__AttributeData { static const light_quadratic_attenuation__AttributeData DEFAULT; double value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHT_SPOT_CUTOFF = 150116294; extern const char* NAME_ELEMENT_LIGHT_SPOT_CUTOFF; const StringHash HASH_ELEMENT_PASS__LIGHT_SPOT_CUTOFF = 150116294; extern const char* NAME_ELEMENT_PASS__LIGHT_SPOT_CUTOFF; struct light_spot_cutoff__AttributeData { static const light_spot_cutoff__AttributeData DEFAULT; double value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHT_SPOT_DIRECTION = 177881278; extern const char* NAME_ELEMENT_LIGHT_SPOT_DIRECTION; const StringHash HASH_ELEMENT_PASS__LIGHT_SPOT_DIRECTION = 177881278; extern const char* NAME_ELEMENT_PASS__LIGHT_SPOT_DIRECTION; struct light_spot_direction__AttributeData { static const light_spot_direction__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHT_SPOT_EXPONENT = 22561988; extern const char* NAME_ELEMENT_LIGHT_SPOT_EXPONENT; const StringHash HASH_ELEMENT_PASS__LIGHT_SPOT_EXPONENT = 22561988; extern const char* NAME_ELEMENT_PASS__LIGHT_SPOT_EXPONENT; struct light_spot_exponent__AttributeData { static const light_spot_exponent__AttributeData DEFAULT; double value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHT_MODEL_AMBIENT = 1382244; extern const char* NAME_ELEMENT_LIGHT_MODEL_AMBIENT; const StringHash HASH_ELEMENT_PASS__LIGHT_MODEL_AMBIENT = 1382244; extern const char* NAME_ELEMENT_PASS__LIGHT_MODEL_AMBIENT; struct light_model_ambient__AttributeData { static const light_model_ambient__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_LINE_WIDTH = 71217992; extern const char* NAME_ELEMENT_LINE_WIDTH; const StringHash HASH_ELEMENT_PASS__LINE_WIDTH = 71217992; extern const char* NAME_ELEMENT_PASS__LINE_WIDTH; struct line_width__AttributeData { static const line_width__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_MATERIAL_AMBIENT = 65325572; extern const char* NAME_ELEMENT_MATERIAL_AMBIENT; const StringHash HASH_ELEMENT_PASS__MATERIAL_AMBIENT = 65325572; extern const char* NAME_ELEMENT_PASS__MATERIAL_AMBIENT; struct material_ambient__AttributeData { static const material_ambient__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_MATERIAL_DIFFUSE = 253816517; extern const char* NAME_ELEMENT_MATERIAL_DIFFUSE; const StringHash HASH_ELEMENT_PASS__MATERIAL_DIFFUSE = 253816517; extern const char* NAME_ELEMENT_PASS__MATERIAL_DIFFUSE; struct material_diffuse__AttributeData { static const material_diffuse__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_MATERIAL_EMISSION = 264879022; extern const char* NAME_ELEMENT_MATERIAL_EMISSION; const StringHash HASH_ELEMENT_PASS__MATERIAL_EMISSION = 264879022; extern const char* NAME_ELEMENT_PASS__MATERIAL_EMISSION; struct material_emission__AttributeData { static const material_emission__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_MATERIAL_SHININESS = 75374739; extern const char* NAME_ELEMENT_MATERIAL_SHININESS; const StringHash HASH_ELEMENT_PASS__MATERIAL_SHININESS = 75374739; extern const char* NAME_ELEMENT_PASS__MATERIAL_SHININESS; struct material_shininess__AttributeData { static const material_shininess__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_MATERIAL_SPECULAR = 192521330; extern const char* NAME_ELEMENT_MATERIAL_SPECULAR; const StringHash HASH_ELEMENT_PASS__MATERIAL_SPECULAR = 192521330; extern const char* NAME_ELEMENT_PASS__MATERIAL_SPECULAR; struct material_specular__AttributeData { static const material_specular__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_MODEL_VIEW_MATRIX = 23238152; extern const char* NAME_ELEMENT_MODEL_VIEW_MATRIX; const StringHash HASH_ELEMENT_PASS__MODEL_VIEW_MATRIX = 23238152; extern const char* NAME_ELEMENT_PASS__MODEL_VIEW_MATRIX; struct model_view_matrix__AttributeData { static const model_view_matrix__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_POINT_DISTANCE_ATTENUATION = 220636846; extern const char* NAME_ELEMENT_POINT_DISTANCE_ATTENUATION; const StringHash HASH_ELEMENT_PASS__POINT_DISTANCE_ATTENUATION = 220636846; extern const char* NAME_ELEMENT_PASS__POINT_DISTANCE_ATTENUATION; struct point_distance_attenuation__AttributeData { static const point_distance_attenuation__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_POINT_FADE_THRESHOLD_SIZE = 13010885; extern const char* NAME_ELEMENT_POINT_FADE_THRESHOLD_SIZE; const StringHash HASH_ELEMENT_PASS__POINT_FADE_THRESHOLD_SIZE = 13010885; extern const char* NAME_ELEMENT_PASS__POINT_FADE_THRESHOLD_SIZE; struct point_fade_threshold_size__AttributeData { static const point_fade_threshold_size__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_POINT_SIZE = 215457381; extern const char* NAME_ELEMENT_POINT_SIZE; const StringHash HASH_ELEMENT_PASS__POINT_SIZE = 215457381; extern const char* NAME_ELEMENT_PASS__POINT_SIZE; struct point_size__AttributeData { static const point_size__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_POINT_SIZE_MIN = 241669230; extern const char* NAME_ELEMENT_POINT_SIZE_MIN; const StringHash HASH_ELEMENT_PASS__POINT_SIZE_MIN = 241669230; extern const char* NAME_ELEMENT_PASS__POINT_SIZE_MIN; struct point_size_min__AttributeData { static const point_size_min__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_POINT_SIZE_MAX = 241669144; extern const char* NAME_ELEMENT_POINT_SIZE_MAX; const StringHash HASH_ELEMENT_PASS__POINT_SIZE_MAX = 241669144; extern const char* NAME_ELEMENT_PASS__POINT_SIZE_MAX; struct point_size_max__AttributeData { static const point_size_max__AttributeData DEFAULT; double value; const ParserChar* param; }; const StringHash HASH_ELEMENT_POLYGON_OFFSET = 214584564; extern const char* NAME_ELEMENT_POLYGON_OFFSET; const StringHash HASH_ELEMENT_PASS__POLYGON_OFFSET = 214584564; extern const char* NAME_ELEMENT_PASS__POLYGON_OFFSET; struct polygon_offset__AttributeData { static const polygon_offset__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_PROJECTION_MATRIX = 209936312; extern const char* NAME_ELEMENT_PROJECTION_MATRIX; const StringHash HASH_ELEMENT_PASS__PROJECTION_MATRIX = 209936312; extern const char* NAME_ELEMENT_PASS__PROJECTION_MATRIX; struct projection_matrix__AttributeData { static const projection_matrix__AttributeData DEFAULT; GeneratedSaxParser::XSList<double> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_SCISSOR = 254426482; extern const char* NAME_ELEMENT_SCISSOR; const StringHash HASH_ELEMENT_PASS__SCISSOR = 254426482; extern const char* NAME_ELEMENT_PASS__SCISSOR; struct scissor__AttributeData { static const scissor__AttributeData DEFAULT; GeneratedSaxParser::XSList<long> value; const ParserChar* param; }; const StringHash HASH_ELEMENT_SHADE_MODEL = 6109180; extern const char* NAME_ELEMENT_SHADE_MODEL; const StringHash HASH_ELEMENT_PASS__SHADE_MODEL = 6109180; extern const char* NAME_ELEMENT_PASS__SHADE_MODEL; struct shade_model__AttributeData { static const shade_model__AttributeData DEFAULT; gl_shade_model_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_STENCIL_FUNC = 266860419; extern const char* NAME_ELEMENT_STENCIL_FUNC; const StringHash HASH_ELEMENT_PASS__STENCIL_FUNC = 266860419; extern const char* NAME_ELEMENT_PASS__STENCIL_FUNC; const StringHash HASH_ELEMENT_STENCIL_FUNC__FUNC = 43711635; extern const char* NAME_ELEMENT_STENCIL_FUNC__FUNC; struct stencil_func__func__AttributeData { static const stencil_func__func__AttributeData DEFAULT; gl_func_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_REF = 220830390; extern const char* NAME_ELEMENT_REF; const StringHash HASH_ELEMENT_STENCIL_FUNC__REF = 220830390; extern const char* NAME_ELEMENT_STENCIL_FUNC__REF; struct stencil_func__ref__AttributeData { static const stencil_func__ref__AttributeData DEFAULT; unsigned short value; const ParserChar* param; }; const StringHash HASH_ELEMENT_MASK = 43718731; extern const char* NAME_ELEMENT_MASK; const StringHash HASH_ELEMENT_STENCIL_FUNC__MASK = 43718731; extern const char* NAME_ELEMENT_STENCIL_FUNC__MASK; struct stencil_func__mask__AttributeData { static const stencil_func__mask__AttributeData DEFAULT; unsigned short value; const ParserChar* param; }; const StringHash HASH_ELEMENT_STENCIL_MASK = 266868059; extern const char* NAME_ELEMENT_STENCIL_MASK; const StringHash HASH_ELEMENT_PASS__STENCIL_MASK = 266868059; extern const char* NAME_ELEMENT_PASS__STENCIL_MASK; struct stencil_mask__AttributeData { static const stencil_mask__AttributeData DEFAULT; long value; const ParserChar* param; }; const StringHash HASH_ELEMENT_STENCIL_OP = 231729216; extern const char* NAME_ELEMENT_STENCIL_OP; const StringHash HASH_ELEMENT_PASS__STENCIL_OP = 231729216; extern const char* NAME_ELEMENT_PASS__STENCIL_OP; const StringHash HASH_ELEMENT_FAIL = 49026908; extern const char* NAME_ELEMENT_FAIL; const StringHash HASH_ELEMENT_STENCIL_OP__FAIL = 49026908; extern const char* NAME_ELEMENT_STENCIL_OP__FAIL; struct stencil_op__fail__AttributeData { static const stencil_op__fail__AttributeData DEFAULT; gles_stencil_op_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_ZFAIL = 252562908; extern const char* NAME_ELEMENT_ZFAIL; const StringHash HASH_ELEMENT_STENCIL_OP__ZFAIL = 252562908; extern const char* NAME_ELEMENT_STENCIL_OP__ZFAIL; struct stencil_op__zfail__AttributeData { static const stencil_op__zfail__AttributeData DEFAULT; gles_stencil_op_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_ZPASS = 252469891; extern const char* NAME_ELEMENT_ZPASS; const StringHash HASH_ELEMENT_STENCIL_OP__ZPASS = 252469891; extern const char* NAME_ELEMENT_STENCIL_OP__ZPASS; struct stencil_op__zpass__AttributeData { static const stencil_op__zpass__AttributeData DEFAULT; gles_stencil_op_type value; const ParserChar* param; }; const StringHash HASH_ELEMENT_ALPHA_TEST_ENABLE = 34344917; extern const char* NAME_ELEMENT_ALPHA_TEST_ENABLE; const StringHash HASH_ELEMENT_PASS__ALPHA_TEST_ENABLE = 34344917; extern const char* NAME_ELEMENT_PASS__ALPHA_TEST_ENABLE; struct alpha_test_enable__AttributeData { static const alpha_test_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_BLEND_ENABLE = 123623157; extern const char* NAME_ELEMENT_BLEND_ENABLE; const StringHash HASH_ELEMENT_PASS__BLEND_ENABLE = 123623157; extern const char* NAME_ELEMENT_PASS__BLEND_ENABLE; struct blend_enable__AttributeData { static const blend_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_CLIP_PLANE_ENABLE = 115779493; extern const char* NAME_ELEMENT_CLIP_PLANE_ENABLE; const StringHash HASH_ELEMENT_PASS__CLIP_PLANE_ENABLE = 115779493; extern const char* NAME_ELEMENT_PASS__CLIP_PLANE_ENABLE; struct clip_plane_enable__AttributeData { static const clip_plane_enable__AttributeData DEFAULT; bool value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_COLOR_LOGIC_OP_ENABLE = 29904597; extern const char* NAME_ELEMENT_COLOR_LOGIC_OP_ENABLE; const StringHash HASH_ELEMENT_PASS__COLOR_LOGIC_OP_ENABLE = 29904597; extern const char* NAME_ELEMENT_PASS__COLOR_LOGIC_OP_ENABLE; struct color_logic_op_enable__AttributeData { static const color_logic_op_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_COLOR_MATERIAL_ENABLE = 111148709; extern const char* NAME_ELEMENT_COLOR_MATERIAL_ENABLE; const StringHash HASH_ELEMENT_PASS__COLOR_MATERIAL_ENABLE = 111148709; extern const char* NAME_ELEMENT_PASS__COLOR_MATERIAL_ENABLE; struct color_material_enable__AttributeData { static const color_material_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_CULL_FACE_ENABLE = 214615653; extern const char* NAME_ELEMENT_CULL_FACE_ENABLE; const StringHash HASH_ELEMENT_PASS__CULL_FACE_ENABLE = 214615653; extern const char* NAME_ELEMENT_PASS__CULL_FACE_ENABLE; struct cull_face_enable__AttributeData { static const cull_face_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_DEPTH_TEST_ENABLE = 218300565; extern const char* NAME_ELEMENT_DEPTH_TEST_ENABLE; const StringHash HASH_ELEMENT_PASS__DEPTH_TEST_ENABLE = 218300565; extern const char* NAME_ELEMENT_PASS__DEPTH_TEST_ENABLE; struct depth_test_enable__AttributeData { static const depth_test_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_DITHER_ENABLE = 138674757; extern const char* NAME_ELEMENT_DITHER_ENABLE; const StringHash HASH_ELEMENT_PASS__DITHER_ENABLE = 138674757; extern const char* NAME_ELEMENT_PASS__DITHER_ENABLE; struct dither_enable__AttributeData { static const dither_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_FOG_ENABLE = 217499221; extern const char* NAME_ELEMENT_FOG_ENABLE; const StringHash HASH_ELEMENT_PASS__FOG_ENABLE = 217499221; extern const char* NAME_ELEMENT_PASS__FOG_ENABLE; struct fog_enable__AttributeData { static const fog_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_TEXTURE_PIPELINE_ENABLE = 177314229; extern const char* NAME_ELEMENT_TEXTURE_PIPELINE_ENABLE; const StringHash HASH_ELEMENT_PASS__TEXTURE_PIPELINE_ENABLE = 177314229; extern const char* NAME_ELEMENT_PASS__TEXTURE_PIPELINE_ENABLE; struct texture_pipeline_enable__AttributeData { static const texture_pipeline_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_LIGHT_ENABLE = 117641205; extern const char* NAME_ELEMENT_LIGHT_ENABLE; const StringHash HASH_ELEMENT_PASS__LIGHT_ENABLE = 117641205; extern const char* NAME_ELEMENT_PASS__LIGHT_ENABLE; struct light_enable__AttributeData { static const light_enable__AttributeData DEFAULT; bool value; const ParserChar* param; long index; }; const StringHash HASH_ELEMENT_LIGHTING_ENABLE = 48998885; extern const char* NAME_ELEMENT_LIGHTING_ENABLE; const StringHash HASH_ELEMENT_PASS__LIGHTING_ENABLE = 48998885; extern const char* NAME_ELEMENT_PASS__LIGHTING_ENABLE; struct lighting_enable__AttributeData { static const lighting_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_LIGHT_MODEL_TWO_SIDE_ENABLE = 255891349; extern const char* NAME_ELEMENT_LIGHT_MODEL_TWO_SIDE_ENABLE; const StringHash HASH_ELEMENT_PASS__LIGHT_MODEL_TWO_SIDE_ENABLE = 255891349; extern const char* NAME_ELEMENT_PASS__LIGHT_MODEL_TWO_SIDE_ENABLE; struct light_model_two_side_enable__AttributeData { static const light_model_two_side_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_LINE_SMOOTH_ENABLE = 239794133; extern const char* NAME_ELEMENT_LINE_SMOOTH_ENABLE; const StringHash HASH_ELEMENT_PASS__LINE_SMOOTH_ENABLE = 239794133; extern const char* NAME_ELEMENT_PASS__LINE_SMOOTH_ENABLE; struct line_smooth_enable__AttributeData { static const line_smooth_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_MULTISAMPLE_ENABLE = 266698789; extern const char* NAME_ELEMENT_MULTISAMPLE_ENABLE; const StringHash HASH_ELEMENT_PASS__MULTISAMPLE_ENABLE = 266698789; extern const char* NAME_ELEMENT_PASS__MULTISAMPLE_ENABLE; struct multisample_enable__AttributeData { static const multisample_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_NORMALIZE_ENABLE = 261502853; extern const char* NAME_ELEMENT_NORMALIZE_ENABLE; const StringHash HASH_ELEMENT_PASS__NORMALIZE_ENABLE = 261502853; extern const char* NAME_ELEMENT_PASS__NORMALIZE_ENABLE; struct normalize_enable__AttributeData { static const normalize_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_POINT_SMOOTH_ENABLE = 206626965; extern const char* NAME_ELEMENT_POINT_SMOOTH_ENABLE; const StringHash HASH_ELEMENT_PASS__POINT_SMOOTH_ENABLE = 206626965; extern const char* NAME_ELEMENT_PASS__POINT_SMOOTH_ENABLE; struct point_smooth_enable__AttributeData { static const point_smooth_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_POLYGON_OFFSET_FILL_ENABLE = 53655765; extern const char* NAME_ELEMENT_POLYGON_OFFSET_FILL_ENABLE; const StringHash HASH_ELEMENT_PASS__POLYGON_OFFSET_FILL_ENABLE = 53655765; extern const char* NAME_ELEMENT_PASS__POLYGON_OFFSET_FILL_ENABLE; struct polygon_offset_fill_enable__AttributeData { static const polygon_offset_fill_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_RESCALE_NORMAL_ENABLE = 233340005; extern const char* NAME_ELEMENT_RESCALE_NORMAL_ENABLE; const StringHash HASH_ELEMENT_PASS__RESCALE_NORMAL_ENABLE = 233340005; extern const char* NAME_ELEMENT_PASS__RESCALE_NORMAL_ENABLE; struct rescale_normal_enable__AttributeData { static const rescale_normal_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_SAMPLE_ALPHA_TO_COVERAGE_ENABLE = 173355765; extern const char* NAME_ELEMENT_SAMPLE_ALPHA_TO_COVERAGE_ENABLE; const StringHash HASH_ELEMENT_PASS__SAMPLE_ALPHA_TO_COVERAGE_ENABLE = 173355765; extern const char* NAME_ELEMENT_PASS__SAMPLE_ALPHA_TO_COVERAGE_ENABLE; struct sample_alpha_to_coverage_enable__AttributeData { static const sample_alpha_to_coverage_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_SAMPLE_ALPHA_TO_ONE_ENABLE = 103906693; extern const char* NAME_ELEMENT_SAMPLE_ALPHA_TO_ONE_ENABLE; const StringHash HASH_ELEMENT_PASS__SAMPLE_ALPHA_TO_ONE_ENABLE = 103906693; extern const char* NAME_ELEMENT_PASS__SAMPLE_ALPHA_TO_ONE_ENABLE; struct sample_alpha_to_one_enable__AttributeData { static const sample_alpha_to_one_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_SAMPLE_COVERAGE_ENABLE = 152395877; extern const char* NAME_ELEMENT_SAMPLE_COVERAGE_ENABLE; const StringHash HASH_ELEMENT_PASS__SAMPLE_COVERAGE_ENABLE = 152395877; extern const char* NAME_ELEMENT_PASS__SAMPLE_COVERAGE_ENABLE; struct sample_coverage_enable__AttributeData { static const sample_coverage_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_SCISSOR_TEST_ENABLE = 218403029; extern const char* NAME_ELEMENT_SCISSOR_TEST_ENABLE; const StringHash HASH_ELEMENT_PASS__SCISSOR_TEST_ENABLE = 218403029; extern const char* NAME_ELEMENT_PASS__SCISSOR_TEST_ENABLE; struct scissor_test_enable__AttributeData { static const scissor_test_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_STENCIL_TEST_ENABLE = 202141525; extern const char* NAME_ELEMENT_STENCIL_TEST_ENABLE; const StringHash HASH_ELEMENT_PASS__STENCIL_TEST_ENABLE = 202141525; extern const char* NAME_ELEMENT_PASS__STENCIL_TEST_ENABLE; struct stencil_test_enable__AttributeData { static const stencil_test_enable__AttributeData DEFAULT; bool value; const ParserChar* param; }; const StringHash HASH_ELEMENT_PASS__EXTRA = 86667537; extern const char* NAME_ELEMENT_PASS__EXTRA; const StringHash HASH_ELEMENT_TECHNIQUE__EXTRA = 202103745; extern const char* NAME_ELEMENT_TECHNIQUE__EXTRA; const StringHash HASH_ELEMENT_PROFILE_GLES__EXTRA = 200483169; extern const char* NAME_ELEMENT_PROFILE_GLES__EXTRA; const StringHash HASH_ELEMENT_COLLADA = 138479041; extern const char* NAME_ELEMENT_COLLADA; const StringHash HASH_ATTRIBUTE_VERSION = 214540334; extern const char* NAME_ATTRIBUTE_VERSION; const StringHash HASH_ATTRIBUTE_BASE = 428181; extern const char* NAME_ATTRIBUTE_BASE; struct COLLADA__AttributeData { static const COLLADA__AttributeData DEFAULT; VersionType version; const ParserChar* base; }; const StringHash HASH_ELEMENT_COLLADA__ASSET = 21558580; extern const char* NAME_ELEMENT_COLLADA__ASSET; const StringHash HASH_ELEMENT_LIBRARY_ANIMATIONS = 257283875; extern const char* NAME_ELEMENT_LIBRARY_ANIMATIONS; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_ANIMATIONS = 257283875; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_ANIMATIONS; struct library_animations__AttributeData { static const library_animations__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_ANIMATIONS__ASSET = 39388324; extern const char* NAME_ELEMENT_LIBRARY_ANIMATIONS__ASSET; const StringHash HASH_ELEMENT_ANIMATION = 56293822; extern const char* NAME_ELEMENT_ANIMATION; const StringHash HASH_ELEMENT_LIBRARY_ANIMATIONS__ANIMATION = 56293822; extern const char* NAME_ELEMENT_LIBRARY_ANIMATIONS__ANIMATION; struct animation__AttributeData { static const animation__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_ANIMATION__ASSET = 148121732; extern const char* NAME_ELEMENT_ANIMATION__ASSET; const StringHash HASH_ELEMENT_SOURCE = 242146325; extern const char* NAME_ELEMENT_SOURCE; const StringHash HASH_ELEMENT_ANIMATION__SOURCE = 242146325; extern const char* NAME_ELEMENT_ANIMATION__SOURCE; struct animation__source__AttributeData { static const animation__source__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_SOURCE__ASSET = 255074340; extern const char* NAME_ELEMENT_SOURCE__ASSET; const StringHash HASH_ELEMENT_IDREF_ARRAY = 84510713; extern const char* NAME_ELEMENT_IDREF_ARRAY; const StringHash HASH_ELEMENT_SOURCE__IDREF_ARRAY = 84510713; extern const char* NAME_ELEMENT_SOURCE__IDREF_ARRAY; const StringHash HASH_ATTRIBUTE_COUNT = 6974548; extern const char* NAME_ATTRIBUTE_COUNT; struct IDREF_array__AttributeData { static const IDREF_array__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; unsigned long long count; }; const StringHash HASH_ELEMENT_NAME_ARRAY = 95291433; extern const char* NAME_ELEMENT_NAME_ARRAY; const StringHash HASH_ELEMENT_SOURCE__NAME_ARRAY = 95291433; extern const char* NAME_ELEMENT_SOURCE__NAME_ARRAY; struct Name_array__AttributeData { static const Name_array__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; unsigned long long count; }; const StringHash HASH_ELEMENT_BOOL_ARRAY = 11257449; extern const char* NAME_ELEMENT_BOOL_ARRAY; const StringHash HASH_ELEMENT_SOURCE__BOOL_ARRAY = 11257449; extern const char* NAME_ELEMENT_SOURCE__BOOL_ARRAY; struct bool_array__AttributeData { static const bool_array__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; unsigned long long count; }; const StringHash HASH_ELEMENT_FLOAT_ARRAY = 124331241; extern const char* NAME_ELEMENT_FLOAT_ARRAY; const StringHash HASH_ELEMENT_SOURCE__FLOAT_ARRAY = 124331241; extern const char* NAME_ELEMENT_SOURCE__FLOAT_ARRAY; const StringHash HASH_ATTRIBUTE_DIGITS = 112189619; extern const char* NAME_ATTRIBUTE_DIGITS; const StringHash HASH_ATTRIBUTE_MAGNITUDE = 240175317; extern const char* NAME_ATTRIBUTE_MAGNITUDE; struct float_array__AttributeData { static const float_array__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; unsigned long long count; int digits; int magnitude; }; const StringHash HASH_ELEMENT_INT_ARRAY = 28814425; extern const char* NAME_ELEMENT_INT_ARRAY; const StringHash HASH_ELEMENT_SOURCE__INT_ARRAY = 28814425; extern const char* NAME_ELEMENT_SOURCE__INT_ARRAY; const StringHash HASH_ATTRIBUTE_MININCLUSIVE = 259829893; extern const char* NAME_ATTRIBUTE_MININCLUSIVE; const StringHash HASH_ATTRIBUTE_MAXINCLUSIVE = 251940997; extern const char* NAME_ATTRIBUTE_MAXINCLUSIVE; struct int_array__AttributeData { static const int_array__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; unsigned long long count; long minInclusive; long maxInclusive; }; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON = 73854190; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON; const StringHash HASH_ELEMENT_SOURCE__TECHNIQUE_COMMON = 73854190; extern const char* NAME_ELEMENT_SOURCE__TECHNIQUE_COMMON; const StringHash HASH_ELEMENT_ACCESSOR = 230035506; extern const char* NAME_ELEMENT_ACCESSOR; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__ACCESSOR = 230035506; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__ACCESSOR; const StringHash HASH_ATTRIBUTE_OFFSET = 123525572; extern const char* NAME_ATTRIBUTE_OFFSET; const StringHash HASH_ATTRIBUTE_STRIDE = 128683941; extern const char* NAME_ATTRIBUTE_STRIDE; struct accessor__AttributeData { static const accessor__AttributeData DEFAULT; unsigned long long count; unsigned long long offset; const ParserChar* source; unsigned long long stride; }; const StringHash HASH_ELEMENT_PARAM = 246253965; extern const char* NAME_ELEMENT_PARAM; const StringHash HASH_ELEMENT_ACCESSOR__PARAM = 246253965; extern const char* NAME_ELEMENT_ACCESSOR__PARAM; struct accessor__param__AttributeData { static const accessor__param__AttributeData DEFAULT; const ParserChar* name; const ParserChar* sid; const ParserChar* semantic; const ParserChar* type; }; const StringHash HASH_ELEMENT_SOURCE__TECHNIQUE = 1838725; extern const char* NAME_ELEMENT_SOURCE__TECHNIQUE; typedef extra__technique__AttributeData source__technique__AttributeData; const StringHash HASH_ELEMENT_SAMPLER = 101005858; extern const char* NAME_ELEMENT_SAMPLER; const StringHash HASH_ELEMENT_ANIMATION__SAMPLER = 101005858; extern const char* NAME_ELEMENT_ANIMATION__SAMPLER; struct sampler__AttributeData { static const sampler__AttributeData DEFAULT; const ParserChar* id; }; const StringHash HASH_ELEMENT_INPUT = 219774004; extern const char* NAME_ELEMENT_INPUT; const StringHash HASH_ELEMENT_SAMPLER__INPUT = 219774004; extern const char* NAME_ELEMENT_SAMPLER__INPUT; struct sampler__input__AttributeData { static const sampler__input__AttributeData DEFAULT; const ParserChar* semantic; const ParserChar* source; }; const StringHash HASH_ELEMENT_CHANNEL = 90643564; extern const char* NAME_ELEMENT_CHANNEL; const StringHash HASH_ELEMENT_ANIMATION__CHANNEL = 90643564; extern const char* NAME_ELEMENT_ANIMATION__CHANNEL; const StringHash HASH_ATTRIBUTE_TARGET = 128486852; extern const char* NAME_ATTRIBUTE_TARGET; struct channel__AttributeData { static const channel__AttributeData DEFAULT; const ParserChar* source; const ParserChar* target; }; const StringHash HASH_ELEMENT_ANIMATION__ANIMATION = 259028126; extern const char* NAME_ELEMENT_ANIMATION__ANIMATION; const StringHash HASH_ELEMENT_ANIMATION__EXTRA = 147880641; extern const char* NAME_ELEMENT_ANIMATION__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_ANIMATIONS__EXTRA = 39671521; extern const char* NAME_ELEMENT_LIBRARY_ANIMATIONS__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_ANIMATION_CLIPS = 95259907; extern const char* NAME_ELEMENT_LIBRARY_ANIMATION_CLIPS; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_ANIMATION_CLIPS = 95259907; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_ANIMATION_CLIPS; struct library_animation_clips__AttributeData { static const library_animation_clips__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_ANIMATION_CLIPS__ASSET = 227259540; extern const char* NAME_ELEMENT_LIBRARY_ANIMATION_CLIPS__ASSET; const StringHash HASH_ELEMENT_ANIMATION_CLIP = 18076080; extern const char* NAME_ELEMENT_ANIMATION_CLIP; const StringHash HASH_ELEMENT_LIBRARY_ANIMATION_CLIPS__ANIMATION_CLIP = 18076080; extern const char* NAME_ELEMENT_LIBRARY_ANIMATION_CLIPS__ANIMATION_CLIP; const StringHash HASH_ATTRIBUTE_START = 8038548; extern const char* NAME_ATTRIBUTE_START; const StringHash HASH_ATTRIBUTE_END = 27716; extern const char* NAME_ATTRIBUTE_END; struct animation_clip__AttributeData { static const animation_clip__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; double start; double end; }; const StringHash HASH_ELEMENT_ANIMATION_CLIP__ASSET = 20599188; extern const char* NAME_ELEMENT_ANIMATION_CLIP__ASSET; const StringHash HASH_ELEMENT_INSTANCE_ANIMATION = 155834222; extern const char* NAME_ELEMENT_INSTANCE_ANIMATION; const StringHash HASH_ELEMENT_ANIMATION_CLIP__INSTANCE_ANIMATION = 155834222; extern const char* NAME_ELEMENT_ANIMATION_CLIP__INSTANCE_ANIMATION; const StringHash HASH_ATTRIBUTE_URL = 31884; extern const char* NAME_ATTRIBUTE_URL; struct instance_animation__AttributeData { static const instance_animation__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_INSTANCE_ANIMATION__EXTRA = 249155953; extern const char* NAME_ELEMENT_INSTANCE_ANIMATION__EXTRA; const StringHash HASH_ELEMENT_ANIMATION_CLIP__EXTRA = 20841425; extern const char* NAME_ELEMENT_ANIMATION_CLIP__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_ANIMATION_CLIPS__EXTRA = 227534545; extern const char* NAME_ELEMENT_LIBRARY_ANIMATION_CLIPS__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_CAMERAS = 203031923; extern const char* NAME_ELEMENT_LIBRARY_CAMERAS; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_CAMERAS = 203031923; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_CAMERAS; struct library_cameras__AttributeData { static const library_cameras__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_CAMERAS__ASSET = 99285860; extern const char* NAME_ELEMENT_LIBRARY_CAMERAS__ASSET; const StringHash HASH_ELEMENT_CAMERA = 246617809; extern const char* NAME_ELEMENT_CAMERA; const StringHash HASH_ELEMENT_LIBRARY_CAMERAS__CAMERA = 246617809; extern const char* NAME_ELEMENT_LIBRARY_CAMERAS__CAMERA; struct camera__AttributeData { static const camera__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_CAMERA__ASSET = 249258452; extern const char* NAME_ELEMENT_CAMERA__ASSET; const StringHash HASH_ELEMENT_OPTICS = 240856643; extern const char* NAME_ELEMENT_OPTICS; const StringHash HASH_ELEMENT_CAMERA__OPTICS = 240856643; extern const char* NAME_ELEMENT_CAMERA__OPTICS; const StringHash HASH_ELEMENT_OPTICS__TECHNIQUE_COMMON = 170249678; extern const char* NAME_ELEMENT_OPTICS__TECHNIQUE_COMMON; const StringHash HASH_ELEMENT_ORTHOGRAPHIC = 163965699; extern const char* NAME_ELEMENT_ORTHOGRAPHIC; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__ORTHOGRAPHIC = 163965699; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__ORTHOGRAPHIC; const StringHash HASH_ELEMENT_XMAG = 45560535; extern const char* NAME_ELEMENT_XMAG; const StringHash HASH_ELEMENT_ORTHOGRAPHIC__XMAG = 45560535; extern const char* NAME_ELEMENT_ORTHOGRAPHIC__XMAG; struct xmag__AttributeData { static const xmag__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_YMAG = 45564631; extern const char* NAME_ELEMENT_YMAG; const StringHash HASH_ELEMENT_ORTHOGRAPHIC__YMAG = 45564631; extern const char* NAME_ELEMENT_ORTHOGRAPHIC__YMAG; struct ymag__AttributeData { static const ymag__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_ASPECT_RATIO = 237192175; extern const char* NAME_ELEMENT_ASPECT_RATIO; const StringHash HASH_ELEMENT_ORTHOGRAPHIC__ASPECT_RATIO = 237192175; extern const char* NAME_ELEMENT_ORTHOGRAPHIC__ASPECT_RATIO; struct aspect_ratio__AttributeData { static const aspect_ratio__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_ZNEAR = 193810850; extern const char* NAME_ELEMENT_ZNEAR; const StringHash HASH_ELEMENT_ORTHOGRAPHIC__ZNEAR = 193810850; extern const char* NAME_ELEMENT_ORTHOGRAPHIC__ZNEAR; struct znear__AttributeData { static const znear__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_ZFAR = 45665570; extern const char* NAME_ELEMENT_ZFAR; const StringHash HASH_ELEMENT_ORTHOGRAPHIC__ZFAR = 45665570; extern const char* NAME_ELEMENT_ORTHOGRAPHIC__ZFAR; struct zfar__AttributeData { static const zfar__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_PERSPECTIVE = 216939461; extern const char* NAME_ELEMENT_PERSPECTIVE; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__PERSPECTIVE = 216939461; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__PERSPECTIVE; const StringHash HASH_ELEMENT_XFOV = 228234758; extern const char* NAME_ELEMENT_XFOV; const StringHash HASH_ELEMENT_PERSPECTIVE__XFOV = 228234758; extern const char* NAME_ELEMENT_PERSPECTIVE__XFOV; struct xfov__AttributeData { static const xfov__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_YFOV = 228230662; extern const char* NAME_ELEMENT_YFOV; const StringHash HASH_ELEMENT_PERSPECTIVE__YFOV = 228230662; extern const char* NAME_ELEMENT_PERSPECTIVE__YFOV; struct yfov__AttributeData { static const yfov__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_PERSPECTIVE__ASPECT_RATIO = 26971343; extern const char* NAME_ELEMENT_PERSPECTIVE__ASPECT_RATIO; const StringHash HASH_ELEMENT_PERSPECTIVE__ZNEAR = 163110226; extern const char* NAME_ELEMENT_PERSPECTIVE__ZNEAR; const StringHash HASH_ELEMENT_PERSPECTIVE__ZFAR = 228292066; extern const char* NAME_ELEMENT_PERSPECTIVE__ZFAR; const StringHash HASH_ELEMENT_OPTICS__TECHNIQUE = 49813749; extern const char* NAME_ELEMENT_OPTICS__TECHNIQUE; typedef extra__technique__AttributeData optics__technique__AttributeData; const StringHash HASH_ELEMENT_OPTICS__EXTRA = 52822145; extern const char* NAME_ELEMENT_OPTICS__EXTRA; const StringHash HASH_ELEMENT_IMAGER = 232782882; extern const char* NAME_ELEMENT_IMAGER; const StringHash HASH_ELEMENT_CAMERA__IMAGER = 232782882; extern const char* NAME_ELEMENT_CAMERA__IMAGER; const StringHash HASH_ELEMENT_IMAGER__TECHNIQUE = 100816341; extern const char* NAME_ELEMENT_IMAGER__TECHNIQUE; typedef extra__technique__AttributeData imager__technique__AttributeData; const StringHash HASH_ELEMENT_IMAGER__EXTRA = 90908561; extern const char* NAME_ELEMENT_IMAGER__EXTRA; const StringHash HASH_ELEMENT_CAMERA__EXTRA = 249508753; extern const char* NAME_ELEMENT_CAMERA__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_CAMERAS__EXTRA = 99526945; extern const char* NAME_ELEMENT_LIBRARY_CAMERAS__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_CONTROLLERS = 113250531; extern const char* NAME_ELEMENT_LIBRARY_CONTROLLERS; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_CONTROLLERS = 113250531; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_CONTROLLERS; struct library_controllers__AttributeData { static const library_controllers__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_CONTROLLERS__ASSET = 85243076; extern const char* NAME_ELEMENT_LIBRARY_CONTROLLERS__ASSET; const StringHash HASH_ELEMENT_CONTROLLER = 199579458; extern const char* NAME_ELEMENT_CONTROLLER; const StringHash HASH_ELEMENT_LIBRARY_CONTROLLERS__CONTROLLER = 199579458; extern const char* NAME_ELEMENT_LIBRARY_CONTROLLERS__CONTROLLER; struct controller__AttributeData { static const controller__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_CONTROLLER__ASSET = 236052500; extern const char* NAME_ELEMENT_CONTROLLER__ASSET; const StringHash HASH_ELEMENT_SKIN = 232920430; extern const char* NAME_ELEMENT_SKIN; const StringHash HASH_ELEMENT_CONTROLLER__SKIN = 232920430; extern const char* NAME_ELEMENT_CONTROLLER__SKIN; struct skin__AttributeData { static const skin__AttributeData DEFAULT; const ParserChar* source; }; const StringHash HASH_ELEMENT_BIND_SHAPE_MATRIX = 126147416; extern const char* NAME_ELEMENT_BIND_SHAPE_MATRIX; const StringHash HASH_ELEMENT_SKIN__BIND_SHAPE_MATRIX = 126147416; extern const char* NAME_ELEMENT_SKIN__BIND_SHAPE_MATRIX; const StringHash HASH_ELEMENT_SKIN__SOURCE = 21286085; extern const char* NAME_ELEMENT_SKIN__SOURCE; typedef animation__source__AttributeData skin__source__AttributeData; const StringHash HASH_ELEMENT_JOINTS = 62390755; extern const char* NAME_ELEMENT_JOINTS; const StringHash HASH_ELEMENT_SKIN__JOINTS = 62390755; extern const char* NAME_ELEMENT_SKIN__JOINTS; const StringHash HASH_ELEMENT_JOINTS__INPUT = 104860612; extern const char* NAME_ELEMENT_JOINTS__INPUT; typedef sampler__input__AttributeData joints__input__AttributeData; const StringHash HASH_ELEMENT_JOINTS__EXTRA = 104638337; extern const char* NAME_ELEMENT_JOINTS__EXTRA; const StringHash HASH_ELEMENT_VERTEX_WEIGHTS = 52511411; extern const char* NAME_ELEMENT_VERTEX_WEIGHTS; const StringHash HASH_ELEMENT_SKIN__VERTEX_WEIGHTS = 52511411; extern const char* NAME_ELEMENT_SKIN__VERTEX_WEIGHTS; struct vertex_weights__AttributeData { static const vertex_weights__AttributeData DEFAULT; unsigned long long count; }; const StringHash HASH_ELEMENT_VERTEX_WEIGHTS__INPUT = 118429284; extern const char* NAME_ELEMENT_VERTEX_WEIGHTS__INPUT; const StringHash HASH_ATTRIBUTE_SET = 31172; extern const char* NAME_ATTRIBUTE_SET; struct vertex_weights__input__AttributeData { static const vertex_weights__input__AttributeData DEFAULT; unsigned long long offset; const ParserChar* semantic; const ParserChar* source; unsigned long long set; }; const StringHash HASH_ELEMENT_VCOUNT = 64909860; extern const char* NAME_ELEMENT_VCOUNT; const StringHash HASH_ELEMENT_VERTEX_WEIGHTS__VCOUNT = 64909860; extern const char* NAME_ELEMENT_VERTEX_WEIGHTS__VCOUNT; const StringHash HASH_ELEMENT_V = 21079862; extern const char* NAME_ELEMENT_V; const StringHash HASH_ELEMENT_VERTEX_WEIGHTS__V = 21079862; extern const char* NAME_ELEMENT_VERTEX_WEIGHTS__V; const StringHash HASH_ELEMENT_VERTEX_WEIGHTS__EXTRA = 118340129; extern const char* NAME_ELEMENT_VERTEX_WEIGHTS__EXTRA; const StringHash HASH_ELEMENT_SKIN__EXTRA = 86432705; extern const char* NAME_ELEMENT_SKIN__EXTRA; const StringHash HASH_ELEMENT_MORPH = 237707448; extern const char* NAME_ELEMENT_MORPH; const StringHash HASH_ELEMENT_CONTROLLER__MORPH = 237707448; extern const char* NAME_ELEMENT_CONTROLLER__MORPH; const StringHash HASH_ATTRIBUTE_METHOD = 121417556; extern const char* NAME_ATTRIBUTE_METHOD; struct morph__AttributeData { static const morph__AttributeData DEFAULT; MorphMethodType method; const ParserChar* source; }; const StringHash HASH_ELEMENT_MORPH__SOURCE = 51357397; extern const char* NAME_ELEMENT_MORPH__SOURCE; typedef animation__source__AttributeData morph__source__AttributeData; const StringHash HASH_ELEMENT_TARGETS = 203307155; extern const char* NAME_ELEMENT_TARGETS; const StringHash HASH_ELEMENT_MORPH__TARGETS = 203307155; extern const char* NAME_ELEMENT_MORPH__TARGETS; const StringHash HASH_ELEMENT_TARGETS__INPUT = 231971828; extern const char* NAME_ELEMENT_TARGETS__INPUT; typedef sampler__input__AttributeData targets__input__AttributeData; const StringHash HASH_ELEMENT_TARGETS__EXTRA = 231815089; extern const char* NAME_ELEMENT_TARGETS__EXTRA; const StringHash HASH_ELEMENT_MORPH__EXTRA = 68840801; extern const char* NAME_ELEMENT_MORPH__EXTRA; const StringHash HASH_ELEMENT_CONTROLLER__EXTRA = 236302929; extern const char* NAME_ELEMENT_CONTROLLER__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_CONTROLLERS__EXTRA = 84993665; extern const char* NAME_ELEMENT_LIBRARY_CONTROLLERS__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_GEOMETRIES = 252969491; extern const char* NAME_ELEMENT_LIBRARY_GEOMETRIES; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_GEOMETRIES = 252969491; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_GEOMETRIES; struct library_geometries__AttributeData { static const library_geometries__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_GEOMETRIES__ASSET = 105126820; extern const char* NAME_ELEMENT_LIBRARY_GEOMETRIES__ASSET; const StringHash HASH_ELEMENT_GEOMETRY = 25538441; extern const char* NAME_ELEMENT_GEOMETRY; const StringHash HASH_ELEMENT_LIBRARY_GEOMETRIES__GEOMETRY = 25538441; extern const char* NAME_ELEMENT_LIBRARY_GEOMETRIES__GEOMETRY; struct geometry__AttributeData { static const geometry__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_GEOMETRY__ASSET = 56917492; extern const char* NAME_ELEMENT_GEOMETRY__ASSET; const StringHash HASH_ELEMENT_CONVEX_MESH = 264547688; extern const char* NAME_ELEMENT_CONVEX_MESH; const StringHash HASH_ELEMENT_GEOMETRY__CONVEX_MESH = 264547688; extern const char* NAME_ELEMENT_GEOMETRY__CONVEX_MESH; const StringHash HASH_ATTRIBUTE_CONVEX_HULL_OF = 167766694; extern const char* NAME_ATTRIBUTE_CONVEX_HULL_OF; struct convex_mesh__AttributeData { static const convex_mesh__AttributeData DEFAULT; const ParserChar* convex_hull_of; }; const StringHash HASH_ELEMENT_CONVEX_MESH__SOURCE = 115317301; extern const char* NAME_ELEMENT_CONVEX_MESH__SOURCE; typedef animation__source__AttributeData convex_mesh__source__AttributeData; const StringHash HASH_ELEMENT_VERTICES = 97017683; extern const char* NAME_ELEMENT_VERTICES; const StringHash HASH_ELEMENT_CONVEX_MESH__VERTICES = 97017683; extern const char* NAME_ELEMENT_CONVEX_MESH__VERTICES; struct vertices__AttributeData { static const vertices__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_VERTICES__INPUT = 250722196; extern const char* NAME_ELEMENT_VERTICES__INPUT; typedef sampler__input__AttributeData vertices__input__AttributeData; const StringHash HASH_ELEMENT_VERTICES__EXTRA = 250813393; extern const char* NAME_ELEMENT_VERTICES__EXTRA; const StringHash HASH_ELEMENT_LINES = 174551523; extern const char* NAME_ELEMENT_LINES; const StringHash HASH_ELEMENT_CONVEX_MESH__LINES = 174551523; extern const char* NAME_ELEMENT_CONVEX_MESH__LINES; const StringHash HASH_ATTRIBUTE_MATERIAL = 145524812; extern const char* NAME_ATTRIBUTE_MATERIAL; struct lines__AttributeData { static const lines__AttributeData DEFAULT; const ParserChar* name; unsigned long long count; const ParserChar* material; }; const StringHash HASH_ELEMENT_LINES__INPUT = 74455892; extern const char* NAME_ELEMENT_LINES__INPUT; typedef vertex_weights__input__AttributeData lines__input__AttributeData; const StringHash HASH_ELEMENT_P = 5018704; extern const char* NAME_ELEMENT_P; const StringHash HASH_ELEMENT_LINES__P = 5018704; extern const char* NAME_ELEMENT_LINES__P; const StringHash HASH_ELEMENT_LINES__EXTRA = 74233617; extern const char* NAME_ELEMENT_LINES__EXTRA; const StringHash HASH_ELEMENT_LINESTRIPS = 235800419; extern const char* NAME_ELEMENT_LINESTRIPS; const StringHash HASH_ELEMENT_CONVEX_MESH__LINESTRIPS = 235800419; extern const char* NAME_ELEMENT_CONVEX_MESH__LINESTRIPS; struct linestrips__AttributeData { static const linestrips__AttributeData DEFAULT; const ParserChar* name; unsigned long long count; const ParserChar* material; }; const StringHash HASH_ELEMENT_LINESTRIPS__INPUT = 261379220; extern const char* NAME_ELEMENT_LINESTRIPS__INPUT; typedef vertex_weights__input__AttributeData linestrips__input__AttributeData; const StringHash HASH_ELEMENT_LINESTRIPS__P = 201547680; extern const char* NAME_ELEMENT_LINESTRIPS__P; const StringHash HASH_ELEMENT_LINESTRIPS__EXTRA = 261159121; extern const char* NAME_ELEMENT_LINESTRIPS__EXTRA; const StringHash HASH_ELEMENT_POLYGONS = 225281043; extern const char* NAME_ELEMENT_POLYGONS; const StringHash HASH_ELEMENT_CONVEX_MESH__POLYGONS = 225281043; extern const char* NAME_ELEMENT_CONVEX_MESH__POLYGONS; struct polygons__AttributeData { static const polygons__AttributeData DEFAULT; const ParserChar* name; unsigned long long count; const ParserChar* material; }; const StringHash HASH_ELEMENT_POLYGONS__INPUT = 144860468; extern const char* NAME_ELEMENT_POLYGONS__INPUT; typedef vertex_weights__input__AttributeData polygons__input__AttributeData; const StringHash HASH_ELEMENT_POLYGONS__P = 238221456; extern const char* NAME_ELEMENT_POLYGONS__P; const StringHash HASH_ELEMENT_PH = 53447048; extern const char* NAME_ELEMENT_PH; const StringHash HASH_ELEMENT_POLYGONS__PH = 53447048; extern const char* NAME_ELEMENT_POLYGONS__PH; const StringHash HASH_ELEMENT_PH__P = 7791968; extern const char* NAME_ELEMENT_PH__P; const StringHash HASH_ELEMENT_H = 7791960; extern const char* NAME_ELEMENT_H; const StringHash HASH_ELEMENT_PH__H = 7791960; extern const char* NAME_ELEMENT_PH__H; const StringHash HASH_ELEMENT_POLYGONS__EXTRA = 144886129; extern const char* NAME_ELEMENT_POLYGONS__EXTRA; const StringHash HASH_ELEMENT_POLYLIST = 225351396; extern const char* NAME_ELEMENT_POLYLIST; const StringHash HASH_ELEMENT_CONVEX_MESH__POLYLIST = 225351396; extern const char* NAME_ELEMENT_CONVEX_MESH__POLYLIST; struct polylist__AttributeData { static const polylist__AttributeData DEFAULT; const ParserChar* name; unsigned long long count; const ParserChar* material; }; const StringHash HASH_ELEMENT_POLYLIST__INPUT = 22882756; extern const char* NAME_ELEMENT_POLYLIST__INPUT; typedef vertex_weights__input__AttributeData polylist__input__AttributeData; const StringHash HASH_ELEMENT_POLYLIST__VCOUNT = 117410884; extern const char* NAME_ELEMENT_POLYLIST__VCOUNT; const StringHash HASH_ELEMENT_POLYLIST__P = 58589536; extern const char* NAME_ELEMENT_POLYLIST__P; const StringHash HASH_ELEMENT_POLYLIST__EXTRA = 23037313; extern const char* NAME_ELEMENT_POLYLIST__EXTRA; const StringHash HASH_ELEMENT_TRIANGLES = 175033555; extern const char* NAME_ELEMENT_TRIANGLES; const StringHash HASH_ELEMENT_CONVEX_MESH__TRIANGLES = 175033555; extern const char* NAME_ELEMENT_CONVEX_MESH__TRIANGLES; struct triangles__AttributeData { static const triangles__AttributeData DEFAULT; const ParserChar* name; unsigned long long count; const ParserChar* material; }; const StringHash HASH_ELEMENT_TRIANGLES__INPUT = 219530052; extern const char* NAME_ELEMENT_TRIANGLES__INPUT; typedef vertex_weights__input__AttributeData triangles__input__AttributeData; const StringHash HASH_ELEMENT_TRIANGLES__P = 194284832; extern const char* NAME_ELEMENT_TRIANGLES__P; const StringHash HASH_ELEMENT_TRIANGLES__EXTRA = 219639553; extern const char* NAME_ELEMENT_TRIANGLES__EXTRA; const StringHash HASH_ELEMENT_TRIFANS = 236645939; extern const char* NAME_ELEMENT_TRIFANS; const StringHash HASH_ELEMENT_CONVEX_MESH__TRIFANS = 236645939; extern const char* NAME_ELEMENT_CONVEX_MESH__TRIFANS; struct trifans__AttributeData { static const trifans__AttributeData DEFAULT; const ParserChar* name; unsigned long long count; const ParserChar* material; }; const StringHash HASH_ELEMENT_TRIFANS__INPUT = 228906372; extern const char* NAME_ELEMENT_TRIFANS__INPUT; typedef vertex_weights__input__AttributeData trifans__input__AttributeData; const StringHash HASH_ELEMENT_TRIFANS__P = 209866128; extern const char* NAME_ELEMENT_TRIFANS__P; const StringHash HASH_ELEMENT_TRIFANS__EXTRA = 228620737; extern const char* NAME_ELEMENT_TRIFANS__EXTRA; const StringHash HASH_ELEMENT_TRISTRIPS = 92405331; extern const char* NAME_ELEMENT_TRISTRIPS; const StringHash HASH_ELEMENT_CONVEX_MESH__TRISTRIPS = 92405331; extern const char* NAME_ELEMENT_CONVEX_MESH__TRISTRIPS; struct tristrips__AttributeData { static const tristrips__AttributeData DEFAULT; const ParserChar* name; unsigned long long count; const ParserChar* material; }; const StringHash HASH_ELEMENT_TRISTRIPS__INPUT = 262203732; extern const char* NAME_ELEMENT_TRISTRIPS__INPUT; typedef vertex_weights__input__AttributeData tristrips__input__AttributeData; const StringHash HASH_ELEMENT_TRISTRIPS__P = 12492704; extern const char* NAME_ELEMENT_TRISTRIPS__P; const StringHash HASH_ELEMENT_TRISTRIPS__EXTRA = 261899537; extern const char* NAME_ELEMENT_TRISTRIPS__EXTRA; const StringHash HASH_ELEMENT_CONVEX_MESH__EXTRA = 173633185; extern const char* NAME_ELEMENT_CONVEX_MESH__EXTRA; const StringHash HASH_ELEMENT_MESH = 53998040; extern const char* NAME_ELEMENT_MESH; const StringHash HASH_ELEMENT_GEOMETRY__MESH = 53998040; extern const char* NAME_ELEMENT_GEOMETRY__MESH; const StringHash HASH_ELEMENT_MESH__SOURCE = 28989125; extern const char* NAME_ELEMENT_MESH__SOURCE; typedef animation__source__AttributeData mesh__source__AttributeData; const StringHash HASH_ELEMENT_MESH__VERTICES = 305203; extern const char* NAME_ELEMENT_MESH__VERTICES; const StringHash HASH_ELEMENT_MESH__LINES = 87117091; extern const char* NAME_ELEMENT_MESH__LINES; const StringHash HASH_ELEMENT_MESH__LINESTRIPS = 49849507; extern const char* NAME_ELEMENT_MESH__LINESTRIPS; const StringHash HASH_ELEMENT_MESH__POLYGONS = 178361651; extern const char* NAME_ELEMENT_MESH__POLYGONS; const StringHash HASH_ELEMENT_MESH__POLYLIST = 178422212; extern const char* NAME_ELEMENT_MESH__POLYLIST; const StringHash HASH_ELEMENT_MESH__TRIANGLES = 111270531; extern const char* NAME_ELEMENT_MESH__TRIANGLES; const StringHash HASH_ELEMENT_MESH__TRIFANS = 138814275; extern const char* NAME_ELEMENT_MESH__TRIFANS; const StringHash HASH_ELEMENT_MESH__TRISTRIPS = 156149795; extern const char* NAME_ELEMENT_MESH__TRISTRIPS; const StringHash HASH_ELEMENT_MESH__EXTRA = 86979169; extern const char* NAME_ELEMENT_MESH__EXTRA; const StringHash HASH_ELEMENT_SPLINE = 90991989; extern const char* NAME_ELEMENT_SPLINE; const StringHash HASH_ELEMENT_GEOMETRY__SPLINE = 90991989; extern const char* NAME_ELEMENT_GEOMETRY__SPLINE; const StringHash HASH_ATTRIBUTE_CLOSED = 111372724; extern const char* NAME_ATTRIBUTE_CLOSED; struct spline__AttributeData { static const spline__AttributeData DEFAULT; bool closed; }; const StringHash HASH_ELEMENT_SPLINE__SOURCE = 28739173; extern const char* NAME_ELEMENT_SPLINE__SOURCE; typedef animation__source__AttributeData spline__source__AttributeData; const StringHash HASH_ELEMENT_CONTROL_VERTICES = 152193299; extern const char* NAME_ELEMENT_CONTROL_VERTICES; const StringHash HASH_ELEMENT_SPLINE__CONTROL_VERTICES = 152193299; extern const char* NAME_ELEMENT_SPLINE__CONTROL_VERTICES; const StringHash HASH_ELEMENT_CONTROL_VERTICES__INPUT = 96321988; extern const char* NAME_ELEMENT_CONTROL_VERTICES__INPUT; typedef sampler__input__AttributeData control_vertices__input__AttributeData; const StringHash HASH_ELEMENT_CONTROL_VERTICES__EXTRA = 96431489; extern const char* NAME_ELEMENT_CONTROL_VERTICES__EXTRA; const StringHash HASH_ELEMENT_SPLINE__EXTRA = 254803809; extern const char* NAME_ELEMENT_SPLINE__EXTRA; const StringHash HASH_ELEMENT_GEOMETRY__EXTRA = 56635313; extern const char* NAME_ELEMENT_GEOMETRY__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_GEOMETRIES__EXTRA = 104876513; extern const char* NAME_ELEMENT_LIBRARY_GEOMETRIES__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_EFFECTS = 246773571; extern const char* NAME_ELEMENT_LIBRARY_EFFECTS; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_EFFECTS = 246773571; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_EFFECTS; struct library_effects__AttributeData { static const library_effects__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_EFFECTS__ASSET = 18733172; extern const char* NAME_ELEMENT_LIBRARY_EFFECTS__ASSET; const StringHash HASH_ELEMENT_EFFECT = 32231604; extern const char* NAME_ELEMENT_EFFECT; const StringHash HASH_ELEMENT_LIBRARY_EFFECTS__EFFECT = 32231604; extern const char* NAME_ELEMENT_LIBRARY_EFFECTS__EFFECT; struct effect__AttributeData { static const effect__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_EFFECT__ASSET = 9704148; extern const char* NAME_ELEMENT_EFFECT__ASSET; const StringHash HASH_ELEMENT_EFFECT__ANNOTATE = 17277301; extern const char* NAME_ELEMENT_EFFECT__ANNOTATE; const StringHash HASH_ELEMENT_EFFECT__IMAGE = 9735365; extern const char* NAME_ELEMENT_EFFECT__IMAGE; const StringHash HASH_ELEMENT_EFFECT__NEWPARAM = 123175677; extern const char* NAME_ELEMENT_EFFECT__NEWPARAM; struct effect__newparam__AttributeData { static const effect__newparam__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_SAMPLER1D = 11125956; extern const char* NAME_ELEMENT_SAMPLER1D; const StringHash HASH_ELEMENT_NEWPARAM__SAMPLER1D = 11125956; extern const char* NAME_ELEMENT_NEWPARAM__SAMPLER1D; const StringHash HASH_ELEMENT_SAMPLER1D__SOURCE = 70915797; extern const char* NAME_ELEMENT_SAMPLER1D__SOURCE; const StringHash HASH_ELEMENT_SAMPLER1D__WRAP_S = 72637475; extern const char* NAME_ELEMENT_SAMPLER1D__WRAP_S; const StringHash HASH_ELEMENT_SAMPLER1D__MINFILTER = 153924226; extern const char* NAME_ELEMENT_SAMPLER1D__MINFILTER; const StringHash HASH_ELEMENT_SAMPLER1D__MAGFILTER = 2929266; extern const char* NAME_ELEMENT_SAMPLER1D__MAGFILTER; const StringHash HASH_ELEMENT_SAMPLER1D__MIPFILTER = 187478786; extern const char* NAME_ELEMENT_SAMPLER1D__MIPFILTER; const StringHash HASH_ELEMENT_BORDER_COLOR = 18094050; extern const char* NAME_ELEMENT_BORDER_COLOR; const StringHash HASH_ELEMENT_SAMPLER1D__BORDER_COLOR = 18094050; extern const char* NAME_ELEMENT_SAMPLER1D__BORDER_COLOR; const StringHash HASH_ELEMENT_SAMPLER1D__MIPMAP_MAXLEVEL = 72229196; extern const char* NAME_ELEMENT_SAMPLER1D__MIPMAP_MAXLEVEL; const StringHash HASH_ELEMENT_SAMPLER1D__MIPMAP_BIAS = 216810323; extern const char* NAME_ELEMENT_SAMPLER1D__MIPMAP_BIAS; const StringHash HASH_ELEMENT_SAMPLER1D__EXTRA = 74921569; extern const char* NAME_ELEMENT_SAMPLER1D__EXTRA; const StringHash HASH_ELEMENT_SAMPLER2D = 11126004; extern const char* NAME_ELEMENT_SAMPLER2D; const StringHash HASH_ELEMENT_NEWPARAM__SAMPLER2D = 11126004; extern const char* NAME_ELEMENT_NEWPARAM__SAMPLER2D; const StringHash HASH_ELEMENT_SAMPLER2D__SOURCE = 70919893; extern const char* NAME_ELEMENT_SAMPLER2D__SOURCE; const StringHash HASH_ELEMENT_SAMPLER2D__WRAP_S = 72641571; extern const char* NAME_ELEMENT_SAMPLER2D__WRAP_S; const StringHash HASH_ELEMENT_SAMPLER2D__WRAP_T = 72641572; extern const char* NAME_ELEMENT_SAMPLER2D__WRAP_T; const StringHash HASH_ELEMENT_SAMPLER2D__MINFILTER = 170701442; extern const char* NAME_ELEMENT_SAMPLER2D__MINFILTER; const StringHash HASH_ELEMENT_SAMPLER2D__MAGFILTER = 53260914; extern const char* NAME_ELEMENT_SAMPLER2D__MAGFILTER; const StringHash HASH_ELEMENT_SAMPLER2D__MIPFILTER = 137147138; extern const char* NAME_ELEMENT_SAMPLER2D__MIPFILTER; const StringHash HASH_ELEMENT_SAMPLER2D__BORDER_COLOR = 18106338; extern const char* NAME_ELEMENT_SAMPLER2D__BORDER_COLOR; const StringHash HASH_ELEMENT_SAMPLER2D__MIPMAP_MAXLEVEL = 21897548; extern const char* NAME_ELEMENT_SAMPLER2D__MIPMAP_MAXLEVEL; const StringHash HASH_ELEMENT_SAMPLER2D__MIPMAP_BIAS = 216811091; extern const char* NAME_ELEMENT_SAMPLER2D__MIPMAP_BIAS; const StringHash HASH_ELEMENT_SAMPLER2D__EXTRA = 74921313; extern const char* NAME_ELEMENT_SAMPLER2D__EXTRA; const StringHash HASH_ELEMENT_SAMPLER3D = 11125988; extern const char* NAME_ELEMENT_SAMPLER3D; const StringHash HASH_ELEMENT_NEWPARAM__SAMPLER3D = 11125988; extern const char* NAME_ELEMENT_NEWPARAM__SAMPLER3D; const StringHash HASH_ELEMENT_SAMPLER3D__SOURCE = 70923989; extern const char* NAME_ELEMENT_SAMPLER3D__SOURCE; const StringHash HASH_ELEMENT_SAMPLER3D__WRAP_S = 72645667; extern const char* NAME_ELEMENT_SAMPLER3D__WRAP_S; const StringHash HASH_ELEMENT_SAMPLER3D__WRAP_T = 72645668; extern const char* NAME_ELEMENT_SAMPLER3D__WRAP_T; const StringHash HASH_ELEMENT_WRAP_P = 72645664; extern const char* NAME_ELEMENT_WRAP_P; const StringHash HASH_ELEMENT_SAMPLER3D__WRAP_P = 72645664; extern const char* NAME_ELEMENT_SAMPLER3D__WRAP_P; const StringHash HASH_ELEMENT_SAMPLER3D__MINFILTER = 187478658; extern const char* NAME_ELEMENT_SAMPLER3D__MINFILTER; const StringHash HASH_ELEMENT_SAMPLER3D__MAGFILTER = 36483698; extern const char* NAME_ELEMENT_SAMPLER3D__MAGFILTER; const StringHash HASH_ELEMENT_SAMPLER3D__MIPFILTER = 153924354; extern const char* NAME_ELEMENT_SAMPLER3D__MIPFILTER; const StringHash HASH_ELEMENT_SAMPLER3D__BORDER_COLOR = 18102242; extern const char* NAME_ELEMENT_SAMPLER3D__BORDER_COLOR; const StringHash HASH_ELEMENT_SAMPLER3D__MIPMAP_MAXLEVEL = 38674764; extern const char* NAME_ELEMENT_SAMPLER3D__MIPMAP_MAXLEVEL; const StringHash HASH_ELEMENT_SAMPLER3D__MIPMAP_BIAS = 216810835; extern const char* NAME_ELEMENT_SAMPLER3D__MIPMAP_BIAS; const StringHash HASH_ELEMENT_SAMPLER3D__EXTRA = 74921057; extern const char* NAME_ELEMENT_SAMPLER3D__EXTRA; const StringHash HASH_ELEMENT_SAMPLERCUBE = 164043205; extern const char* NAME_ELEMENT_SAMPLERCUBE; const StringHash HASH_ELEMENT_NEWPARAM__SAMPLERCUBE = 164043205; extern const char* NAME_ELEMENT_NEWPARAM__SAMPLERCUBE; const StringHash HASH_ELEMENT_SAMPLERCUBE__SOURCE = 162255509; extern const char* NAME_ELEMENT_SAMPLERCUBE__SOURCE; const StringHash HASH_ELEMENT_SAMPLERCUBE__WRAP_S = 166043747; extern const char* NAME_ELEMENT_SAMPLERCUBE__WRAP_S; const StringHash HASH_ELEMENT_SAMPLERCUBE__WRAP_T = 166043748; extern const char* NAME_ELEMENT_SAMPLERCUBE__WRAP_T; const StringHash HASH_ELEMENT_SAMPLERCUBE__WRAP_P = 166043744; extern const char* NAME_ELEMENT_SAMPLERCUBE__WRAP_P; const StringHash HASH_ELEMENT_SAMPLERCUBE__MINFILTER = 91261426; extern const char* NAME_ELEMENT_SAMPLERCUBE__MINFILTER; const StringHash HASH_ELEMENT_SAMPLERCUBE__MAGFILTER = 208701794; extern const char* NAME_ELEMENT_SAMPLERCUBE__MAGFILTER; const StringHash HASH_ELEMENT_SAMPLERCUBE__MIPFILTER = 124816914; extern const char* NAME_ELEMENT_SAMPLERCUBE__MIPFILTER; const StringHash HASH_ELEMENT_SAMPLERCUBE__BORDER_COLOR = 247714722; extern const char* NAME_ELEMENT_SAMPLERCUBE__BORDER_COLOR; const StringHash HASH_ELEMENT_SAMPLERCUBE__MIPMAP_MAXLEVEL = 9059932; extern const char* NAME_ELEMENT_SAMPLERCUBE__MIPMAP_MAXLEVEL; const StringHash HASH_ELEMENT_SAMPLERCUBE__MIPMAP_BIAS = 150034195; extern const char* NAME_ELEMENT_SAMPLERCUBE__MIPMAP_BIAS; const StringHash HASH_ELEMENT_SAMPLERCUBE__EXTRA = 11282977; extern const char* NAME_ELEMENT_SAMPLERCUBE__EXTRA; const StringHash HASH_ELEMENT_SAMPLERRECT = 164034852; extern const char* NAME_ELEMENT_SAMPLERRECT; const StringHash HASH_ELEMENT_NEWPARAM__SAMPLERRECT = 164034852; extern const char* NAME_ELEMENT_NEWPARAM__SAMPLERRECT; const StringHash HASH_ELEMENT_SAMPLERRECT__SOURCE = 143340949; extern const char* NAME_ELEMENT_SAMPLERRECT__SOURCE; const StringHash HASH_ELEMENT_SAMPLERRECT__WRAP_S = 134576483; extern const char* NAME_ELEMENT_SAMPLERRECT__WRAP_S; const StringHash HASH_ELEMENT_SAMPLERRECT__WRAP_T = 134576484; extern const char* NAME_ELEMENT_SAMPLERRECT__WRAP_T; const StringHash HASH_ELEMENT_SAMPLERRECT__MINFILTER = 186710002; extern const char* NAME_ELEMENT_SAMPLERRECT__MINFILTER; const StringHash HASH_ELEMENT_SAMPLERRECT__MAGFILTER = 35714914; extern const char* NAME_ELEMENT_SAMPLERRECT__MAGFILTER; const StringHash HASH_ELEMENT_SAMPLERRECT__MIPFILTER = 153154578; extern const char* NAME_ELEMENT_SAMPLERRECT__MIPFILTER; const StringHash HASH_ELEMENT_SAMPLERRECT__BORDER_COLOR = 220411554; extern const char* NAME_ELEMENT_SAMPLERRECT__BORDER_COLOR; const StringHash HASH_ELEMENT_SAMPLERRECT__MIPMAP_MAXLEVEL = 35283036; extern const char* NAME_ELEMENT_SAMPLERRECT__MIPMAP_MAXLEVEL; const StringHash HASH_ELEMENT_SAMPLERRECT__MIPMAP_BIAS = 145446243; extern const char* NAME_ELEMENT_SAMPLERRECT__MIPMAP_BIAS; const StringHash HASH_ELEMENT_SAMPLERRECT__EXTRA = 11674705; extern const char* NAME_ELEMENT_SAMPLERRECT__EXTRA; const StringHash HASH_ELEMENT_SAMPLERDEPTH = 208776984; extern const char* NAME_ELEMENT_SAMPLERDEPTH; const StringHash HASH_ELEMENT_NEWPARAM__SAMPLERDEPTH = 208776984; extern const char* NAME_ELEMENT_NEWPARAM__SAMPLERDEPTH; const StringHash HASH_ELEMENT_SAMPLERDEPTH__SOURCE = 109342549; extern const char* NAME_ELEMENT_SAMPLERDEPTH__SOURCE; const StringHash HASH_ELEMENT_SAMPLERDEPTH__WRAP_S = 101327779; extern const char* NAME_ELEMENT_SAMPLERDEPTH__WRAP_S; const StringHash HASH_ELEMENT_SAMPLERDEPTH__WRAP_T = 101327780; extern const char* NAME_ELEMENT_SAMPLERDEPTH__WRAP_T; const StringHash HASH_ELEMENT_SAMPLERDEPTH__MINFILTER = 246699810; extern const char* NAME_ELEMENT_SAMPLERDEPTH__MINFILTER; const StringHash HASH_ELEMENT_SAMPLERDEPTH__MAGFILTER = 129259410; extern const char* NAME_ELEMENT_SAMPLERDEPTH__MAGFILTER; const StringHash HASH_ELEMENT_SAMPLERDEPTH__EXTRA = 206754289; extern const char* NAME_ELEMENT_SAMPLERDEPTH__EXTRA; const StringHash HASH_ELEMENT_FX_PROFILE_ABSTRACT = 70540052; extern const char* NAME_ELEMENT_FX_PROFILE_ABSTRACT; const StringHash HASH_ELEMENT_EFFECT__FX_PROFILE_ABSTRACT = 70540052; extern const char* NAME_ELEMENT_EFFECT__FX_PROFILE_ABSTRACT; const StringHash HASH_ELEMENT_EFFECT__EXTRA = 9453713; extern const char* NAME_ELEMENT_EFFECT__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_EFFECTS__EXTRA = 18450993; extern const char* NAME_ELEMENT_LIBRARY_EFFECTS__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_FORCE_FIELDS = 175028019; extern const char* NAME_ELEMENT_LIBRARY_FORCE_FIELDS; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_FORCE_FIELDS = 175028019; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_FORCE_FIELDS; struct library_force_fields__AttributeData { static const library_force_fields__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_FORCE_FIELDS__ASSET = 256178756; extern const char* NAME_ELEMENT_LIBRARY_FORCE_FIELDS__ASSET; const StringHash HASH_ELEMENT_FORCE_FIELD = 102613300; extern const char* NAME_ELEMENT_FORCE_FIELD; const StringHash HASH_ELEMENT_LIBRARY_FORCE_FIELDS__FORCE_FIELD = 102613300; extern const char* NAME_ELEMENT_LIBRARY_FORCE_FIELDS__FORCE_FIELD; struct force_field__AttributeData { static const force_field__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_FORCE_FIELD__ASSET = 138535668; extern const char* NAME_ELEMENT_FORCE_FIELD__ASSET; const StringHash HASH_ELEMENT_FORCE_FIELD__TECHNIQUE = 49118021; extern const char* NAME_ELEMENT_FORCE_FIELD__TECHNIQUE; typedef extra__technique__AttributeData force_field__technique__AttributeData; const StringHash HASH_ELEMENT_FORCE_FIELD__EXTRA = 138784945; extern const char* NAME_ELEMENT_FORCE_FIELD__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_FORCE_FIELDS__EXTRA = 255895553; extern const char* NAME_ELEMENT_LIBRARY_FORCE_FIELDS__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_IMAGES = 263512339; extern const char* NAME_ELEMENT_LIBRARY_IMAGES; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_IMAGES = 263512339; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_IMAGES; struct library_images__AttributeData { static const library_images__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_IMAGES__ASSET = 82286836; extern const char* NAME_ELEMENT_LIBRARY_IMAGES__ASSET; const StringHash HASH_ELEMENT_LIBRARY_IMAGES__IMAGE = 81856229; extern const char* NAME_ELEMENT_LIBRARY_IMAGES__IMAGE; const StringHash HASH_ELEMENT_LIBRARY_IMAGES__EXTRA = 82037425; extern const char* NAME_ELEMENT_LIBRARY_IMAGES__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_LIGHTS = 7881555; extern const char* NAME_ELEMENT_LIBRARY_LIGHTS; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_LIGHTS = 7881555; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_LIGHTS; struct library_lights__AttributeData { static const library_lights__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_LIGHTS__ASSET = 2998164; extern const char* NAME_ELEMENT_LIBRARY_LIGHTS__ASSET; const StringHash HASH_ELEMENT_LIGHT = 3664804; extern const char* NAME_ELEMENT_LIGHT; const StringHash HASH_ELEMENT_LIBRARY_LIGHTS__LIGHT = 3664804; extern const char* NAME_ELEMENT_LIBRARY_LIGHTS__LIGHT; struct light__AttributeData { static const light__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIGHT__ASSET = 74937956; extern const char* NAME_ELEMENT_LIGHT__ASSET; const StringHash HASH_ELEMENT_LIGHT__TECHNIQUE_COMMON = 9633678; extern const char* NAME_ELEMENT_LIGHT__TECHNIQUE_COMMON; const StringHash HASH_ELEMENT_AMBIENT = 108679732; extern const char* NAME_ELEMENT_AMBIENT; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__AMBIENT = 108679732; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__AMBIENT; const StringHash HASH_ELEMENT_COLOR = 148349506; extern const char* NAME_ELEMENT_COLOR; const StringHash HASH_ELEMENT_AMBIENT__COLOR = 148349506; extern const char* NAME_ELEMENT_AMBIENT__COLOR; struct ambient__color__AttributeData { static const ambient__color__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_DIRECTIONAL = 13053548; extern const char* NAME_ELEMENT_DIRECTIONAL; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__DIRECTIONAL = 13053548; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__DIRECTIONAL; const StringHash HASH_ELEMENT_DIRECTIONAL__COLOR = 152088738; extern const char* NAME_ELEMENT_DIRECTIONAL__COLOR; typedef ambient__color__AttributeData directional__color__AttributeData; const StringHash HASH_ELEMENT_POINT = 173350644; extern const char* NAME_ELEMENT_POINT; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__POINT = 173350644; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__POINT; const StringHash HASH_ELEMENT_POINT__COLOR = 70281410; extern const char* NAME_ELEMENT_POINT__COLOR; typedef ambient__color__AttributeData point__color__AttributeData; const StringHash HASH_ELEMENT_CONSTANT_ATTENUATION = 98628030; extern const char* NAME_ELEMENT_CONSTANT_ATTENUATION; const StringHash HASH_ELEMENT_POINT__CONSTANT_ATTENUATION = 98628030; extern const char* NAME_ELEMENT_POINT__CONSTANT_ATTENUATION; struct constant_attenuation__AttributeData { static const constant_attenuation__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_LINEAR_ATTENUATION = 11535838; extern const char* NAME_ELEMENT_LINEAR_ATTENUATION; const StringHash HASH_ELEMENT_POINT__LINEAR_ATTENUATION = 11535838; extern const char* NAME_ELEMENT_POINT__LINEAR_ATTENUATION; struct linear_attenuation__AttributeData { static const linear_attenuation__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_QUADRATIC_ATTENUATION = 251429214; extern const char* NAME_ELEMENT_QUADRATIC_ATTENUATION; const StringHash HASH_ELEMENT_POINT__QUADRATIC_ATTENUATION = 251429214; extern const char* NAME_ELEMENT_POINT__QUADRATIC_ATTENUATION; struct quadratic_attenuation__AttributeData { static const quadratic_attenuation__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_SPOT = 178619204; extern const char* NAME_ELEMENT_SPOT; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__SPOT = 178619204; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__SPOT; const StringHash HASH_ELEMENT_SPOT__COLOR = 86259138; extern const char* NAME_ELEMENT_SPOT__COLOR; typedef ambient__color__AttributeData spot__color__AttributeData; const StringHash HASH_ELEMENT_SPOT__CONSTANT_ATTENUATION = 248571118; extern const char* NAME_ELEMENT_SPOT__CONSTANT_ATTENUATION; const StringHash HASH_ELEMENT_SPOT__LINEAR_ATTENUATION = 6894894; extern const char* NAME_ELEMENT_SPOT__LINEAR_ATTENUATION; const StringHash HASH_ELEMENT_SPOT__QUADRATIC_ATTENUATION = 268275406; extern const char* NAME_ELEMENT_SPOT__QUADRATIC_ATTENUATION; const StringHash HASH_ELEMENT_FALLOFF_ANGLE = 239328965; extern const char* NAME_ELEMENT_FALLOFF_ANGLE; const StringHash HASH_ELEMENT_SPOT__FALLOFF_ANGLE = 239328965; extern const char* NAME_ELEMENT_SPOT__FALLOFF_ANGLE; struct falloff_angle__AttributeData { static const falloff_angle__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_FALLOFF_EXPONENT = 108835012; extern const char* NAME_ELEMENT_FALLOFF_EXPONENT; const StringHash HASH_ELEMENT_SPOT__FALLOFF_EXPONENT = 108835012; extern const char* NAME_ELEMENT_SPOT__FALLOFF_EXPONENT; struct falloff_exponent__AttributeData { static const falloff_exponent__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_LIGHT__TECHNIQUE = 105991637; extern const char* NAME_ELEMENT_LIGHT__TECHNIQUE; typedef extra__technique__AttributeData light__technique__AttributeData; const StringHash HASH_ELEMENT_LIGHT__EXTRA = 74654753; extern const char* NAME_ELEMENT_LIGHT__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_LIGHTS__EXTRA = 2747857; extern const char* NAME_ELEMENT_LIBRARY_LIGHTS__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_MATERIALS = 50787011; extern const char* NAME_ELEMENT_LIBRARY_MATERIALS; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_MATERIALS = 50787011; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_MATERIALS; struct library_materials__AttributeData { static const library_materials__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_MATERIALS__ASSET = 118246004; extern const char* NAME_ELEMENT_LIBRARY_MATERIALS__ASSET; const StringHash HASH_ELEMENT_MATERIAL = 110624268; extern const char* NAME_ELEMENT_MATERIAL; const StringHash HASH_ELEMENT_LIBRARY_MATERIALS__MATERIAL = 110624268; extern const char* NAME_ELEMENT_LIBRARY_MATERIALS__MATERIAL; struct material__AttributeData { static const material__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_MATERIAL__ASSET = 261106788; extern const char* NAME_ELEMENT_MATERIAL__ASSET; const StringHash HASH_ELEMENT_INSTANCE_EFFECT = 179640868; extern const char* NAME_ELEMENT_INSTANCE_EFFECT; const StringHash HASH_ELEMENT_MATERIAL__INSTANCE_EFFECT = 179640868; extern const char* NAME_ELEMENT_MATERIAL__INSTANCE_EFFECT; struct instance_effect__AttributeData { static const instance_effect__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_TECHNIQUE_HINT = 28302980; extern const char* NAME_ELEMENT_TECHNIQUE_HINT; const StringHash HASH_ELEMENT_INSTANCE_EFFECT__TECHNIQUE_HINT = 28302980; extern const char* NAME_ELEMENT_INSTANCE_EFFECT__TECHNIQUE_HINT; struct technique_hint__AttributeData { static const technique_hint__AttributeData DEFAULT; const ParserChar* platform; const ParserChar* profile; const ParserChar* ref; }; const StringHash HASH_ELEMENT_INSTANCE_EFFECT__SETPARAM = 219277853; extern const char* NAME_ELEMENT_INSTANCE_EFFECT__SETPARAM; struct instance_effect__setparam__AttributeData { static const instance_effect__setparam__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_SETPARAM__SAMPLER1D = 74630612; extern const char* NAME_ELEMENT_SETPARAM__SAMPLER1D; const StringHash HASH_ELEMENT_SETPARAM__SAMPLER2D = 74630628; extern const char* NAME_ELEMENT_SETPARAM__SAMPLER2D; const StringHash HASH_ELEMENT_SETPARAM__SAMPLER3D = 74630644; extern const char* NAME_ELEMENT_SETPARAM__SAMPLER3D; const StringHash HASH_ELEMENT_SETPARAM__SAMPLERCUBE = 46533909; extern const char* NAME_ELEMENT_SETPARAM__SAMPLERCUBE; const StringHash HASH_ELEMENT_SETPARAM__SAMPLERRECT = 46657012; extern const char* NAME_ELEMENT_SETPARAM__SAMPLERRECT; const StringHash HASH_ELEMENT_SETPARAM__SAMPLERDEPTH = 207676072; extern const char* NAME_ELEMENT_SETPARAM__SAMPLERDEPTH; const StringHash HASH_ELEMENT_INSTANCE_EFFECT__EXTRA = 101966321; extern const char* NAME_ELEMENT_INSTANCE_EFFECT__EXTRA; const StringHash HASH_ELEMENT_MATERIAL__EXTRA = 261389857; extern const char* NAME_ELEMENT_MATERIAL__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_MATERIALS__EXTRA = 117970993; extern const char* NAME_ELEMENT_LIBRARY_MATERIALS__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_NODES = 235021059; extern const char* NAME_ELEMENT_LIBRARY_NODES; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_NODES = 235021059; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_NODES; struct library_nodes__AttributeData { static const library_nodes__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_NODES__ASSET = 11897780; extern const char* NAME_ELEMENT_LIBRARY_NODES__ASSET; const StringHash HASH_ELEMENT_NODE = 118269829; extern const char* NAME_ELEMENT_NODE; const StringHash HASH_ELEMENT_LIBRARY_NODES__NODE = 118269829; extern const char* NAME_ELEMENT_LIBRARY_NODES__NODE; const StringHash HASH_ATTRIBUTE_LAYER = 7507906; extern const char* NAME_ATTRIBUTE_LAYER; struct node__AttributeData { static const node__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; const ParserChar* sid; NodeType type; const ParserChar* layer; }; const StringHash HASH_ELEMENT_NODE__ASSET = 86897524; extern const char* NAME_ELEMENT_NODE__ASSET; const StringHash HASH_ELEMENT_LOOKAT = 58854100; extern const char* NAME_ELEMENT_LOOKAT; const StringHash HASH_ELEMENT_NODE__LOOKAT = 58854100; extern const char* NAME_ELEMENT_NODE__LOOKAT; struct lookat__AttributeData { static const lookat__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_MATRIX = 57480280; extern const char* NAME_ELEMENT_MATRIX; const StringHash HASH_ELEMENT_NODE__MATRIX = 57480280; extern const char* NAME_ELEMENT_NODE__MATRIX; struct matrix__AttributeData { static const matrix__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_ROTATE = 31654901; extern const char* NAME_ELEMENT_ROTATE; const StringHash HASH_ELEMENT_NODE__ROTATE = 31654901; extern const char* NAME_ELEMENT_NODE__ROTATE; struct rotate__AttributeData { static const rotate__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_SCALE = 85773973; extern const char* NAME_ELEMENT_SCALE; const StringHash HASH_ELEMENT_NODE__SCALE = 85773973; extern const char* NAME_ELEMENT_NODE__SCALE; struct scale__AttributeData { static const scale__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_SKEW = 189912167; extern const char* NAME_ELEMENT_SKEW; const StringHash HASH_ELEMENT_NODE__SKEW = 189912167; extern const char* NAME_ELEMENT_NODE__SKEW; struct skew__AttributeData { static const skew__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_TRANSLATE = 250426997; extern const char* NAME_ELEMENT_TRANSLATE; const StringHash HASH_ELEMENT_NODE__TRANSLATE = 250426997; extern const char* NAME_ELEMENT_NODE__TRANSLATE; struct translate__AttributeData { static const translate__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_INSTANCE_CAMERA = 92626481; extern const char* NAME_ELEMENT_INSTANCE_CAMERA; const StringHash HASH_ELEMENT_NODE__INSTANCE_CAMERA = 92626481; extern const char* NAME_ELEMENT_NODE__INSTANCE_CAMERA; struct instance_camera__AttributeData { static const instance_camera__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_INSTANCE_CAMERA__EXTRA = 22844193; extern const char* NAME_ELEMENT_INSTANCE_CAMERA__EXTRA; const StringHash HASH_ELEMENT_INSTANCE_CONTROLLER = 155305458; extern const char* NAME_ELEMENT_INSTANCE_CONTROLLER; const StringHash HASH_ELEMENT_NODE__INSTANCE_CONTROLLER = 155305458; extern const char* NAME_ELEMENT_NODE__INSTANCE_CONTROLLER; struct instance_controller__AttributeData { static const instance_controller__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_SKELETON = 220539054; extern const char* NAME_ELEMENT_SKELETON; const StringHash HASH_ELEMENT_INSTANCE_CONTROLLER__SKELETON = 220539054; extern const char* NAME_ELEMENT_INSTANCE_CONTROLLER__SKELETON; const StringHash HASH_ELEMENT_BIND_MATERIAL = 132281260; extern const char* NAME_ELEMENT_BIND_MATERIAL; const StringHash HASH_ELEMENT_INSTANCE_CONTROLLER__BIND_MATERIAL = 132281260; extern const char* NAME_ELEMENT_INSTANCE_CONTROLLER__BIND_MATERIAL; const StringHash HASH_ELEMENT_BIND_MATERIAL__PARAM = 266607469; extern const char* NAME_ELEMENT_BIND_MATERIAL__PARAM; typedef accessor__param__AttributeData bind_material__param__AttributeData; const StringHash HASH_ELEMENT_BIND_MATERIAL__TECHNIQUE_COMMON = 90983294; extern const char* NAME_ELEMENT_BIND_MATERIAL__TECHNIQUE_COMMON; const StringHash HASH_ELEMENT_INSTANCE_MATERIAL = 109789516; extern const char* NAME_ELEMENT_INSTANCE_MATERIAL; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__INSTANCE_MATERIAL = 109789516; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__INSTANCE_MATERIAL; const StringHash HASH_ATTRIBUTE_SYMBOL = 128989532; extern const char* NAME_ATTRIBUTE_SYMBOL; struct instance_material__AttributeData { static const instance_material__AttributeData DEFAULT; const ParserChar* symbol; const ParserChar* target; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_BIND = 48435636; extern const char* NAME_ELEMENT_BIND; const StringHash HASH_ELEMENT_INSTANCE_MATERIAL__BIND = 48435636; extern const char* NAME_ELEMENT_INSTANCE_MATERIAL__BIND; struct instance_material__bind__AttributeData { static const instance_material__bind__AttributeData DEFAULT; const ParserChar* semantic; const ParserChar* target; }; const StringHash HASH_ELEMENT_BIND_VERTEX_INPUT = 111400644; extern const char* NAME_ELEMENT_BIND_VERTEX_INPUT; const StringHash HASH_ELEMENT_INSTANCE_MATERIAL__BIND_VERTEX_INPUT = 111400644; extern const char* NAME_ELEMENT_INSTANCE_MATERIAL__BIND_VERTEX_INPUT; const StringHash HASH_ATTRIBUTE_INPUT_SEMANTIC = 256703331; extern const char* NAME_ATTRIBUTE_INPUT_SEMANTIC; const StringHash HASH_ATTRIBUTE_INPUT_SET = 130685332; extern const char* NAME_ATTRIBUTE_INPUT_SET; struct bind_vertex_input__AttributeData { static const bind_vertex_input__AttributeData DEFAULT; const ParserChar* semantic; const ParserChar* input_semantic; unsigned long long input_set; }; const StringHash HASH_ELEMENT_INSTANCE_MATERIAL__EXTRA = 238355617; extern const char* NAME_ELEMENT_INSTANCE_MATERIAL__EXTRA; const StringHash HASH_ELEMENT_BIND_MATERIAL__TECHNIQUE = 185393301; extern const char* NAME_ELEMENT_BIND_MATERIAL__TECHNIQUE; typedef extra__technique__AttributeData bind_material__technique__AttributeData; const StringHash HASH_ELEMENT_BIND_MATERIAL__EXTRA = 266234001; extern const char* NAME_ELEMENT_BIND_MATERIAL__EXTRA; const StringHash HASH_ELEMENT_INSTANCE_CONTROLLER__EXTRA = 250294769; extern const char* NAME_ELEMENT_INSTANCE_CONTROLLER__EXTRA; const StringHash HASH_ELEMENT_INSTANCE_GEOMETRY = 155287129; extern const char* NAME_ELEMENT_INSTANCE_GEOMETRY; const StringHash HASH_ELEMENT_NODE__INSTANCE_GEOMETRY = 155287129; extern const char* NAME_ELEMENT_NODE__INSTANCE_GEOMETRY; struct instance_geometry__AttributeData { static const instance_geometry__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_INSTANCE_GEOMETRY__BIND_MATERIAL = 208059788; extern const char* NAME_ELEMENT_INSTANCE_GEOMETRY__BIND_MATERIAL; const StringHash HASH_ELEMENT_INSTANCE_GEOMETRY__EXTRA = 79738161; extern const char* NAME_ELEMENT_INSTANCE_GEOMETRY__EXTRA; const StringHash HASH_ELEMENT_INSTANCE_LIGHT = 191089620; extern const char* NAME_ELEMENT_INSTANCE_LIGHT; const StringHash HASH_ELEMENT_NODE__INSTANCE_LIGHT = 191089620; extern const char* NAME_ELEMENT_NODE__INSTANCE_LIGHT; struct instance_light__AttributeData { static const instance_light__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_INSTANCE_LIGHT__EXTRA = 98246161; extern const char* NAME_ELEMENT_INSTANCE_LIGHT__EXTRA; const StringHash HASH_ELEMENT_INSTANCE_NODE = 45508293; extern const char* NAME_ELEMENT_INSTANCE_NODE; const StringHash HASH_ELEMENT_NODE__INSTANCE_NODE = 45508293; extern const char* NAME_ELEMENT_NODE__INSTANCE_NODE; struct instance_node__AttributeData { static const instance_node__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_INSTANCE_NODE__EXTRA = 106111633; extern const char* NAME_ELEMENT_INSTANCE_NODE__EXTRA; const StringHash HASH_ELEMENT_NODE__NODE = 189997061; extern const char* NAME_ELEMENT_NODE__NODE; const StringHash HASH_ELEMENT_NODE__EXTRA = 86614321; extern const char* NAME_ELEMENT_NODE__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_NODES__EXTRA = 11655665; extern const char* NAME_ELEMENT_LIBRARY_NODES__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_MATERIALS = 144977635; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_MATERIALS; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_PHYSICS_MATERIALS = 144977635; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_PHYSICS_MATERIALS; struct library_physics_materials__AttributeData { static const library_physics_materials__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_MATERIALS__ASSET = 207189460; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_MATERIALS__ASSET; const StringHash HASH_ELEMENT_PHYSICS_MATERIAL = 9537676; extern const char* NAME_ELEMENT_PHYSICS_MATERIAL; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_MATERIALS__PHYSICS_MATERIAL = 9537676; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_MATERIALS__PHYSICS_MATERIAL; struct physics_material__AttributeData { static const physics_material__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_PHYSICS_MATERIAL__ASSET = 40910036; extern const char* NAME_ELEMENT_PHYSICS_MATERIAL__ASSET; const StringHash HASH_ELEMENT_PHYSICS_MATERIAL__TECHNIQUE_COMMON = 99789790; extern const char* NAME_ELEMENT_PHYSICS_MATERIAL__TECHNIQUE_COMMON; const StringHash HASH_ELEMENT_DYNAMIC_FRICTION = 107186158; extern const char* NAME_ELEMENT_DYNAMIC_FRICTION; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__DYNAMIC_FRICTION = 107186158; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__DYNAMIC_FRICTION; struct dynamic_friction__AttributeData { static const dynamic_friction__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_RESTITUTION = 182855758; extern const char* NAME_ELEMENT_RESTITUTION; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__RESTITUTION = 182855758; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__RESTITUTION; struct restitution__AttributeData { static const restitution__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_STATIC_FRICTION = 50283374; extern const char* NAME_ELEMENT_STATIC_FRICTION; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__STATIC_FRICTION = 50283374; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__STATIC_FRICTION; struct static_friction__AttributeData { static const static_friction__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_PHYSICS_MATERIAL__TECHNIQUE = 218581653; extern const char* NAME_ELEMENT_PHYSICS_MATERIAL__TECHNIQUE; typedef extra__technique__AttributeData physics_material__technique__AttributeData; const StringHash HASH_ELEMENT_PHYSICS_MATERIAL__EXTRA = 41184913; extern const char* NAME_ELEMENT_PHYSICS_MATERIAL__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_MATERIALS__EXTRA = 207431569; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_MATERIALS__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_MODELS = 229674739; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_MODELS; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_PHYSICS_MODELS = 229674739; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_PHYSICS_MODELS; struct library_physics_models__AttributeData { static const library_physics_models__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_MODELS__ASSET = 158347956; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_MODELS__ASSET; const StringHash HASH_ELEMENT_PHYSICS_MODEL = 121224284; extern const char* NAME_ELEMENT_PHYSICS_MODEL; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_MODELS__PHYSICS_MODEL = 121224284; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_MODELS__PHYSICS_MODEL; struct physics_model__AttributeData { static const physics_model__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_PHYSICS_MODEL__ASSET = 51707876; extern const char* NAME_ELEMENT_PHYSICS_MODEL__ASSET; const StringHash HASH_ELEMENT_RIGID_BODY = 230153993; extern const char* NAME_ELEMENT_RIGID_BODY; const StringHash HASH_ELEMENT_PHYSICS_MODEL__RIGID_BODY = 230153993; extern const char* NAME_ELEMENT_PHYSICS_MODEL__RIGID_BODY; struct rigid_body__AttributeData { static const rigid_body__AttributeData DEFAULT; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_RIGID_BODY__TECHNIQUE_COMMON = 140646974; extern const char* NAME_ELEMENT_RIGID_BODY__TECHNIQUE_COMMON; const StringHash HASH_ELEMENT_DYNAMIC = 164030867; extern const char* NAME_ELEMENT_DYNAMIC; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__DYNAMIC = 164030867; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__DYNAMIC; struct dynamic__AttributeData { static const dynamic__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_MASS = 178723971; extern const char* NAME_ELEMENT_MASS; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__MASS = 178723971; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__MASS; struct mass__AttributeData { static const mass__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_MASS_FRAME = 66755765; extern const char* NAME_ELEMENT_MASS_FRAME; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__MASS_FRAME = 66755765; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__MASS_FRAME; const StringHash HASH_ELEMENT_MASS_FRAME__TRANSLATE = 253554469; extern const char* NAME_ELEMENT_MASS_FRAME__TRANSLATE; const StringHash HASH_ELEMENT_MASS_FRAME__ROTATE = 206978181; extern const char* NAME_ELEMENT_MASS_FRAME__ROTATE; const StringHash HASH_ELEMENT_INERTIA = 235810961; extern const char* NAME_ELEMENT_INERTIA; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__INERTIA = 235810961; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__INERTIA; struct inertia__AttributeData { static const inertia__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_INSTANCE_PHYSICS_MATERIAL = 110655340; extern const char* NAME_ELEMENT_INSTANCE_PHYSICS_MATERIAL; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__INSTANCE_PHYSICS_MATERIAL = 110655340; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__INSTANCE_PHYSICS_MATERIAL; struct instance_physics_material__AttributeData { static const instance_physics_material__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_INSTANCE_PHYSICS_MATERIAL__EXTRA = 49406769; extern const char* NAME_ELEMENT_INSTANCE_PHYSICS_MATERIAL__EXTRA; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__PHYSICS_MATERIAL = 200496492; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__PHYSICS_MATERIAL; const StringHash HASH_ELEMENT_SHAPE = 173779653; extern const char* NAME_ELEMENT_SHAPE; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__SHAPE = 173779653; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__SHAPE; const StringHash HASH_ELEMENT_HOLLOW = 203315751; extern const char* NAME_ELEMENT_HOLLOW; const StringHash HASH_ELEMENT_SHAPE__HOLLOW = 203315751; extern const char* NAME_ELEMENT_SHAPE__HOLLOW; struct hollow__AttributeData { static const hollow__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_SHAPE__MASS = 189649091; extern const char* NAME_ELEMENT_SHAPE__MASS; const StringHash HASH_ELEMENT_DENSITY = 71513209; extern const char* NAME_ELEMENT_DENSITY; const StringHash HASH_ELEMENT_SHAPE__DENSITY = 71513209; extern const char* NAME_ELEMENT_SHAPE__DENSITY; struct density__AttributeData { static const density__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_SHAPE__INSTANCE_PHYSICS_MATERIAL = 182289868; extern const char* NAME_ELEMENT_SHAPE__INSTANCE_PHYSICS_MATERIAL; const StringHash HASH_ELEMENT_SHAPE__PHYSICS_MATERIAL = 169447724; extern const char* NAME_ELEMENT_SHAPE__PHYSICS_MATERIAL; const StringHash HASH_ELEMENT_SHAPE__INSTANCE_GEOMETRY = 15221321; extern const char* NAME_ELEMENT_SHAPE__INSTANCE_GEOMETRY; const StringHash HASH_ELEMENT_PLANE = 83469045; extern const char* NAME_ELEMENT_PLANE; const StringHash HASH_ELEMENT_SHAPE__PLANE = 83469045; extern const char* NAME_ELEMENT_SHAPE__PLANE; const StringHash HASH_ELEMENT_EQUATION = 15986366; extern const char* NAME_ELEMENT_EQUATION; const StringHash HASH_ELEMENT_PLANE__EQUATION = 15986366; extern const char* NAME_ELEMENT_PLANE__EQUATION; const StringHash HASH_ELEMENT_PLANE__EXTRA = 70156081; extern const char* NAME_ELEMENT_PLANE__EXTRA; const StringHash HASH_ELEMENT_BOX = 112510952; extern const char* NAME_ELEMENT_BOX; const StringHash HASH_ELEMENT_SHAPE__BOX = 112510952; extern const char* NAME_ELEMENT_SHAPE__BOX; const StringHash HASH_ELEMENT_HALF_EXTENTS = 158729139; extern const char* NAME_ELEMENT_HALF_EXTENTS; const StringHash HASH_ELEMENT_BOX__HALF_EXTENTS = 158729139; extern const char* NAME_ELEMENT_BOX__HALF_EXTENTS; const StringHash HASH_ELEMENT_BOX__EXTRA = 89812321; extern const char* NAME_ELEMENT_BOX__EXTRA; const StringHash HASH_ELEMENT_SPHERE = 256804805; extern const char* NAME_ELEMENT_SPHERE; const StringHash HASH_ELEMENT_SHAPE__SPHERE = 256804805; extern const char* NAME_ELEMENT_SHAPE__SPHERE; const StringHash HASH_ELEMENT_RADIUS = 7028275; extern const char* NAME_ELEMENT_RADIUS; const StringHash HASH_ELEMENT_SPHERE__RADIUS = 7028275; extern const char* NAME_ELEMENT_SPHERE__RADIUS; const StringHash HASH_ELEMENT_SPHERE__EXTRA = 254948193; extern const char* NAME_ELEMENT_SPHERE__EXTRA; const StringHash HASH_ELEMENT_CYLINDER = 138741378; extern const char* NAME_ELEMENT_CYLINDER; const StringHash HASH_ELEMENT_SHAPE__CYLINDER = 138741378; extern const char* NAME_ELEMENT_SHAPE__CYLINDER; const StringHash HASH_ELEMENT_HEIGHT = 94864756; extern const char* NAME_ELEMENT_HEIGHT; const StringHash HASH_ELEMENT_CYLINDER__HEIGHT = 94864756; extern const char* NAME_ELEMENT_CYLINDER__HEIGHT; const StringHash HASH_ELEMENT_CYLINDER__RADIUS = 114026563; extern const char* NAME_ELEMENT_CYLINDER__RADIUS; const StringHash HASH_ELEMENT_CYLINDER__EXTRA = 140000257; extern const char* NAME_ELEMENT_CYLINDER__EXTRA; const StringHash HASH_ELEMENT_TAPERED_CYLINDER = 166506338; extern const char* NAME_ELEMENT_TAPERED_CYLINDER; const StringHash HASH_ELEMENT_SHAPE__TAPERED_CYLINDER = 166506338; extern const char* NAME_ELEMENT_SHAPE__TAPERED_CYLINDER; const StringHash HASH_ELEMENT_TAPERED_CYLINDER__HEIGHT = 32307460; extern const char* NAME_ELEMENT_TAPERED_CYLINDER__HEIGHT; const StringHash HASH_ELEMENT_RADIUS1 = 134955841; extern const char* NAME_ELEMENT_RADIUS1; const StringHash HASH_ELEMENT_TAPERED_CYLINDER__RADIUS1 = 134955841; extern const char* NAME_ELEMENT_TAPERED_CYLINDER__RADIUS1; const StringHash HASH_ELEMENT_RADIUS2 = 134955842; extern const char* NAME_ELEMENT_RADIUS2; const StringHash HASH_ELEMENT_TAPERED_CYLINDER__RADIUS2 = 134955842; extern const char* NAME_ELEMENT_TAPERED_CYLINDER__RADIUS2; const StringHash HASH_ELEMENT_TAPERED_CYLINDER__EXTRA = 253529025; extern const char* NAME_ELEMENT_TAPERED_CYLINDER__EXTRA; const StringHash HASH_ELEMENT_CAPSULE = 117514469; extern const char* NAME_ELEMENT_CAPSULE; const StringHash HASH_ELEMENT_SHAPE__CAPSULE = 117514469; extern const char* NAME_ELEMENT_SHAPE__CAPSULE; const StringHash HASH_ELEMENT_CAPSULE__HEIGHT = 38254884; extern const char* NAME_ELEMENT_CAPSULE__HEIGHT; const StringHash HASH_ELEMENT_CAPSULE__RADIUS = 19657747; extern const char* NAME_ELEMENT_CAPSULE__RADIUS; const StringHash HASH_ELEMENT_CAPSULE__EXTRA = 220610497; extern const char* NAME_ELEMENT_CAPSULE__EXTRA; const StringHash HASH_ELEMENT_TAPERED_CAPSULE = 167503477; extern const char* NAME_ELEMENT_TAPERED_CAPSULE; const StringHash HASH_ELEMENT_SHAPE__TAPERED_CAPSULE = 167503477; extern const char* NAME_ELEMENT_SHAPE__TAPERED_CAPSULE; const StringHash HASH_ELEMENT_TAPERED_CAPSULE__HEIGHT = 177933284; extern const char* NAME_ELEMENT_TAPERED_CAPSULE__HEIGHT; const StringHash HASH_ELEMENT_TAPERED_CAPSULE__RADIUS1 = 259419633; extern const char* NAME_ELEMENT_TAPERED_CAPSULE__RADIUS1; const StringHash HASH_ELEMENT_TAPERED_CAPSULE__RADIUS2 = 259419634; extern const char* NAME_ELEMENT_TAPERED_CAPSULE__RADIUS2; const StringHash HASH_ELEMENT_TAPERED_CAPSULE__EXTRA = 28046561; extern const char* NAME_ELEMENT_TAPERED_CAPSULE__EXTRA; const StringHash HASH_ELEMENT_SHAPE__TRANSLATE = 49208741; extern const char* NAME_ELEMENT_SHAPE__TRANSLATE; const StringHash HASH_ELEMENT_SHAPE__ROTATE = 259965925; extern const char* NAME_ELEMENT_SHAPE__ROTATE; const StringHash HASH_ELEMENT_SHAPE__EXTRA = 79854897; extern const char* NAME_ELEMENT_SHAPE__EXTRA; const StringHash HASH_ELEMENT_RIGID_BODY__TECHNIQUE = 266093477; extern const char* NAME_ELEMENT_RIGID_BODY__TECHNIQUE; typedef extra__technique__AttributeData rigid_body__technique__AttributeData; const StringHash HASH_ELEMENT_RIGID_BODY__EXTRA = 259874209; extern const char* NAME_ELEMENT_RIGID_BODY__EXTRA; const StringHash HASH_ELEMENT_RIGID_CONSTRAINT = 118460596; extern const char* NAME_ELEMENT_RIGID_CONSTRAINT; const StringHash HASH_ELEMENT_PHYSICS_MODEL__RIGID_CONSTRAINT = 118460596; extern const char* NAME_ELEMENT_PHYSICS_MODEL__RIGID_CONSTRAINT; struct rigid_constraint__AttributeData { static const rigid_constraint__AttributeData DEFAULT; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_REF_ATTACHMENT = 166190372; extern const char* NAME_ELEMENT_REF_ATTACHMENT; const StringHash HASH_ELEMENT_RIGID_CONSTRAINT__REF_ATTACHMENT = 166190372; extern const char* NAME_ELEMENT_RIGID_CONSTRAINT__REF_ATTACHMENT; const StringHash HASH_ATTRIBUTE_RIGID_BODY = 262281833; extern const char* NAME_ATTRIBUTE_RIGID_BODY; struct ref_attachment__AttributeData { static const ref_attachment__AttributeData DEFAULT; const ParserChar* rigid_body; }; const StringHash HASH_ELEMENT_REF_ATTACHMENT__TRANSLATE = 20744357; extern const char* NAME_ELEMENT_REF_ATTACHMENT__TRANSLATE; const StringHash HASH_ELEMENT_REF_ATTACHMENT__ROTATE = 172940933; extern const char* NAME_ELEMENT_REF_ATTACHMENT__ROTATE; const StringHash HASH_ELEMENT_REF_ATTACHMENT__EXTRA = 43482337; extern const char* NAME_ELEMENT_REF_ATTACHMENT__EXTRA; const StringHash HASH_ELEMENT_ATTACHMENT = 183690788; extern const char* NAME_ELEMENT_ATTACHMENT; const StringHash HASH_ELEMENT_RIGID_CONSTRAINT__ATTACHMENT = 183690788; extern const char* NAME_ELEMENT_RIGID_CONSTRAINT__ATTACHMENT; struct attachment__AttributeData { static const attachment__AttributeData DEFAULT; const ParserChar* rigid_body; }; const StringHash HASH_ELEMENT_ATTACHMENT__TRANSLATE = 162060341; extern const char* NAME_ELEMENT_ATTACHMENT__TRANSLATE; const StringHash HASH_ELEMENT_ATTACHMENT__ROTATE = 256333637; extern const char* NAME_ELEMENT_ATTACHMENT__ROTATE; const StringHash HASH_ELEMENT_ATTACHMENT__EXTRA = 247981169; extern const char* NAME_ELEMENT_ATTACHMENT__EXTRA; const StringHash HASH_ELEMENT_RIGID_CONSTRAINT__TECHNIQUE_COMMON = 28989358; extern const char* NAME_ELEMENT_RIGID_CONSTRAINT__TECHNIQUE_COMMON; const StringHash HASH_ELEMENT_ENABLED = 168114388; extern const char* NAME_ELEMENT_ENABLED; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__ENABLED = 168114388; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__ENABLED; struct enabled__AttributeData { static const enabled__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_INTERPENETRATE = 88979653; extern const char* NAME_ELEMENT_INTERPENETRATE; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__INTERPENETRATE = 88979653; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__INTERPENETRATE; struct interpenetrate__AttributeData { static const interpenetrate__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_LIMITS = 118237715; extern const char* NAME_ELEMENT_LIMITS; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__LIMITS = 118237715; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__LIMITS; const StringHash HASH_ELEMENT_SWING_CONE_AND_TWIST = 23389540; extern const char* NAME_ELEMENT_SWING_CONE_AND_TWIST; const StringHash HASH_ELEMENT_LIMITS__SWING_CONE_AND_TWIST = 23389540; extern const char* NAME_ELEMENT_LIMITS__SWING_CONE_AND_TWIST; const StringHash HASH_ELEMENT_MIN = 185017758; extern const char* NAME_ELEMENT_MIN; const StringHash HASH_ELEMENT_SWING_CONE_AND_TWIST__MIN = 185017758; extern const char* NAME_ELEMENT_SWING_CONE_AND_TWIST__MIN; struct min__AttributeData { static const min__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_MAX = 185017832; extern const char* NAME_ELEMENT_MAX; const StringHash HASH_ELEMENT_SWING_CONE_AND_TWIST__MAX = 185017832; extern const char* NAME_ELEMENT_SWING_CONE_AND_TWIST__MAX; struct max__AttributeData { static const max__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_LINEAR = 108038914; extern const char* NAME_ELEMENT_LINEAR; const StringHash HASH_ELEMENT_LIMITS__LINEAR = 108038914; extern const char* NAME_ELEMENT_LIMITS__LINEAR; const StringHash HASH_ELEMENT_LINEAR__MIN = 135817038; extern const char* NAME_ELEMENT_LINEAR__MIN; const StringHash HASH_ELEMENT_LINEAR__MAX = 135817016; extern const char* NAME_ELEMENT_LINEAR__MAX; const StringHash HASH_ELEMENT_SPRING = 92514023; extern const char* NAME_ELEMENT_SPRING; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__SPRING = 92514023; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__SPRING; const StringHash HASH_ELEMENT_ANGULAR = 256544162; extern const char* NAME_ELEMENT_ANGULAR; const StringHash HASH_ELEMENT_SPRING__ANGULAR = 256544162; extern const char* NAME_ELEMENT_SPRING__ANGULAR; const StringHash HASH_ELEMENT_STIFFNESS = 13552163; extern const char* NAME_ELEMENT_STIFFNESS; const StringHash HASH_ELEMENT_ANGULAR__STIFFNESS = 13552163; extern const char* NAME_ELEMENT_ANGULAR__STIFFNESS; struct stiffness__AttributeData { static const stiffness__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_DAMPING = 107704311; extern const char* NAME_ELEMENT_DAMPING; const StringHash HASH_ELEMENT_ANGULAR__DAMPING = 107704311; extern const char* NAME_ELEMENT_ANGULAR__DAMPING; struct damping__AttributeData { static const damping__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_TARGET_VALUE = 33955429; extern const char* NAME_ELEMENT_TARGET_VALUE; const StringHash HASH_ELEMENT_ANGULAR__TARGET_VALUE = 33955429; extern const char* NAME_ELEMENT_ANGULAR__TARGET_VALUE; struct target_value__AttributeData { static const target_value__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_SPRING__LINEAR = 62916466; extern const char* NAME_ELEMENT_SPRING__LINEAR; const StringHash HASH_ELEMENT_LINEAR__STIFFNESS = 131408563; extern const char* NAME_ELEMENT_LINEAR__STIFFNESS; const StringHash HASH_ELEMENT_LINEAR__DAMPING = 249329687; extern const char* NAME_ELEMENT_LINEAR__DAMPING; const StringHash HASH_ELEMENT_LINEAR__TARGET_VALUE = 9408485; extern const char* NAME_ELEMENT_LINEAR__TARGET_VALUE; const StringHash HASH_ELEMENT_RIGID_CONSTRAINT__TECHNIQUE = 71550805; extern const char* NAME_ELEMENT_RIGID_CONSTRAINT__TECHNIQUE; typedef extra__technique__AttributeData rigid_constraint__technique__AttributeData; const StringHash HASH_ELEMENT_RIGID_CONSTRAINT__EXTRA = 117024337; extern const char* NAME_ELEMENT_RIGID_CONSTRAINT__EXTRA; const StringHash HASH_ELEMENT_INSTANCE_PHYSICS_MODEL = 133635772; extern const char* NAME_ELEMENT_INSTANCE_PHYSICS_MODEL; const StringHash HASH_ELEMENT_PHYSICS_MODEL__INSTANCE_PHYSICS_MODEL = 133635772; extern const char* NAME_ELEMENT_PHYSICS_MODEL__INSTANCE_PHYSICS_MODEL; const StringHash HASH_ATTRIBUTE_PARENT = 124292180; extern const char* NAME_ATTRIBUTE_PARENT; struct instance_physics_model__AttributeData { static const instance_physics_model__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; const ParserChar* parent; }; const StringHash HASH_ELEMENT_INSTANCE_FORCE_FIELD = 38290564; extern const char* NAME_ELEMENT_INSTANCE_FORCE_FIELD; const StringHash HASH_ELEMENT_INSTANCE_PHYSICS_MODEL__INSTANCE_FORCE_FIELD = 38290564; extern const char* NAME_ELEMENT_INSTANCE_PHYSICS_MODEL__INSTANCE_FORCE_FIELD; struct instance_force_field__AttributeData { static const instance_force_field__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_INSTANCE_FORCE_FIELD__EXTRA = 267250353; extern const char* NAME_ELEMENT_INSTANCE_FORCE_FIELD__EXTRA; const StringHash HASH_ELEMENT_INSTANCE_RIGID_BODY = 204998505; extern const char* NAME_ELEMENT_INSTANCE_RIGID_BODY; const StringHash HASH_ELEMENT_INSTANCE_PHYSICS_MODEL__INSTANCE_RIGID_BODY = 204998505; extern const char* NAME_ELEMENT_INSTANCE_PHYSICS_MODEL__INSTANCE_RIGID_BODY; const StringHash HASH_ATTRIBUTE_BODY = 431545; extern const char* NAME_ATTRIBUTE_BODY; struct instance_rigid_body__AttributeData { static const instance_rigid_body__AttributeData DEFAULT; const ParserChar* body; const ParserChar* sid; const ParserChar* name; const ParserChar* target; }; const StringHash HASH_ELEMENT_INSTANCE_RIGID_BODY__TECHNIQUE_COMMON = 107721262; extern const char* NAME_ELEMENT_INSTANCE_RIGID_BODY__TECHNIQUE_COMMON; const StringHash HASH_ELEMENT_ANGULAR_VELOCITY = 180078265; extern const char* NAME_ELEMENT_ANGULAR_VELOCITY; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__ANGULAR_VELOCITY = 180078265; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__ANGULAR_VELOCITY; const StringHash HASH_ELEMENT_VELOCITY = 2049353; extern const char* NAME_ELEMENT_VELOCITY; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__VELOCITY = 2049353; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__VELOCITY; const StringHash HASH_ELEMENT_INSTANCE_RIGID_BODY__TECHNIQUE = 205322533; extern const char* NAME_ELEMENT_INSTANCE_RIGID_BODY__TECHNIQUE; typedef extra__technique__AttributeData instance_rigid_body__technique__AttributeData; const StringHash HASH_ELEMENT_INSTANCE_RIGID_BODY__EXTRA = 264756801; extern const char* NAME_ELEMENT_INSTANCE_RIGID_BODY__EXTRA; const StringHash HASH_ELEMENT_INSTANCE_RIGID_CONSTRAINT = 110069972; extern const char* NAME_ELEMENT_INSTANCE_RIGID_CONSTRAINT; const StringHash HASH_ELEMENT_INSTANCE_PHYSICS_MODEL__INSTANCE_RIGID_CONSTRAINT = 110069972; extern const char* NAME_ELEMENT_INSTANCE_PHYSICS_MODEL__INSTANCE_RIGID_CONSTRAINT; const StringHash HASH_ATTRIBUTE_CONSTRAINT = 180279812; extern const char* NAME_ATTRIBUTE_CONSTRAINT; struct instance_rigid_constraint__AttributeData { static const instance_rigid_constraint__AttributeData DEFAULT; const ParserChar* constraint; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_INSTANCE_RIGID_CONSTRAINT__EXTRA = 105326065; extern const char* NAME_ELEMENT_INSTANCE_RIGID_CONSTRAINT__EXTRA; const StringHash HASH_ELEMENT_INSTANCE_PHYSICS_MODEL__EXTRA = 189441489; extern const char* NAME_ELEMENT_INSTANCE_PHYSICS_MODEL__EXTRA; const StringHash HASH_ELEMENT_PHYSICS_MODEL__EXTRA = 51424673; extern const char* NAME_ELEMENT_PHYSICS_MODEL__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_MODELS__EXTRA = 158621937; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_MODELS__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_SCENES = 252486147; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_SCENES; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_PHYSICS_SCENES = 252486147; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_PHYSICS_SCENES; struct library_physics_scenes__AttributeData { static const library_physics_scenes__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_SCENES__ASSET = 112385460; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_SCENES__ASSET; const StringHash HASH_ELEMENT_PHYSICS_SCENE = 100496229; extern const char* NAME_ELEMENT_PHYSICS_SCENE; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_SCENES__PHYSICS_SCENE = 100496229; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_SCENES__PHYSICS_SCENE; struct physics_scene__AttributeData { static const physics_scene__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_PHYSICS_SCENE__ASSET = 63501172; extern const char* NAME_ELEMENT_PHYSICS_SCENE__ASSET; const StringHash HASH_ELEMENT_PHYSICS_SCENE__INSTANCE_FORCE_FIELD = 33737508; extern const char* NAME_ELEMENT_PHYSICS_SCENE__INSTANCE_FORCE_FIELD; const StringHash HASH_ELEMENT_PHYSICS_SCENE__INSTANCE_PHYSICS_MODEL = 16473708; extern const char* NAME_ELEMENT_PHYSICS_SCENE__INSTANCE_PHYSICS_MODEL; const StringHash HASH_ELEMENT_PHYSICS_SCENE__TECHNIQUE_COMMON = 53159934; extern const char* NAME_ELEMENT_PHYSICS_SCENE__TECHNIQUE_COMMON; const StringHash HASH_ELEMENT_GRAVITY = 214596313; extern const char* NAME_ELEMENT_GRAVITY; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__GRAVITY = 214596313; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__GRAVITY; struct gravity__AttributeData { static const gravity__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_TIME_STEP = 18674176; extern const char* NAME_ELEMENT_TIME_STEP; const StringHash HASH_ELEMENT_TECHNIQUE_COMMON__TIME_STEP = 18674176; extern const char* NAME_ELEMENT_TECHNIQUE_COMMON__TIME_STEP; struct time_step__AttributeData { static const time_step__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_PHYSICS_SCENE__TECHNIQUE = 57209429; extern const char* NAME_ELEMENT_PHYSICS_SCENE__TECHNIQUE; typedef extra__technique__AttributeData physics_scene__technique__AttributeData; const StringHash HASH_ELEMENT_PHYSICS_SCENE__EXTRA = 63742257; extern const char* NAME_ELEMENT_PHYSICS_SCENE__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_PHYSICS_SCENES__EXTRA = 112627697; extern const char* NAME_ELEMENT_LIBRARY_PHYSICS_SCENES__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_VISUAL_SCENES = 216719139; extern const char* NAME_ELEMENT_LIBRARY_VISUAL_SCENES; const StringHash HASH_ELEMENT_COLLADA__LIBRARY_VISUAL_SCENES = 216719139; extern const char* NAME_ELEMENT_COLLADA__LIBRARY_VISUAL_SCENES; struct library_visual_scenes__AttributeData { static const library_visual_scenes__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_LIBRARY_VISUAL_SCENES__ASSET = 115825748; extern const char* NAME_ELEMENT_LIBRARY_VISUAL_SCENES__ASSET; const StringHash HASH_ELEMENT_VISUAL_SCENE = 220621413; extern const char* NAME_ELEMENT_VISUAL_SCENE; const StringHash HASH_ELEMENT_LIBRARY_VISUAL_SCENES__VISUAL_SCENE = 220621413; extern const char* NAME_ELEMENT_LIBRARY_VISUAL_SCENES__VISUAL_SCENE; struct visual_scene__AttributeData { static const visual_scene__AttributeData DEFAULT; const ParserChar* id; const ParserChar* name; }; const StringHash HASH_ELEMENT_VISUAL_SCENE__ASSET = 13350196; extern const char* NAME_ELEMENT_VISUAL_SCENE__ASSET; const StringHash HASH_ELEMENT_VISUAL_SCENE__NODE = 252544101; extern const char* NAME_ELEMENT_VISUAL_SCENE__NODE; const StringHash HASH_ELEMENT_EVALUATE_SCENE = 145043477; extern const char* NAME_ELEMENT_EVALUATE_SCENE; const StringHash HASH_ELEMENT_VISUAL_SCENE__EVALUATE_SCENE = 145043477; extern const char* NAME_ELEMENT_VISUAL_SCENE__EVALUATE_SCENE; struct evaluate_scene__AttributeData { static const evaluate_scene__AttributeData DEFAULT; const ParserChar* name; }; const StringHash HASH_ELEMENT_RENDER = 212755570; extern const char* NAME_ELEMENT_RENDER; const StringHash HASH_ELEMENT_EVALUATE_SCENE__RENDER = 212755570; extern const char* NAME_ELEMENT_EVALUATE_SCENE__RENDER; const StringHash HASH_ATTRIBUTE_CAMERA_NODE = 136173157; extern const char* NAME_ATTRIBUTE_CAMERA_NODE; struct render__AttributeData { static const render__AttributeData DEFAULT; const ParserChar* camera_node; }; const StringHash HASH_ELEMENT_LAYER = 228991954; extern const char* NAME_ELEMENT_LAYER; const StringHash HASH_ELEMENT_RENDER__LAYER = 228991954; extern const char* NAME_ELEMENT_RENDER__LAYER; const StringHash HASH_ELEMENT_RENDER__INSTANCE_EFFECT = 50798276; extern const char* NAME_ELEMENT_RENDER__INSTANCE_EFFECT; const StringHash HASH_ELEMENT_VISUAL_SCENE__EXTRA = 13625201; extern const char* NAME_ELEMENT_VISUAL_SCENE__EXTRA; const StringHash HASH_ELEMENT_LIBRARY_VISUAL_SCENES__EXTRA = 115543569; extern const char* NAME_ELEMENT_LIBRARY_VISUAL_SCENES__EXTRA; const StringHash HASH_ELEMENT_SCENE = 24758453; extern const char* NAME_ELEMENT_SCENE; const StringHash HASH_ELEMENT_COLLADA__SCENE = 24758453; extern const char* NAME_ELEMENT_COLLADA__SCENE; const StringHash HASH_ELEMENT_INSTANCE_PHYSICS_SCENE = 10609013; extern const char* NAME_ELEMENT_INSTANCE_PHYSICS_SCENE; const StringHash HASH_ELEMENT_SCENE__INSTANCE_PHYSICS_SCENE = 10609013; extern const char* NAME_ELEMENT_SCENE__INSTANCE_PHYSICS_SCENE; struct instance_physics_scene__AttributeData { static const instance_physics_scene__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_INSTANCE_PHYSICS_SCENE__EXTRA = 200714369; extern const char* NAME_ELEMENT_INSTANCE_PHYSICS_SCENE__EXTRA; const StringHash HASH_ELEMENT_INSTANCE_VISUAL_SCENE = 177061637; extern const char* NAME_ELEMENT_INSTANCE_VISUAL_SCENE; const StringHash HASH_ELEMENT_SCENE__INSTANCE_VISUAL_SCENE = 177061637; extern const char* NAME_ELEMENT_SCENE__INSTANCE_VISUAL_SCENE; struct instance_visual_scene__AttributeData { static const instance_visual_scene__AttributeData DEFAULT; const ParserChar* url; const ParserChar* sid; const ParserChar* name; }; const StringHash HASH_ELEMENT_INSTANCE_VISUAL_SCENE__EXTRA = 105662417; extern const char* NAME_ELEMENT_INSTANCE_VISUAL_SCENE__EXTRA; const StringHash HASH_ELEMENT_SCENE__EXTRA = 80035633; extern const char* NAME_ELEMENT_SCENE__EXTRA; const StringHash HASH_ELEMENT_COLLADA__EXTRA = 21800817; extern const char* NAME_ELEMENT_COLLADA__EXTRA; const StringHash HASH_ELEMENT_PROFILE_GLSL = 99286140; extern const char* NAME_ELEMENT_PROFILE_GLSL; struct profile_GLSL__AttributeData { static const profile_GLSL__AttributeData DEFAULT; const ParserChar* id; }; const StringHash HASH_ELEMENT_PROFILE_GLSL__ASSET = 200761748; extern const char* NAME_ELEMENT_PROFILE_GLSL__ASSET; const StringHash HASH_ELEMENT_CODE = 96434469; extern const char* NAME_ELEMENT_CODE; const StringHash HASH_ELEMENT_PROFILE_GLSL__CODE = 96434469; extern const char* NAME_ELEMENT_PROFILE_GLSL__CODE; struct code__AttributeData { static const code__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_INCLUDE = 25321557; extern const char* NAME_ELEMENT_INCLUDE; const StringHash HASH_ELEMENT_PROFILE_GLSL__INCLUDE = 25321557; extern const char* NAME_ELEMENT_PROFILE_GLSL__INCLUDE; struct include__AttributeData { static const include__AttributeData DEFAULT; const ParserChar* sid; const ParserChar* url; }; const StringHash HASH_ELEMENT_PROFILE_GLSL__IMAGE = 200408965; extern const char* NAME_ELEMENT_PROFILE_GLSL__IMAGE; const StringHash HASH_ELEMENT_PROFILE_GLSL__NEWPARAM = 6506701; extern const char* NAME_ELEMENT_PROFILE_GLSL__NEWPARAM; struct profile_GLSL__newparam__AttributeData { static const profile_GLSL__newparam__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_ARRAY = 187722873; extern const char* NAME_ELEMENT_ARRAY; const StringHash HASH_ELEMENT_NEWPARAM__ARRAY = 187722873; extern const char* NAME_ELEMENT_NEWPARAM__ARRAY; const StringHash HASH_ATTRIBUTE_LENGTH = 120344232; extern const char* NAME_ATTRIBUTE_LENGTH; struct newparam__array__AttributeData { static const newparam__array__AttributeData DEFAULT; long length; }; const StringHash HASH_ELEMENT_ARRAY__BOOL = 255667932; extern const char* NAME_ELEMENT_ARRAY__BOOL; const StringHash HASH_ELEMENT_ARRAY__BOOL2 = 64154882; extern const char* NAME_ELEMENT_ARRAY__BOOL2; const StringHash HASH_ELEMENT_ARRAY__BOOL3 = 64154883; extern const char* NAME_ELEMENT_ARRAY__BOOL3; const StringHash HASH_ELEMENT_ARRAY__BOOL4 = 64154884; extern const char* NAME_ELEMENT_ARRAY__BOOL4; const StringHash HASH_ELEMENT_ARRAY__FLOAT = 64404852; extern const char* NAME_ELEMENT_ARRAY__FLOAT; const StringHash HASH_ELEMENT_ARRAY__FLOAT2 = 225171266; extern const char* NAME_ELEMENT_ARRAY__FLOAT2; const StringHash HASH_ELEMENT_ARRAY__FLOAT3 = 225171267; extern const char* NAME_ELEMENT_ARRAY__FLOAT3; const StringHash HASH_ELEMENT_ARRAY__FLOAT4 = 225171268; extern const char* NAME_ELEMENT_ARRAY__FLOAT4; const StringHash HASH_ELEMENT_ARRAY__FLOAT2X2 = 198657234; extern const char* NAME_ELEMENT_ARRAY__FLOAT2X2; const StringHash HASH_ELEMENT_ARRAY__FLOAT3X3 = 198658003; extern const char* NAME_ELEMENT_ARRAY__FLOAT3X3; const StringHash HASH_ELEMENT_ARRAY__FLOAT4X4 = 198657748; extern const char* NAME_ELEMENT_ARRAY__FLOAT4X4; const StringHash HASH_ELEMENT_ARRAY__INT = 150198228; extern const char* NAME_ELEMENT_ARRAY__INT; const StringHash HASH_ELEMENT_ARRAY__INT2 = 255688178; extern const char* NAME_ELEMENT_ARRAY__INT2; const StringHash HASH_ELEMENT_ARRAY__INT3 = 255688179; extern const char* NAME_ELEMENT_ARRAY__INT3; const StringHash HASH_ELEMENT_ARRAY__INT4 = 255688180; extern const char* NAME_ELEMENT_ARRAY__INT4; const StringHash HASH_ELEMENT_ARRAY__SURFACE = 54539381; extern const char* NAME_ELEMENT_ARRAY__SURFACE; struct array__surface__AttributeData { static const array__surface__AttributeData DEFAULT; fx_surface_type_enum type; }; const StringHash HASH_ELEMENT_GENERATOR = 181492914; extern const char* NAME_ELEMENT_GENERATOR; const StringHash HASH_ELEMENT_SURFACE__GENERATOR = 181492914; extern const char* NAME_ELEMENT_SURFACE__GENERATOR; const StringHash HASH_ELEMENT_GENERATOR__ANNOTATE = 233977093; extern const char* NAME_ELEMENT_GENERATOR__ANNOTATE; const StringHash HASH_ELEMENT_GENERATOR__CODE = 77434117; extern const char* NAME_ELEMENT_GENERATOR__CODE; const StringHash HASH_ELEMENT_GENERATOR__INCLUDE = 46428789; extern const char* NAME_ELEMENT_GENERATOR__INCLUDE; const StringHash HASH_ELEMENT_NAME = 77508757; extern const char* NAME_ELEMENT_NAME; const StringHash HASH_ELEMENT_GENERATOR__NAME = 77508757; extern const char* NAME_ELEMENT_GENERATOR__NAME; struct generator__name__AttributeData { static const generator__name__AttributeData DEFAULT; const ParserChar* source; }; const StringHash HASH_ELEMENT_GENERATOR__SETPARAM = 68294157; extern const char* NAME_ELEMENT_GENERATOR__SETPARAM; struct generator__setparam__AttributeData { static const generator__setparam__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_ARRAY__SAMPLER1D = 211887188; extern const char* NAME_ELEMENT_ARRAY__SAMPLER1D; const StringHash HASH_ELEMENT_ARRAY__SAMPLER2D = 211887204; extern const char* NAME_ELEMENT_ARRAY__SAMPLER2D; const StringHash HASH_ELEMENT_ARRAY__SAMPLER3D = 211887220; extern const char* NAME_ELEMENT_ARRAY__SAMPLER3D; const StringHash HASH_ELEMENT_ARRAY__SAMPLERCUBE = 19367365; extern const char* NAME_ELEMENT_ARRAY__SAMPLERCUBE; const StringHash HASH_ELEMENT_ARRAY__SAMPLERRECT = 19293476; extern const char* NAME_ELEMENT_ARRAY__SAMPLERRECT; const StringHash HASH_ELEMENT_ARRAY__SAMPLERDEPTH = 41447320; extern const char* NAME_ELEMENT_ARRAY__SAMPLERDEPTH; const StringHash HASH_ELEMENT_ARRAY__ENUM = 255671613; extern const char* NAME_ELEMENT_ARRAY__ENUM; const StringHash HASH_ELEMENT_ARRAY__ARRAY = 64032889; extern const char* NAME_ELEMENT_ARRAY__ARRAY; typedef newparam__array__AttributeData array__array__AttributeData; const StringHash HASH_ELEMENT_PROFILE_GLSL__TECHNIQUE = 30461381; extern const char* NAME_ELEMENT_PROFILE_GLSL__TECHNIQUE; struct profile_GLSL__technique__AttributeData { static const profile_GLSL__technique__AttributeData DEFAULT; const ParserChar* id; const ParserChar* sid; }; const StringHash HASH_ELEMENT_TECHNIQUE__CODE = 79755173; extern const char* NAME_ELEMENT_TECHNIQUE__CODE; const StringHash HASH_ELEMENT_TECHNIQUE__INCLUDE = 157972389; extern const char* NAME_ELEMENT_TECHNIQUE__INCLUDE; const StringHash HASH_ELEMENT_PROFILE_GLSL__EXTRA = 200487889; extern const char* NAME_ELEMENT_PROFILE_GLSL__EXTRA; const StringHash HASH_ELEMENT_PROFILE_CG = 218491431; extern const char* NAME_ELEMENT_PROFILE_CG; struct profile_CG__AttributeData { static const profile_CG__AttributeData DEFAULT; const ParserChar* id; const ParserChar* platform; }; const StringHash HASH_ELEMENT_PROFILE_CG__ASSET = 84282340; extern const char* NAME_ELEMENT_PROFILE_CG__ASSET; const StringHash HASH_ELEMENT_PROFILE_CG__CODE = 38834053; extern const char* NAME_ELEMENT_PROFILE_CG__CODE; const StringHash HASH_ELEMENT_PROFILE_CG__INCLUDE = 49028773; extern const char* NAME_ELEMENT_PROFILE_CG__INCLUDE; const StringHash HASH_ELEMENT_PROFILE_CG__IMAGE = 84055541; extern const char* NAME_ELEMENT_PROFILE_CG__IMAGE; const StringHash HASH_ELEMENT_PROFILE_CG__NEWPARAM = 113564125; extern const char* NAME_ELEMENT_PROFILE_CG__NEWPARAM; struct profile_CG__newparam__AttributeData { static const profile_CG__newparam__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_BOOL1 = 187805953; extern const char* NAME_ELEMENT_BOOL1; const StringHash HASH_ELEMENT_NEWPARAM__BOOL1 = 187805953; extern const char* NAME_ELEMENT_NEWPARAM__BOOL1; const StringHash HASH_ELEMENT_BOOL1X1 = 28377985; extern const char* NAME_ELEMENT_BOOL1X1; const StringHash HASH_ELEMENT_NEWPARAM__BOOL1X1 = 28377985; extern const char* NAME_ELEMENT_NEWPARAM__BOOL1X1; const StringHash HASH_ELEMENT_BOOL1X2 = 28377986; extern const char* NAME_ELEMENT_BOOL1X2; const StringHash HASH_ELEMENT_NEWPARAM__BOOL1X2 = 28377986; extern const char* NAME_ELEMENT_NEWPARAM__BOOL1X2; const StringHash HASH_ELEMENT_BOOL1X3 = 28377987; extern const char* NAME_ELEMENT_BOOL1X3; const StringHash HASH_ELEMENT_NEWPARAM__BOOL1X3 = 28377987; extern const char* NAME_ELEMENT_NEWPARAM__BOOL1X3; const StringHash HASH_ELEMENT_BOOL1X4 = 28377988; extern const char* NAME_ELEMENT_BOOL1X4; const StringHash HASH_ELEMENT_NEWPARAM__BOOL1X4 = 28377988; extern const char* NAME_ELEMENT_NEWPARAM__BOOL1X4; const StringHash HASH_ELEMENT_BOOL2X1 = 28377729; extern const char* NAME_ELEMENT_BOOL2X1; const StringHash HASH_ELEMENT_NEWPARAM__BOOL2X1 = 28377729; extern const char* NAME_ELEMENT_NEWPARAM__BOOL2X1; const StringHash HASH_ELEMENT_BOOL2X2 = 28377730; extern const char* NAME_ELEMENT_BOOL2X2; const StringHash HASH_ELEMENT_NEWPARAM__BOOL2X2 = 28377730; extern const char* NAME_ELEMENT_NEWPARAM__BOOL2X2; const StringHash HASH_ELEMENT_BOOL2X3 = 28377731; extern const char* NAME_ELEMENT_BOOL2X3; const StringHash HASH_ELEMENT_NEWPARAM__BOOL2X3 = 28377731; extern const char* NAME_ELEMENT_NEWPARAM__BOOL2X3; const StringHash HASH_ELEMENT_BOOL2X4 = 28377732; extern const char* NAME_ELEMENT_BOOL2X4; const StringHash HASH_ELEMENT_NEWPARAM__BOOL2X4 = 28377732; extern const char* NAME_ELEMENT_NEWPARAM__BOOL2X4; const StringHash HASH_ELEMENT_BOOL3X1 = 28377473; extern const char* NAME_ELEMENT_BOOL3X1; const StringHash HASH_ELEMENT_NEWPARAM__BOOL3X1 = 28377473; extern const char* NAME_ELEMENT_NEWPARAM__BOOL3X1; const StringHash HASH_ELEMENT_BOOL3X2 = 28377474; extern const char* NAME_ELEMENT_BOOL3X2; const StringHash HASH_ELEMENT_NEWPARAM__BOOL3X2 = 28377474; extern const char* NAME_ELEMENT_NEWPARAM__BOOL3X2; const StringHash HASH_ELEMENT_BOOL3X3 = 28377475; extern const char* NAME_ELEMENT_BOOL3X3; const StringHash HASH_ELEMENT_NEWPARAM__BOOL3X3 = 28377475; extern const char* NAME_ELEMENT_NEWPARAM__BOOL3X3; const StringHash HASH_ELEMENT_BOOL3X4 = 28377476; extern const char* NAME_ELEMENT_BOOL3X4; const StringHash HASH_ELEMENT_NEWPARAM__BOOL3X4 = 28377476; extern const char* NAME_ELEMENT_NEWPARAM__BOOL3X4; const StringHash HASH_ELEMENT_BOOL4X1 = 28377217; extern const char* NAME_ELEMENT_BOOL4X1; const StringHash HASH_ELEMENT_NEWPARAM__BOOL4X1 = 28377217; extern const char* NAME_ELEMENT_NEWPARAM__BOOL4X1; const StringHash HASH_ELEMENT_BOOL4X2 = 28377218; extern const char* NAME_ELEMENT_BOOL4X2; const StringHash HASH_ELEMENT_NEWPARAM__BOOL4X2 = 28377218; extern const char* NAME_ELEMENT_NEWPARAM__BOOL4X2; const StringHash HASH_ELEMENT_BOOL4X3 = 28377219; extern const char* NAME_ELEMENT_BOOL4X3; const StringHash HASH_ELEMENT_NEWPARAM__BOOL4X3 = 28377219; extern const char* NAME_ELEMENT_NEWPARAM__BOOL4X3; const StringHash HASH_ELEMENT_BOOL4X4 = 28377220; extern const char* NAME_ELEMENT_BOOL4X4; const StringHash HASH_ELEMENT_NEWPARAM__BOOL4X4 = 28377220; extern const char* NAME_ELEMENT_NEWPARAM__BOOL4X4; const StringHash HASH_ELEMENT_FLOAT1 = 56498113; extern const char* NAME_ELEMENT_FLOAT1; const StringHash HASH_ELEMENT_NEWPARAM__FLOAT1 = 56498113; extern const char* NAME_ELEMENT_NEWPARAM__FLOAT1; const StringHash HASH_ELEMENT_INT1 = 263424561; extern const char* NAME_ELEMENT_INT1; const StringHash HASH_ELEMENT_NEWPARAM__INT1 = 263424561; extern const char* NAME_ELEMENT_NEWPARAM__INT1; const StringHash HASH_ELEMENT_INT1X1 = 59389697; extern const char* NAME_ELEMENT_INT1X1; const StringHash HASH_ELEMENT_NEWPARAM__INT1X1 = 59389697; extern const char* NAME_ELEMENT_NEWPARAM__INT1X1; const StringHash HASH_ELEMENT_INT1X2 = 59389698; extern const char* NAME_ELEMENT_INT1X2; const StringHash HASH_ELEMENT_NEWPARAM__INT1X2 = 59389698; extern const char* NAME_ELEMENT_NEWPARAM__INT1X2; const StringHash HASH_ELEMENT_INT1X3 = 59389699; extern const char* NAME_ELEMENT_INT1X3; const StringHash HASH_ELEMENT_NEWPARAM__INT1X3 = 59389699; extern const char* NAME_ELEMENT_NEWPARAM__INT1X3; const StringHash HASH_ELEMENT_INT1X4 = 59389700; extern const char* NAME_ELEMENT_INT1X4; const StringHash HASH_ELEMENT_NEWPARAM__INT1X4 = 59389700; extern const char* NAME_ELEMENT_NEWPARAM__INT1X4; const StringHash HASH_ELEMENT_INT2X1 = 59389441; extern const char* NAME_ELEMENT_INT2X1; const StringHash HASH_ELEMENT_NEWPARAM__INT2X1 = 59389441; extern const char* NAME_ELEMENT_NEWPARAM__INT2X1; const StringHash HASH_ELEMENT_INT2X2 = 59389442; extern const char* NAME_ELEMENT_INT2X2; const StringHash HASH_ELEMENT_NEWPARAM__INT2X2 = 59389442; extern const char* NAME_ELEMENT_NEWPARAM__INT2X2; const StringHash HASH_ELEMENT_INT2X3 = 59389443; extern const char* NAME_ELEMENT_INT2X3; const StringHash HASH_ELEMENT_NEWPARAM__INT2X3 = 59389443; extern const char* NAME_ELEMENT_NEWPARAM__INT2X3; const StringHash HASH_ELEMENT_INT2X4 = 59389444; extern const char* NAME_ELEMENT_INT2X4; const StringHash HASH_ELEMENT_NEWPARAM__INT2X4 = 59389444; extern const char* NAME_ELEMENT_NEWPARAM__INT2X4; const StringHash HASH_ELEMENT_INT3X1 = 59389185; extern const char* NAME_ELEMENT_INT3X1; const StringHash HASH_ELEMENT_NEWPARAM__INT3X1 = 59389185; extern const char* NAME_ELEMENT_NEWPARAM__INT3X1; const StringHash HASH_ELEMENT_INT3X2 = 59389186; extern const char* NAME_ELEMENT_INT3X2; const StringHash HASH_ELEMENT_NEWPARAM__INT3X2 = 59389186; extern const char* NAME_ELEMENT_NEWPARAM__INT3X2; const StringHash HASH_ELEMENT_INT3X3 = 59389187; extern const char* NAME_ELEMENT_INT3X3; const StringHash HASH_ELEMENT_NEWPARAM__INT3X3 = 59389187; extern const char* NAME_ELEMENT_NEWPARAM__INT3X3; const StringHash HASH_ELEMENT_INT3X4 = 59389188; extern const char* NAME_ELEMENT_INT3X4; const StringHash HASH_ELEMENT_NEWPARAM__INT3X4 = 59389188; extern const char* NAME_ELEMENT_NEWPARAM__INT3X4; const StringHash HASH_ELEMENT_INT4X1 = 59388929; extern const char* NAME_ELEMENT_INT4X1; const StringHash HASH_ELEMENT_NEWPARAM__INT4X1 = 59388929; extern const char* NAME_ELEMENT_NEWPARAM__INT4X1; const StringHash HASH_ELEMENT_INT4X2 = 59388930; extern const char* NAME_ELEMENT_INT4X2; const StringHash HASH_ELEMENT_NEWPARAM__INT4X2 = 59388930; extern const char* NAME_ELEMENT_NEWPARAM__INT4X2; const StringHash HASH_ELEMENT_INT4X3 = 59388931; extern const char* NAME_ELEMENT_INT4X3; const StringHash HASH_ELEMENT_NEWPARAM__INT4X3 = 59388931; extern const char* NAME_ELEMENT_NEWPARAM__INT4X3; const StringHash HASH_ELEMENT_INT4X4 = 59388932; extern const char* NAME_ELEMENT_INT4X4; const StringHash HASH_ELEMENT_NEWPARAM__INT4X4 = 59388932; extern const char* NAME_ELEMENT_NEWPARAM__INT4X4; const StringHash HASH_ELEMENT_HALF = 263416166; extern const char* NAME_ELEMENT_HALF; const StringHash HASH_ELEMENT_NEWPARAM__HALF = 263416166; extern const char* NAME_ELEMENT_NEWPARAM__HALF; const StringHash HASH_ELEMENT_HALF1 = 188126817; extern const char* NAME_ELEMENT_HALF1; const StringHash HASH_ELEMENT_NEWPARAM__HALF1 = 188126817; extern const char* NAME_ELEMENT_NEWPARAM__HALF1; const StringHash HASH_ELEMENT_HALF2 = 188126818; extern const char* NAME_ELEMENT_HALF2; const StringHash HASH_ELEMENT_NEWPARAM__HALF2 = 188126818; extern const char* NAME_ELEMENT_NEWPARAM__HALF2; const StringHash HASH_ELEMENT_HALF3 = 188126819; extern const char* NAME_ELEMENT_HALF3; const StringHash HASH_ELEMENT_NEWPARAM__HALF3 = 188126819; extern const char* NAME_ELEMENT_NEWPARAM__HALF3; const StringHash HASH_ELEMENT_HALF4 = 188126820; extern const char* NAME_ELEMENT_HALF4; const StringHash HASH_ELEMENT_NEWPARAM__HALF4 = 188126820; extern const char* NAME_ELEMENT_NEWPARAM__HALF4; const StringHash HASH_ELEMENT_HALF1X1 = 110519169; extern const char* NAME_ELEMENT_HALF1X1; const StringHash HASH_ELEMENT_NEWPARAM__HALF1X1 = 110519169; extern const char* NAME_ELEMENT_NEWPARAM__HALF1X1; const StringHash HASH_ELEMENT_HALF1X2 = 110519170; extern const char* NAME_ELEMENT_HALF1X2; const StringHash HASH_ELEMENT_NEWPARAM__HALF1X2 = 110519170; extern const char* NAME_ELEMENT_NEWPARAM__HALF1X2; const StringHash HASH_ELEMENT_HALF1X3 = 110519171; extern const char* NAME_ELEMENT_HALF1X3; const StringHash HASH_ELEMENT_NEWPARAM__HALF1X3 = 110519171; extern const char* NAME_ELEMENT_NEWPARAM__HALF1X3; const StringHash HASH_ELEMENT_HALF1X4 = 110519172; extern const char* NAME_ELEMENT_HALF1X4; const StringHash HASH_ELEMENT_NEWPARAM__HALF1X4 = 110519172; extern const char* NAME_ELEMENT_NEWPARAM__HALF1X4; const StringHash HASH_ELEMENT_HALF2X1 = 110518913; extern const char* NAME_ELEMENT_HALF2X1; const StringHash HASH_ELEMENT_NEWPARAM__HALF2X1 = 110518913; extern const char* NAME_ELEMENT_NEWPARAM__HALF2X1; const StringHash HASH_ELEMENT_HALF2X2 = 110518914; extern const char* NAME_ELEMENT_HALF2X2; const StringHash HASH_ELEMENT_NEWPARAM__HALF2X2 = 110518914; extern const char* NAME_ELEMENT_NEWPARAM__HALF2X2; const StringHash HASH_ELEMENT_HALF2X3 = 110518915; extern const char* NAME_ELEMENT_HALF2X3; const StringHash HASH_ELEMENT_NEWPARAM__HALF2X3 = 110518915; extern const char* NAME_ELEMENT_NEWPARAM__HALF2X3; const StringHash HASH_ELEMENT_HALF2X4 = 110518916; extern const char* NAME_ELEMENT_HALF2X4; const StringHash HASH_ELEMENT_NEWPARAM__HALF2X4 = 110518916; extern const char* NAME_ELEMENT_NEWPARAM__HALF2X4; const StringHash HASH_ELEMENT_HALF3X1 = 110518657; extern const char* NAME_ELEMENT_HALF3X1; const StringHash HASH_ELEMENT_NEWPARAM__HALF3X1 = 110518657; extern const char* NAME_ELEMENT_NEWPARAM__HALF3X1; const StringHash HASH_ELEMENT_HALF3X2 = 110518658; extern const char* NAME_ELEMENT_HALF3X2; const StringHash HASH_ELEMENT_NEWPARAM__HALF3X2 = 110518658; extern const char* NAME_ELEMENT_NEWPARAM__HALF3X2; const StringHash HASH_ELEMENT_HALF3X3 = 110518659; extern const char* NAME_ELEMENT_HALF3X3; const StringHash HASH_ELEMENT_NEWPARAM__HALF3X3 = 110518659; extern const char* NAME_ELEMENT_NEWPARAM__HALF3X3; const StringHash HASH_ELEMENT_HALF3X4 = 110518660; extern const char* NAME_ELEMENT_HALF3X4; const StringHash HASH_ELEMENT_NEWPARAM__HALF3X4 = 110518660; extern const char* NAME_ELEMENT_NEWPARAM__HALF3X4; const StringHash HASH_ELEMENT_HALF4X1 = 110518401; extern const char* NAME_ELEMENT_HALF4X1; const StringHash HASH_ELEMENT_NEWPARAM__HALF4X1 = 110518401; extern const char* NAME_ELEMENT_NEWPARAM__HALF4X1; const StringHash HASH_ELEMENT_HALF4X2 = 110518402; extern const char* NAME_ELEMENT_HALF4X2; const StringHash HASH_ELEMENT_NEWPARAM__HALF4X2 = 110518402; extern const char* NAME_ELEMENT_NEWPARAM__HALF4X2; const StringHash HASH_ELEMENT_HALF4X3 = 110518403; extern const char* NAME_ELEMENT_HALF4X3; const StringHash HASH_ELEMENT_NEWPARAM__HALF4X3 = 110518403; extern const char* NAME_ELEMENT_NEWPARAM__HALF4X3; const StringHash HASH_ELEMENT_HALF4X4 = 110518404; extern const char* NAME_ELEMENT_HALF4X4; const StringHash HASH_ELEMENT_NEWPARAM__HALF4X4 = 110518404; extern const char* NAME_ELEMENT_NEWPARAM__HALF4X4; const StringHash HASH_ELEMENT_FIXED = 188086852; extern const char* NAME_ELEMENT_FIXED; const StringHash HASH_ELEMENT_NEWPARAM__FIXED = 188086852; extern const char* NAME_ELEMENT_NEWPARAM__FIXED; const StringHash HASH_ELEMENT_FIXED1 = 56599745; extern const char* NAME_ELEMENT_FIXED1; const StringHash HASH_ELEMENT_NEWPARAM__FIXED1 = 56599745; extern const char* NAME_ELEMENT_NEWPARAM__FIXED1; const StringHash HASH_ELEMENT_FIXED2 = 56599746; extern const char* NAME_ELEMENT_FIXED2; const StringHash HASH_ELEMENT_NEWPARAM__FIXED2 = 56599746; extern const char* NAME_ELEMENT_NEWPARAM__FIXED2; const StringHash HASH_ELEMENT_FIXED3 = 56599747; extern const char* NAME_ELEMENT_FIXED3; const StringHash HASH_ELEMENT_NEWPARAM__FIXED3 = 56599747; extern const char* NAME_ELEMENT_NEWPARAM__FIXED3; const StringHash HASH_ELEMENT_FIXED4 = 56599748; extern const char* NAME_ELEMENT_FIXED4; const StringHash HASH_ELEMENT_NEWPARAM__FIXED4 = 56599748; extern const char* NAME_ELEMENT_NEWPARAM__FIXED4; const StringHash HASH_ELEMENT_FIXED1X1 = 262458337; extern const char* NAME_ELEMENT_FIXED1X1; const StringHash HASH_ELEMENT_NEWPARAM__FIXED1X1 = 262458337; extern const char* NAME_ELEMENT_NEWPARAM__FIXED1X1; const StringHash HASH_ELEMENT_FIXED1X2 = 262458338; extern const char* NAME_ELEMENT_FIXED1X2; const StringHash HASH_ELEMENT_NEWPARAM__FIXED1X2 = 262458338; extern const char* NAME_ELEMENT_NEWPARAM__FIXED1X2; const StringHash HASH_ELEMENT_FIXED1X3 = 262458339; extern const char* NAME_ELEMENT_FIXED1X3; const StringHash HASH_ELEMENT_NEWPARAM__FIXED1X3 = 262458339; extern const char* NAME_ELEMENT_NEWPARAM__FIXED1X3; const StringHash HASH_ELEMENT_FIXED1X4 = 262458340; extern const char* NAME_ELEMENT_FIXED1X4; const StringHash HASH_ELEMENT_NEWPARAM__FIXED1X4 = 262458340; extern const char* NAME_ELEMENT_NEWPARAM__FIXED1X4; const StringHash HASH_ELEMENT_FIXED2X1 = 262458081; extern const char* NAME_ELEMENT_FIXED2X1; const StringHash HASH_ELEMENT_NEWPARAM__FIXED2X1 = 262458081; extern const char* NAME_ELEMENT_NEWPARAM__FIXED2X1; const StringHash HASH_ELEMENT_FIXED2X2 = 262458082; extern const char* NAME_ELEMENT_FIXED2X2; const StringHash HASH_ELEMENT_NEWPARAM__FIXED2X2 = 262458082; extern const char* NAME_ELEMENT_NEWPARAM__FIXED2X2; const StringHash HASH_ELEMENT_FIXED2X3 = 262458083; extern const char* NAME_ELEMENT_FIXED2X3; const StringHash HASH_ELEMENT_NEWPARAM__FIXED2X3 = 262458083; extern const char* NAME_ELEMENT_NEWPARAM__FIXED2X3; const StringHash HASH_ELEMENT_FIXED2X4 = 262458084; extern const char* NAME_ELEMENT_FIXED2X4; const StringHash HASH_ELEMENT_NEWPARAM__FIXED2X4 = 262458084; extern const char* NAME_ELEMENT_NEWPARAM__FIXED2X4; const StringHash HASH_ELEMENT_FIXED3X1 = 262457825; extern const char* NAME_ELEMENT_FIXED3X1; const StringHash HASH_ELEMENT_NEWPARAM__FIXED3X1 = 262457825; extern const char* NAME_ELEMENT_NEWPARAM__FIXED3X1; const StringHash HASH_ELEMENT_FIXED3X2 = 262457826; extern const char* NAME_ELEMENT_FIXED3X2; const StringHash HASH_ELEMENT_NEWPARAM__FIXED3X2 = 262457826; extern const char* NAME_ELEMENT_NEWPARAM__FIXED3X2; const StringHash HASH_ELEMENT_FIXED3X3 = 262457827; extern const char* NAME_ELEMENT_FIXED3X3; const StringHash HASH_ELEMENT_NEWPARAM__FIXED3X3 = 262457827; extern const char* NAME_ELEMENT_NEWPARAM__FIXED3X3; const StringHash HASH_ELEMENT_FIXED3X4 = 262457828; extern const char* NAME_ELEMENT_FIXED3X4; const StringHash HASH_ELEMENT_NEWPARAM__FIXED3X4 = 262457828; extern const char* NAME_ELEMENT_NEWPARAM__FIXED3X4; const StringHash HASH_ELEMENT_FIXED4X1 = 262457569; extern const char* NAME_ELEMENT_FIXED4X1; const StringHash HASH_ELEMENT_NEWPARAM__FIXED4X1 = 262457569; extern const char* NAME_ELEMENT_NEWPARAM__FIXED4X1; const StringHash HASH_ELEMENT_FIXED4X2 = 262457570; extern const char* NAME_ELEMENT_FIXED4X2; const StringHash HASH_ELEMENT_NEWPARAM__FIXED4X2 = 262457570; extern const char* NAME_ELEMENT_NEWPARAM__FIXED4X2; const StringHash HASH_ELEMENT_FIXED4X3 = 262457571; extern const char* NAME_ELEMENT_FIXED4X3; const StringHash HASH_ELEMENT_NEWPARAM__FIXED4X3 = 262457571; extern const char* NAME_ELEMENT_NEWPARAM__FIXED4X3; const StringHash HASH_ELEMENT_FIXED4X4 = 262457572; extern const char* NAME_ELEMENT_FIXED4X4; const StringHash HASH_ELEMENT_NEWPARAM__FIXED4X4 = 262457572; extern const char* NAME_ELEMENT_NEWPARAM__FIXED4X4; const StringHash HASH_ELEMENT_NEWPARAM__STRING = 2408951; extern const char* NAME_ELEMENT_NEWPARAM__STRING; const StringHash HASH_ELEMENT_USERTYPE = 109449253; extern const char* NAME_ELEMENT_USERTYPE; const StringHash HASH_ELEMENT_NEWPARAM__USERTYPE = 109449253; extern const char* NAME_ELEMENT_NEWPARAM__USERTYPE; struct usertype__AttributeData { static const usertype__AttributeData DEFAULT; const ParserChar* name; const ParserChar* source; }; const StringHash HASH_ELEMENT_USERTYPE__BOOL = 77353980; extern const char* NAME_ELEMENT_USERTYPE__BOOL; const StringHash HASH_ELEMENT_USERTYPE__BOOL1 = 163921841; extern const char* NAME_ELEMENT_USERTYPE__BOOL1; const StringHash HASH_ELEMENT_USERTYPE__BOOL2 = 163921842; extern const char* NAME_ELEMENT_USERTYPE__BOOL2; const StringHash HASH_ELEMENT_USERTYPE__BOOL3 = 163921843; extern const char* NAME_ELEMENT_USERTYPE__BOOL3; const StringHash HASH_ELEMENT_USERTYPE__BOOL4 = 163921844; extern const char* NAME_ELEMENT_USERTYPE__BOOL4; const StringHash HASH_ELEMENT_USERTYPE__BOOL1X1 = 88060273; extern const char* NAME_ELEMENT_USERTYPE__BOOL1X1; const StringHash HASH_ELEMENT_USERTYPE__BOOL1X2 = 88060274; extern const char* NAME_ELEMENT_USERTYPE__BOOL1X2; const StringHash HASH_ELEMENT_USERTYPE__BOOL1X3 = 88060275; extern const char* NAME_ELEMENT_USERTYPE__BOOL1X3; const StringHash HASH_ELEMENT_USERTYPE__BOOL1X4 = 88060276; extern const char* NAME_ELEMENT_USERTYPE__BOOL1X4; const StringHash HASH_ELEMENT_USERTYPE__BOOL2X1 = 88060017; extern const char* NAME_ELEMENT_USERTYPE__BOOL2X1; const StringHash HASH_ELEMENT_USERTYPE__BOOL2X2 = 88060018; extern const char* NAME_ELEMENT_USERTYPE__BOOL2X2; const StringHash HASH_ELEMENT_USERTYPE__BOOL2X3 = 88060019; extern const char* NAME_ELEMENT_USERTYPE__BOOL2X3; const StringHash HASH_ELEMENT_USERTYPE__BOOL2X4 = 88060020; extern const char* NAME_ELEMENT_USERTYPE__BOOL2X4; const StringHash HASH_ELEMENT_USERTYPE__BOOL3X1 = 88060785; extern const char* NAME_ELEMENT_USERTYPE__BOOL3X1; const StringHash HASH_ELEMENT_USERTYPE__BOOL3X2 = 88060786; extern const char* NAME_ELEMENT_USERTYPE__BOOL3X2; const StringHash HASH_ELEMENT_USERTYPE__BOOL3X3 = 88060787; extern const char* NAME_ELEMENT_USERTYPE__BOOL3X3; const StringHash HASH_ELEMENT_USERTYPE__BOOL3X4 = 88060788; extern const char* NAME_ELEMENT_USERTYPE__BOOL3X4; const StringHash HASH_ELEMENT_USERTYPE__BOOL4X1 = 88060529; extern const char* NAME_ELEMENT_USERTYPE__BOOL4X1; const StringHash HASH_ELEMENT_USERTYPE__BOOL4X2 = 88060530; extern const char* NAME_ELEMENT_USERTYPE__BOOL4X2; const StringHash HASH_ELEMENT_USERTYPE__BOOL4X3 = 88060531; extern const char* NAME_ELEMENT_USERTYPE__BOOL4X3; const StringHash HASH_ELEMENT_USERTYPE__BOOL4X4 = 88060532; extern const char* NAME_ELEMENT_USERTYPE__BOOL4X4; const StringHash HASH_ELEMENT_USERTYPE__FLOAT = 163672004; extern const char* NAME_ELEMENT_USERTYPE__FLOAT; const StringHash HASH_ELEMENT_USERTYPE__FLOAT1 = 202833121; extern const char* NAME_ELEMENT_USERTYPE__FLOAT1; const StringHash HASH_ELEMENT_USERTYPE__FLOAT2 = 202833122; extern const char* NAME_ELEMENT_USERTYPE__FLOAT2; const StringHash HASH_ELEMENT_USERTYPE__FLOAT3 = 202833123; extern const char* NAME_ELEMENT_USERTYPE__FLOAT3; const StringHash HASH_ELEMENT_USERTYPE__FLOAT4 = 202833124; extern const char* NAME_ELEMENT_USERTYPE__FLOAT4; const StringHash HASH_ELEMENT_USERTYPE__FLOAT1X1 = 117236897; extern const char* NAME_ELEMENT_USERTYPE__FLOAT1X1; const StringHash HASH_ELEMENT_USERTYPE__FLOAT1X2 = 117236898; extern const char* NAME_ELEMENT_USERTYPE__FLOAT1X2; const StringHash HASH_ELEMENT_USERTYPE__FLOAT1X3 = 117236899; extern const char* NAME_ELEMENT_USERTYPE__FLOAT1X3; const StringHash HASH_ELEMENT_USERTYPE__FLOAT1X4 = 117236900; extern const char* NAME_ELEMENT_USERTYPE__FLOAT1X4; const StringHash HASH_ELEMENT_USERTYPE__FLOAT2X1 = 117237153; extern const char* NAME_ELEMENT_USERTYPE__FLOAT2X1; const StringHash HASH_ELEMENT_USERTYPE__FLOAT2X2 = 117237154; extern const char* NAME_ELEMENT_USERTYPE__FLOAT2X2; const StringHash HASH_ELEMENT_USERTYPE__FLOAT2X3 = 117237155; extern const char* NAME_ELEMENT_USERTYPE__FLOAT2X3; const StringHash HASH_ELEMENT_USERTYPE__FLOAT2X4 = 117237156; extern const char* NAME_ELEMENT_USERTYPE__FLOAT2X4; const StringHash HASH_ELEMENT_USERTYPE__FLOAT3X1 = 117237409; extern const char* NAME_ELEMENT_USERTYPE__FLOAT3X1; const StringHash HASH_ELEMENT_USERTYPE__FLOAT3X2 = 117237410; extern const char* NAME_ELEMENT_USERTYPE__FLOAT3X2; const StringHash HASH_ELEMENT_USERTYPE__FLOAT3X3 = 117237411; extern const char* NAME_ELEMENT_USERTYPE__FLOAT3X3; const StringHash HASH_ELEMENT_USERTYPE__FLOAT3X4 = 117237412; extern const char* NAME_ELEMENT_USERTYPE__FLOAT3X4; const StringHash HASH_ELEMENT_USERTYPE__FLOAT4X1 = 117237665; extern const char* NAME_ELEMENT_USERTYPE__FLOAT4X1; const StringHash HASH_ELEMENT_USERTYPE__FLOAT4X2 = 117237666; extern const char* NAME_ELEMENT_USERTYPE__FLOAT4X2; const StringHash HASH_ELEMENT_USERTYPE__FLOAT4X3 = 117237667; extern const char* NAME_ELEMENT_USERTYPE__FLOAT4X3; const StringHash HASH_ELEMENT_USERTYPE__FLOAT4X4 = 117237668; extern const char* NAME_ELEMENT_USERTYPE__FLOAT4X4; const StringHash HASH_ELEMENT_USERTYPE__INT = 172606500; extern const char* NAME_ELEMENT_USERTYPE__INT; const StringHash HASH_ELEMENT_USERTYPE__INT1 = 77349585; extern const char* NAME_ELEMENT_USERTYPE__INT1; const StringHash HASH_ELEMENT_USERTYPE__INT2 = 77349586; extern const char* NAME_ELEMENT_USERTYPE__INT2; const StringHash HASH_ELEMENT_USERTYPE__INT3 = 77349587; extern const char* NAME_ELEMENT_USERTYPE__INT3; const StringHash HASH_ELEMENT_USERTYPE__INT4 = 77349588; extern const char* NAME_ELEMENT_USERTYPE__INT4; const StringHash HASH_ELEMENT_USERTYPE__INT1X1 = 205708321; extern const char* NAME_ELEMENT_USERTYPE__INT1X1; const StringHash HASH_ELEMENT_USERTYPE__INT1X2 = 205708322; extern const char* NAME_ELEMENT_USERTYPE__INT1X2; const StringHash HASH_ELEMENT_USERTYPE__INT1X3 = 205708323; extern const char* NAME_ELEMENT_USERTYPE__INT1X3; const StringHash HASH_ELEMENT_USERTYPE__INT1X4 = 205708324; extern const char* NAME_ELEMENT_USERTYPE__INT1X4; const StringHash HASH_ELEMENT_USERTYPE__INT2X1 = 205708577; extern const char* NAME_ELEMENT_USERTYPE__INT2X1; const StringHash HASH_ELEMENT_USERTYPE__INT2X2 = 205708578; extern const char* NAME_ELEMENT_USERTYPE__INT2X2; const StringHash HASH_ELEMENT_USERTYPE__INT2X3 = 205708579; extern const char* NAME_ELEMENT_USERTYPE__INT2X3; const StringHash HASH_ELEMENT_USERTYPE__INT2X4 = 205708580; extern const char* NAME_ELEMENT_USERTYPE__INT2X4; const StringHash HASH_ELEMENT_USERTYPE__INT3X1 = 205708833; extern const char* NAME_ELEMENT_USERTYPE__INT3X1; const StringHash HASH_ELEMENT_USERTYPE__INT3X2 = 205708834; extern const char* NAME_ELEMENT_USERTYPE__INT3X2; const StringHash HASH_ELEMENT_USERTYPE__INT3X3 = 205708835; extern const char* NAME_ELEMENT_USERTYPE__INT3X3; const StringHash HASH_ELEMENT_USERTYPE__INT3X4 = 205708836; extern const char* NAME_ELEMENT_USERTYPE__INT3X4; const StringHash HASH_ELEMENT_USERTYPE__INT4X1 = 205709089; extern const char* NAME_ELEMENT_USERTYPE__INT4X1; const StringHash HASH_ELEMENT_USERTYPE__INT4X2 = 205709090; extern const char* NAME_ELEMENT_USERTYPE__INT4X2; const StringHash HASH_ELEMENT_USERTYPE__INT4X3 = 205709091; extern const char* NAME_ELEMENT_USERTYPE__INT4X3; const StringHash HASH_ELEMENT_USERTYPE__INT4X4 = 205709092; extern const char* NAME_ELEMENT_USERTYPE__INT4X4; const StringHash HASH_ELEMENT_USERTYPE__HALF = 77341062; extern const char* NAME_ELEMENT_USERTYPE__HALF; const StringHash HASH_ELEMENT_USERTYPE__HALF1 = 163715281; extern const char* NAME_ELEMENT_USERTYPE__HALF1; const StringHash HASH_ELEMENT_USERTYPE__HALF2 = 163715282; extern const char* NAME_ELEMENT_USERTYPE__HALF2; const StringHash HASH_ELEMENT_USERTYPE__HALF3 = 163715283; extern const char* NAME_ELEMENT_USERTYPE__HALF3; const StringHash HASH_ELEMENT_USERTYPE__HALF4 = 163715284; extern const char* NAME_ELEMENT_USERTYPE__HALF4; const StringHash HASH_ELEMENT_USERTYPE__HALF1X1 = 35180913; extern const char* NAME_ELEMENT_USERTYPE__HALF1X1; const StringHash HASH_ELEMENT_USERTYPE__HALF1X2 = 35180914; extern const char* NAME_ELEMENT_USERTYPE__HALF1X2; const StringHash HASH_ELEMENT_USERTYPE__HALF1X3 = 35180915; extern const char* NAME_ELEMENT_USERTYPE__HALF1X3; const StringHash HASH_ELEMENT_USERTYPE__HALF1X4 = 35180916; extern const char* NAME_ELEMENT_USERTYPE__HALF1X4; const StringHash HASH_ELEMENT_USERTYPE__HALF2X1 = 35180657; extern const char* NAME_ELEMENT_USERTYPE__HALF2X1; const StringHash HASH_ELEMENT_USERTYPE__HALF2X2 = 35180658; extern const char* NAME_ELEMENT_USERTYPE__HALF2X2; const StringHash HASH_ELEMENT_USERTYPE__HALF2X3 = 35180659; extern const char* NAME_ELEMENT_USERTYPE__HALF2X3; const StringHash HASH_ELEMENT_USERTYPE__HALF2X4 = 35180660; extern const char* NAME_ELEMENT_USERTYPE__HALF2X4; const StringHash HASH_ELEMENT_USERTYPE__HALF3X1 = 35181425; extern const char* NAME_ELEMENT_USERTYPE__HALF3X1; const StringHash HASH_ELEMENT_USERTYPE__HALF3X2 = 35181426; extern const char* NAME_ELEMENT_USERTYPE__HALF3X2; const StringHash HASH_ELEMENT_USERTYPE__HALF3X3 = 35181427; extern const char* NAME_ELEMENT_USERTYPE__HALF3X3; const StringHash HASH_ELEMENT_USERTYPE__HALF3X4 = 35181428; extern const char* NAME_ELEMENT_USERTYPE__HALF3X4; const StringHash HASH_ELEMENT_USERTYPE__HALF4X1 = 35181169; extern const char* NAME_ELEMENT_USERTYPE__HALF4X1; const StringHash HASH_ELEMENT_USERTYPE__HALF4X2 = 35181170; extern const char* NAME_ELEMENT_USERTYPE__HALF4X2; const StringHash HASH_ELEMENT_USERTYPE__HALF4X3 = 35181171; extern const char* NAME_ELEMENT_USERTYPE__HALF4X3; const StringHash HASH_ELEMENT_USERTYPE__HALF4X4 = 35181172; extern const char* NAME_ELEMENT_USERTYPE__HALF4X4; const StringHash HASH_ELEMENT_USERTYPE__FIXED = 163673332; extern const char* NAME_ELEMENT_USERTYPE__FIXED; const StringHash HASH_ELEMENT_USERTYPE__FIXED1 = 202854369; extern const char* NAME_ELEMENT_USERTYPE__FIXED1; const StringHash HASH_ELEMENT_USERTYPE__FIXED2 = 202854370; extern const char* NAME_ELEMENT_USERTYPE__FIXED2; const StringHash HASH_ELEMENT_USERTYPE__FIXED3 = 202854371; extern const char* NAME_ELEMENT_USERTYPE__FIXED3; const StringHash HASH_ELEMENT_USERTYPE__FIXED4 = 202854372; extern const char* NAME_ELEMENT_USERTYPE__FIXED4; const StringHash HASH_ELEMENT_USERTYPE__FIXED1X1 = 122676385; extern const char* NAME_ELEMENT_USERTYPE__FIXED1X1; const StringHash HASH_ELEMENT_USERTYPE__FIXED1X2 = 122676386; extern const char* NAME_ELEMENT_USERTYPE__FIXED1X2; const StringHash HASH_ELEMENT_USERTYPE__FIXED1X3 = 122676387; extern const char* NAME_ELEMENT_USERTYPE__FIXED1X3; const StringHash HASH_ELEMENT_USERTYPE__FIXED1X4 = 122676388; extern const char* NAME_ELEMENT_USERTYPE__FIXED1X4; const StringHash HASH_ELEMENT_USERTYPE__FIXED2X1 = 122676641; extern const char* NAME_ELEMENT_USERTYPE__FIXED2X1; const StringHash HASH_ELEMENT_USERTYPE__FIXED2X2 = 122676642; extern const char* NAME_ELEMENT_USERTYPE__FIXED2X2; const StringHash HASH_ELEMENT_USERTYPE__FIXED2X3 = 122676643; extern const char* NAME_ELEMENT_USERTYPE__FIXED2X3; const StringHash HASH_ELEMENT_USERTYPE__FIXED2X4 = 122676644; extern const char* NAME_ELEMENT_USERTYPE__FIXED2X4; const StringHash HASH_ELEMENT_USERTYPE__FIXED3X1 = 122676897; extern const char* NAME_ELEMENT_USERTYPE__FIXED3X1; const StringHash HASH_ELEMENT_USERTYPE__FIXED3X2 = 122676898; extern const char* NAME_ELEMENT_USERTYPE__FIXED3X2; const StringHash HASH_ELEMENT_USERTYPE__FIXED3X3 = 122676899; extern const char* NAME_ELEMENT_USERTYPE__FIXED3X3; const StringHash HASH_ELEMENT_USERTYPE__FIXED3X4 = 122676900; extern const char* NAME_ELEMENT_USERTYPE__FIXED3X4; const StringHash HASH_ELEMENT_USERTYPE__FIXED4X1 = 122677153; extern const char* NAME_ELEMENT_USERTYPE__FIXED4X1; const StringHash HASH_ELEMENT_USERTYPE__FIXED4X2 = 122677154; extern const char* NAME_ELEMENT_USERTYPE__FIXED4X2; const StringHash HASH_ELEMENT_USERTYPE__FIXED4X3 = 122677155; extern const char* NAME_ELEMENT_USERTYPE__FIXED4X3; const StringHash HASH_ELEMENT_USERTYPE__FIXED4X4 = 122677156; extern const char* NAME_ELEMENT_USERTYPE__FIXED4X4; const StringHash HASH_ELEMENT_USERTYPE__SURFACE = 112365157; extern const char* NAME_ELEMENT_USERTYPE__SURFACE; struct usertype__surface__AttributeData { static const usertype__surface__AttributeData DEFAULT; fx_surface_type_enum type; }; const StringHash HASH_ELEMENT_USERTYPE__SAMPLER1D = 238760004; extern const char* NAME_ELEMENT_USERTYPE__SAMPLER1D; const StringHash HASH_ELEMENT_USERTYPE__SAMPLER2D = 238760052; extern const char* NAME_ELEMENT_USERTYPE__SAMPLER2D; const StringHash HASH_ELEMENT_USERTYPE__SAMPLER3D = 238760036; extern const char* NAME_ELEMENT_USERTYPE__SAMPLER3D; const StringHash HASH_ELEMENT_USERTYPE__SAMPLERRECT = 187856820; extern const char* NAME_ELEMENT_USERTYPE__SAMPLERRECT; const StringHash HASH_ELEMENT_USERTYPE__SAMPLERCUBE = 187930453; extern const char* NAME_ELEMENT_USERTYPE__SAMPLERCUBE; const StringHash HASH_ELEMENT_USERTYPE__SAMPLERDEPTH = 54085176; extern const char* NAME_ELEMENT_USERTYPE__SAMPLERDEPTH; const StringHash HASH_ELEMENT_USERTYPE__STRING = 258747607; extern const char* NAME_ELEMENT_USERTYPE__STRING; const StringHash HASH_ELEMENT_USERTYPE__ENUM = 77365789; extern const char* NAME_ELEMENT_USERTYPE__ENUM; const StringHash HASH_ELEMENT_USERTYPE__ARRAY = 163898057; extern const char* NAME_ELEMENT_USERTYPE__ARRAY; struct usertype__array__AttributeData { static const usertype__array__AttributeData DEFAULT; long length; }; const StringHash HASH_ELEMENT_ARRAY__BOOL1 = 64154881; extern const char* NAME_ELEMENT_ARRAY__BOOL1; const StringHash HASH_ELEMENT_ARRAY__BOOL1X1 = 49089377; extern const char* NAME_ELEMENT_ARRAY__BOOL1X1; const StringHash HASH_ELEMENT_ARRAY__BOOL1X2 = 49089378; extern const char* NAME_ELEMENT_ARRAY__BOOL1X2; const StringHash HASH_ELEMENT_ARRAY__BOOL1X3 = 49089379; extern const char* NAME_ELEMENT_ARRAY__BOOL1X3; const StringHash HASH_ELEMENT_ARRAY__BOOL1X4 = 49089380; extern const char* NAME_ELEMENT_ARRAY__BOOL1X4; const StringHash HASH_ELEMENT_ARRAY__BOOL2X1 = 49089121; extern const char* NAME_ELEMENT_ARRAY__BOOL2X1; const StringHash HASH_ELEMENT_ARRAY__BOOL2X2 = 49089122; extern const char* NAME_ELEMENT_ARRAY__BOOL2X2; const StringHash HASH_ELEMENT_ARRAY__BOOL2X3 = 49089123; extern const char* NAME_ELEMENT_ARRAY__BOOL2X3; const StringHash HASH_ELEMENT_ARRAY__BOOL2X4 = 49089124; extern const char* NAME_ELEMENT_ARRAY__BOOL2X4; const StringHash HASH_ELEMENT_ARRAY__BOOL3X1 = 49088865; extern const char* NAME_ELEMENT_ARRAY__BOOL3X1; const StringHash HASH_ELEMENT_ARRAY__BOOL3X2 = 49088866; extern const char* NAME_ELEMENT_ARRAY__BOOL3X2; const StringHash HASH_ELEMENT_ARRAY__BOOL3X3 = 49088867; extern const char* NAME_ELEMENT_ARRAY__BOOL3X3; const StringHash HASH_ELEMENT_ARRAY__BOOL3X4 = 49088868; extern const char* NAME_ELEMENT_ARRAY__BOOL3X4; const StringHash HASH_ELEMENT_ARRAY__BOOL4X1 = 49088609; extern const char* NAME_ELEMENT_ARRAY__BOOL4X1; const StringHash HASH_ELEMENT_ARRAY__BOOL4X2 = 49088610; extern const char* NAME_ELEMENT_ARRAY__BOOL4X2; const StringHash HASH_ELEMENT_ARRAY__BOOL4X3 = 49088611; extern const char* NAME_ELEMENT_ARRAY__BOOL4X3; const StringHash HASH_ELEMENT_ARRAY__BOOL4X4 = 49088612; extern const char* NAME_ELEMENT_ARRAY__BOOL4X4; const StringHash HASH_ELEMENT_ARRAY__FLOAT1 = 225171265; extern const char* NAME_ELEMENT_ARRAY__FLOAT1; const StringHash HASH_ELEMENT_ARRAY__FLOAT1X1 = 198657489; extern const char* NAME_ELEMENT_ARRAY__FLOAT1X1; const StringHash HASH_ELEMENT_ARRAY__FLOAT1X2 = 198657490; extern const char* NAME_ELEMENT_ARRAY__FLOAT1X2; const StringHash HASH_ELEMENT_ARRAY__FLOAT1X3 = 198657491; extern const char* NAME_ELEMENT_ARRAY__FLOAT1X3; const StringHash HASH_ELEMENT_ARRAY__FLOAT1X4 = 198657492; extern const char* NAME_ELEMENT_ARRAY__FLOAT1X4; const StringHash HASH_ELEMENT_ARRAY__FLOAT2X1 = 198657233; extern const char* NAME_ELEMENT_ARRAY__FLOAT2X1; const StringHash HASH_ELEMENT_ARRAY__FLOAT2X3 = 198657235; extern const char* NAME_ELEMENT_ARRAY__FLOAT2X3; const StringHash HASH_ELEMENT_ARRAY__FLOAT2X4 = 198657236; extern const char* NAME_ELEMENT_ARRAY__FLOAT2X4; const StringHash HASH_ELEMENT_ARRAY__FLOAT3X1 = 198658001; extern const char* NAME_ELEMENT_ARRAY__FLOAT3X1; const StringHash HASH_ELEMENT_ARRAY__FLOAT3X2 = 198658002; extern const char* NAME_ELEMENT_ARRAY__FLOAT3X2; const StringHash HASH_ELEMENT_ARRAY__FLOAT3X4 = 198658004; extern const char* NAME_ELEMENT_ARRAY__FLOAT3X4; const StringHash HASH_ELEMENT_ARRAY__FLOAT4X1 = 198657745; extern const char* NAME_ELEMENT_ARRAY__FLOAT4X1; const StringHash HASH_ELEMENT_ARRAY__FLOAT4X2 = 198657746; extern const char* NAME_ELEMENT_ARRAY__FLOAT4X2; const StringHash HASH_ELEMENT_ARRAY__FLOAT4X3 = 198657747; extern const char* NAME_ELEMENT_ARRAY__FLOAT4X3; const StringHash HASH_ELEMENT_ARRAY__INT1 = 255688177; extern const char* NAME_ELEMENT_ARRAY__INT1; const StringHash HASH_ELEMENT_ARRAY__INT1X1 = 226359169; extern const char* NAME_ELEMENT_ARRAY__INT1X1; const StringHash HASH_ELEMENT_ARRAY__INT1X2 = 226359170; extern const char* NAME_ELEMENT_ARRAY__INT1X2; const StringHash HASH_ELEMENT_ARRAY__INT1X3 = 226359171; extern const char* NAME_ELEMENT_ARRAY__INT1X3; const StringHash HASH_ELEMENT_ARRAY__INT1X4 = 226359172; extern const char* NAME_ELEMENT_ARRAY__INT1X4; const StringHash HASH_ELEMENT_ARRAY__INT2X1 = 226358913; extern const char* NAME_ELEMENT_ARRAY__INT2X1; const StringHash HASH_ELEMENT_ARRAY__INT2X2 = 226358914; extern const char* NAME_ELEMENT_ARRAY__INT2X2; const StringHash HASH_ELEMENT_ARRAY__INT2X3 = 226358915; extern const char* NAME_ELEMENT_ARRAY__INT2X3; const StringHash HASH_ELEMENT_ARRAY__INT2X4 = 226358916; extern const char* NAME_ELEMENT_ARRAY__INT2X4; const StringHash HASH_ELEMENT_ARRAY__INT3X1 = 226358657; extern const char* NAME_ELEMENT_ARRAY__INT3X1; const StringHash HASH_ELEMENT_ARRAY__INT3X2 = 226358658; extern const char* NAME_ELEMENT_ARRAY__INT3X2; const StringHash HASH_ELEMENT_ARRAY__INT3X3 = 226358659; extern const char* NAME_ELEMENT_ARRAY__INT3X3; const StringHash HASH_ELEMENT_ARRAY__INT3X4 = 226358660; extern const char* NAME_ELEMENT_ARRAY__INT3X4; const StringHash HASH_ELEMENT_ARRAY__INT4X1 = 226358401; extern const char* NAME_ELEMENT_ARRAY__INT4X1; const StringHash HASH_ELEMENT_ARRAY__INT4X2 = 226358402; extern const char* NAME_ELEMENT_ARRAY__INT4X2; const StringHash HASH_ELEMENT_ARRAY__INT4X3 = 226358403; extern const char* NAME_ELEMENT_ARRAY__INT4X3; const StringHash HASH_ELEMENT_ARRAY__INT4X4 = 226358404; extern const char* NAME_ELEMENT_ARRAY__INT4X4; const StringHash HASH_ELEMENT_ARRAY__HALF = 255688870; extern const char* NAME_ELEMENT_ARRAY__HALF; const StringHash HASH_ELEMENT_ARRAY__HALF1 = 64490081; extern const char* NAME_ELEMENT_ARRAY__HALF1; const StringHash HASH_ELEMENT_ARRAY__HALF2 = 64490082; extern const char* NAME_ELEMENT_ARRAY__HALF2; const StringHash HASH_ELEMENT_ARRAY__HALF3 = 64490083; extern const char* NAME_ELEMENT_ARRAY__HALF3; const StringHash HASH_ELEMENT_ARRAY__HALF4 = 64490084; extern const char* NAME_ELEMENT_ARRAY__HALF4; const StringHash HASH_ELEMENT_ARRAY__HALF1X1 = 134900577; extern const char* NAME_ELEMENT_ARRAY__HALF1X1; const StringHash HASH_ELEMENT_ARRAY__HALF1X2 = 134900578; extern const char* NAME_ELEMENT_ARRAY__HALF1X2; const StringHash HASH_ELEMENT_ARRAY__HALF1X3 = 134900579; extern const char* NAME_ELEMENT_ARRAY__HALF1X3; const StringHash HASH_ELEMENT_ARRAY__HALF1X4 = 134900580; extern const char* NAME_ELEMENT_ARRAY__HALF1X4; const StringHash HASH_ELEMENT_ARRAY__HALF2X1 = 134900321; extern const char* NAME_ELEMENT_ARRAY__HALF2X1; const StringHash HASH_ELEMENT_ARRAY__HALF2X2 = 134900322; extern const char* NAME_ELEMENT_ARRAY__HALF2X2; const StringHash HASH_ELEMENT_ARRAY__HALF2X3 = 134900323; extern const char* NAME_ELEMENT_ARRAY__HALF2X3; const StringHash HASH_ELEMENT_ARRAY__HALF2X4 = 134900324; extern const char* NAME_ELEMENT_ARRAY__HALF2X4; const StringHash HASH_ELEMENT_ARRAY__HALF3X1 = 134900065; extern const char* NAME_ELEMENT_ARRAY__HALF3X1; const StringHash HASH_ELEMENT_ARRAY__HALF3X2 = 134900066; extern const char* NAME_ELEMENT_ARRAY__HALF3X2; const StringHash HASH_ELEMENT_ARRAY__HALF3X3 = 134900067; extern const char* NAME_ELEMENT_ARRAY__HALF3X3; const StringHash HASH_ELEMENT_ARRAY__HALF3X4 = 134900068; extern const char* NAME_ELEMENT_ARRAY__HALF3X4; const StringHash HASH_ELEMENT_ARRAY__HALF4X1 = 134899809; extern const char* NAME_ELEMENT_ARRAY__HALF4X1; const StringHash HASH_ELEMENT_ARRAY__HALF4X2 = 134899810; extern const char* NAME_ELEMENT_ARRAY__HALF4X2; const StringHash HASH_ELEMENT_ARRAY__HALF4X3 = 134899811; extern const char* NAME_ELEMENT_ARRAY__HALF4X3; const StringHash HASH_ELEMENT_ARRAY__HALF4X4 = 134899812; extern const char* NAME_ELEMENT_ARRAY__HALF4X4; const StringHash HASH_ELEMENT_ARRAY__FIXED = 64390724; extern const char* NAME_ELEMENT_ARRAY__FIXED; const StringHash HASH_ELEMENT_ARRAY__FIXED1 = 224945217; extern const char* NAME_ELEMENT_ARRAY__FIXED1; const StringHash HASH_ELEMENT_ARRAY__FIXED2 = 224945218; extern const char* NAME_ELEMENT_ARRAY__FIXED2; const StringHash HASH_ELEMENT_ARRAY__FIXED3 = 224945219; extern const char* NAME_ELEMENT_ARRAY__FIXED3; const StringHash HASH_ELEMENT_ARRAY__FIXED4 = 224945220; extern const char* NAME_ELEMENT_ARRAY__FIXED4; const StringHash HASH_ELEMENT_ARRAY__FIXED1X1 = 140789201; extern const char* NAME_ELEMENT_ARRAY__FIXED1X1; const StringHash HASH_ELEMENT_ARRAY__FIXED1X2 = 140789202; extern const char* NAME_ELEMENT_ARRAY__FIXED1X2; const StringHash HASH_ELEMENT_ARRAY__FIXED1X3 = 140789203; extern const char* NAME_ELEMENT_ARRAY__FIXED1X3; const StringHash HASH_ELEMENT_ARRAY__FIXED1X4 = 140789204; extern const char* NAME_ELEMENT_ARRAY__FIXED1X4; const StringHash HASH_ELEMENT_ARRAY__FIXED2X1 = 140788945; extern const char* NAME_ELEMENT_ARRAY__FIXED2X1; const StringHash HASH_ELEMENT_ARRAY__FIXED2X2 = 140788946; extern const char* NAME_ELEMENT_ARRAY__FIXED2X2; const StringHash HASH_ELEMENT_ARRAY__FIXED2X3 = 140788947; extern const char* NAME_ELEMENT_ARRAY__FIXED2X3; const StringHash HASH_ELEMENT_ARRAY__FIXED2X4 = 140788948; extern const char* NAME_ELEMENT_ARRAY__FIXED2X4; const StringHash HASH_ELEMENT_ARRAY__FIXED3X1 = 140789713; extern const char* NAME_ELEMENT_ARRAY__FIXED3X1; const StringHash HASH_ELEMENT_ARRAY__FIXED3X2 = 140789714; extern const char* NAME_ELEMENT_ARRAY__FIXED3X2; const StringHash HASH_ELEMENT_ARRAY__FIXED3X3 = 140789715; extern const char* NAME_ELEMENT_ARRAY__FIXED3X3; const StringHash HASH_ELEMENT_ARRAY__FIXED3X4 = 140789716; extern const char* NAME_ELEMENT_ARRAY__FIXED3X4; const StringHash HASH_ELEMENT_ARRAY__FIXED4X1 = 140789457; extern const char* NAME_ELEMENT_ARRAY__FIXED4X1; const StringHash HASH_ELEMENT_ARRAY__FIXED4X2 = 140789458; extern const char* NAME_ELEMENT_ARRAY__FIXED4X2; const StringHash HASH_ELEMENT_ARRAY__FIXED4X3 = 140789459; extern const char* NAME_ELEMENT_ARRAY__FIXED4X3; const StringHash HASH_ELEMENT_ARRAY__FIXED4X4 = 140789460; extern const char* NAME_ELEMENT_ARRAY__FIXED4X4; const StringHash HASH_ELEMENT_ARRAY__STRING = 238223735; extern const char* NAME_ELEMENT_ARRAY__STRING; const StringHash HASH_ELEMENT_ARRAY__USERTYPE = 21405237; extern const char* NAME_ELEMENT_ARRAY__USERTYPE; const StringHash HASH_ELEMENT_USERTYPE__USERTYPE = 242040677; extern const char* NAME_ELEMENT_USERTYPE__USERTYPE; const StringHash HASH_ELEMENT_CONNECT_PARAM = 5868045; extern const char* NAME_ELEMENT_CONNECT_PARAM; const StringHash HASH_ELEMENT_USERTYPE__CONNECT_PARAM = 5868045; extern const char* NAME_ELEMENT_USERTYPE__CONNECT_PARAM; struct connect_param__AttributeData { static const connect_param__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_USERTYPE__SETPARAM = 185734957; extern const char* NAME_ELEMENT_USERTYPE__SETPARAM; const StringHash HASH_ATTRIBUTE_PROGRAM = 127264781; extern const char* NAME_ATTRIBUTE_PROGRAM; struct usertype__setparam__AttributeData { static const usertype__setparam__AttributeData DEFAULT; const ParserChar* ref; const ParserChar* program; }; const StringHash HASH_ELEMENT_SETPARAM__BOOL1 = 3302897; extern const char* NAME_ELEMENT_SETPARAM__BOOL1; const StringHash HASH_ELEMENT_SETPARAM__BOOL1X1 = 40237185; extern const char* NAME_ELEMENT_SETPARAM__BOOL1X1; const StringHash HASH_ELEMENT_SETPARAM__BOOL1X2 = 40237186; extern const char* NAME_ELEMENT_SETPARAM__BOOL1X2; const StringHash HASH_ELEMENT_SETPARAM__BOOL1X3 = 40237187; extern const char* NAME_ELEMENT_SETPARAM__BOOL1X3; const StringHash HASH_ELEMENT_SETPARAM__BOOL1X4 = 40237188; extern const char* NAME_ELEMENT_SETPARAM__BOOL1X4; const StringHash HASH_ELEMENT_SETPARAM__BOOL2X1 = 40237441; extern const char* NAME_ELEMENT_SETPARAM__BOOL2X1; const StringHash HASH_ELEMENT_SETPARAM__BOOL2X2 = 40237442; extern const char* NAME_ELEMENT_SETPARAM__BOOL2X2; const StringHash HASH_ELEMENT_SETPARAM__BOOL2X3 = 40237443; extern const char* NAME_ELEMENT_SETPARAM__BOOL2X3; const StringHash HASH_ELEMENT_SETPARAM__BOOL2X4 = 40237444; extern const char* NAME_ELEMENT_SETPARAM__BOOL2X4; const StringHash HASH_ELEMENT_SETPARAM__BOOL3X1 = 40237697; extern const char* NAME_ELEMENT_SETPARAM__BOOL3X1; const StringHash HASH_ELEMENT_SETPARAM__BOOL3X2 = 40237698; extern const char* NAME_ELEMENT_SETPARAM__BOOL3X2; const StringHash HASH_ELEMENT_SETPARAM__BOOL3X3 = 40237699; extern const char* NAME_ELEMENT_SETPARAM__BOOL3X3; const StringHash HASH_ELEMENT_SETPARAM__BOOL3X4 = 40237700; extern const char* NAME_ELEMENT_SETPARAM__BOOL3X4; const StringHash HASH_ELEMENT_SETPARAM__BOOL4X1 = 40237953; extern const char* NAME_ELEMENT_SETPARAM__BOOL4X1; const StringHash HASH_ELEMENT_SETPARAM__BOOL4X2 = 40237954; extern const char* NAME_ELEMENT_SETPARAM__BOOL4X2; const StringHash HASH_ELEMENT_SETPARAM__BOOL4X3 = 40237955; extern const char* NAME_ELEMENT_SETPARAM__BOOL4X3; const StringHash HASH_ELEMENT_SETPARAM__BOOL4X4 = 40237956; extern const char* NAME_ELEMENT_SETPARAM__BOOL4X4; const StringHash HASH_ELEMENT_SETPARAM__FLOAT1 = 56842353; extern const char* NAME_ELEMENT_SETPARAM__FLOAT1; const StringHash HASH_ELEMENT_SETPARAM__INT1 = 226673; extern const char* NAME_ELEMENT_SETPARAM__INT1; const StringHash HASH_ELEMENT_SETPARAM__INT1X1 = 58030257; extern const char* NAME_ELEMENT_SETPARAM__INT1X1; const StringHash HASH_ELEMENT_SETPARAM__INT1X2 = 58030258; extern const char* NAME_ELEMENT_SETPARAM__INT1X2; const StringHash HASH_ELEMENT_SETPARAM__INT1X3 = 58030259; extern const char* NAME_ELEMENT_SETPARAM__INT1X3; const StringHash HASH_ELEMENT_SETPARAM__INT1X4 = 58030260; extern const char* NAME_ELEMENT_SETPARAM__INT1X4; const StringHash HASH_ELEMENT_SETPARAM__INT2X1 = 58030513; extern const char* NAME_ELEMENT_SETPARAM__INT2X1; const StringHash HASH_ELEMENT_SETPARAM__INT2X2 = 58030514; extern const char* NAME_ELEMENT_SETPARAM__INT2X2; const StringHash HASH_ELEMENT_SETPARAM__INT2X3 = 58030515; extern const char* NAME_ELEMENT_SETPARAM__INT2X3; const StringHash HASH_ELEMENT_SETPARAM__INT2X4 = 58030516; extern const char* NAME_ELEMENT_SETPARAM__INT2X4; const StringHash HASH_ELEMENT_SETPARAM__INT3X1 = 58030769; extern const char* NAME_ELEMENT_SETPARAM__INT3X1; const StringHash HASH_ELEMENT_SETPARAM__INT3X2 = 58030770; extern const char* NAME_ELEMENT_SETPARAM__INT3X2; const StringHash HASH_ELEMENT_SETPARAM__INT3X3 = 58030771; extern const char* NAME_ELEMENT_SETPARAM__INT3X3; const StringHash HASH_ELEMENT_SETPARAM__INT3X4 = 58030772; extern const char* NAME_ELEMENT_SETPARAM__INT3X4; const StringHash HASH_ELEMENT_SETPARAM__INT4X1 = 58031025; extern const char* NAME_ELEMENT_SETPARAM__INT4X1; const StringHash HASH_ELEMENT_SETPARAM__INT4X2 = 58031026; extern const char* NAME_ELEMENT_SETPARAM__INT4X2; const StringHash HASH_ELEMENT_SETPARAM__INT4X3 = 58031027; extern const char* NAME_ELEMENT_SETPARAM__INT4X3; const StringHash HASH_ELEMENT_SETPARAM__INT4X4 = 58031028; extern const char* NAME_ELEMENT_SETPARAM__INT4X4; const StringHash HASH_ELEMENT_SETPARAM__HALF = 227366; extern const char* NAME_ELEMENT_SETPARAM__HALF; const StringHash HASH_ELEMENT_SETPARAM__HALF1 = 3637905; extern const char* NAME_ELEMENT_SETPARAM__HALF1; const StringHash HASH_ELEMENT_SETPARAM__HALF2 = 3637906; extern const char* NAME_ELEMENT_SETPARAM__HALF2; const StringHash HASH_ELEMENT_SETPARAM__HALF3 = 3637907; extern const char* NAME_ELEMENT_SETPARAM__HALF3; const StringHash HASH_ELEMENT_SETPARAM__HALF4 = 3637908; extern const char* NAME_ELEMENT_SETPARAM__HALF4; const StringHash HASH_ELEMENT_SETPARAM__HALF1X1 = 125999233; extern const char* NAME_ELEMENT_SETPARAM__HALF1X1; const StringHash HASH_ELEMENT_SETPARAM__HALF1X2 = 125999234; extern const char* NAME_ELEMENT_SETPARAM__HALF1X2; const StringHash HASH_ELEMENT_SETPARAM__HALF1X3 = 125999235; extern const char* NAME_ELEMENT_SETPARAM__HALF1X3; const StringHash HASH_ELEMENT_SETPARAM__HALF1X4 = 125999236; extern const char* NAME_ELEMENT_SETPARAM__HALF1X4; const StringHash HASH_ELEMENT_SETPARAM__HALF2X1 = 125999489; extern const char* NAME_ELEMENT_SETPARAM__HALF2X1; const StringHash HASH_ELEMENT_SETPARAM__HALF2X2 = 125999490; extern const char* NAME_ELEMENT_SETPARAM__HALF2X2; const StringHash HASH_ELEMENT_SETPARAM__HALF2X3 = 125999491; extern const char* NAME_ELEMENT_SETPARAM__HALF2X3; const StringHash HASH_ELEMENT_SETPARAM__HALF2X4 = 125999492; extern const char* NAME_ELEMENT_SETPARAM__HALF2X4; const StringHash HASH_ELEMENT_SETPARAM__HALF3X1 = 125999745; extern const char* NAME_ELEMENT_SETPARAM__HALF3X1; const StringHash HASH_ELEMENT_SETPARAM__HALF3X2 = 125999746; extern const char* NAME_ELEMENT_SETPARAM__HALF3X2; const StringHash HASH_ELEMENT_SETPARAM__HALF3X3 = 125999747; extern const char* NAME_ELEMENT_SETPARAM__HALF3X3; const StringHash HASH_ELEMENT_SETPARAM__HALF3X4 = 125999748; extern const char* NAME_ELEMENT_SETPARAM__HALF3X4; const StringHash HASH_ELEMENT_SETPARAM__HALF4X1 = 126000001; extern const char* NAME_ELEMENT_SETPARAM__HALF4X1; const StringHash HASH_ELEMENT_SETPARAM__HALF4X2 = 126000002; extern const char* NAME_ELEMENT_SETPARAM__HALF4X2; const StringHash HASH_ELEMENT_SETPARAM__HALF4X3 = 126000003; extern const char* NAME_ELEMENT_SETPARAM__HALF4X3; const StringHash HASH_ELEMENT_SETPARAM__HALF4X4 = 126000004; extern const char* NAME_ELEMENT_SETPARAM__HALF4X4; const StringHash HASH_ELEMENT_SETPARAM__FIXED = 3542708; extern const char* NAME_ELEMENT_SETPARAM__FIXED; const StringHash HASH_ELEMENT_SETPARAM__FIXED1 = 56683377; extern const char* NAME_ELEMENT_SETPARAM__FIXED1; const StringHash HASH_ELEMENT_SETPARAM__FIXED2 = 56683378; extern const char* NAME_ELEMENT_SETPARAM__FIXED2; const StringHash HASH_ELEMENT_SETPARAM__FIXED3 = 56683379; extern const char* NAME_ELEMENT_SETPARAM__FIXED3; const StringHash HASH_ELEMENT_SETPARAM__FIXED4 = 56683380; extern const char* NAME_ELEMENT_SETPARAM__FIXED4; const StringHash HASH_ELEMENT_SETPARAM__FIXED1X1 = 15432657; extern const char* NAME_ELEMENT_SETPARAM__FIXED1X1; const StringHash HASH_ELEMENT_SETPARAM__FIXED1X2 = 15432658; extern const char* NAME_ELEMENT_SETPARAM__FIXED1X2; const StringHash HASH_ELEMENT_SETPARAM__FIXED1X3 = 15432659; extern const char* NAME_ELEMENT_SETPARAM__FIXED1X3; const StringHash HASH_ELEMENT_SETPARAM__FIXED1X4 = 15432660; extern const char* NAME_ELEMENT_SETPARAM__FIXED1X4; const StringHash HASH_ELEMENT_SETPARAM__FIXED2X1 = 15432401; extern const char* NAME_ELEMENT_SETPARAM__FIXED2X1; const StringHash HASH_ELEMENT_SETPARAM__FIXED2X2 = 15432402; extern const char* NAME_ELEMENT_SETPARAM__FIXED2X2; const StringHash HASH_ELEMENT_SETPARAM__FIXED2X3 = 15432403; extern const char* NAME_ELEMENT_SETPARAM__FIXED2X3; const StringHash HASH_ELEMENT_SETPARAM__FIXED2X4 = 15432404; extern const char* NAME_ELEMENT_SETPARAM__FIXED2X4; const StringHash HASH_ELEMENT_SETPARAM__FIXED3X1 = 15432145; extern const char* NAME_ELEMENT_SETPARAM__FIXED3X1; const StringHash HASH_ELEMENT_SETPARAM__FIXED3X2 = 15432146; extern const char* NAME_ELEMENT_SETPARAM__FIXED3X2; const StringHash HASH_ELEMENT_SETPARAM__FIXED3X3 = 15432147; extern const char* NAME_ELEMENT_SETPARAM__FIXED3X3; const StringHash HASH_ELEMENT_SETPARAM__FIXED3X4 = 15432148; extern const char* NAME_ELEMENT_SETPARAM__FIXED3X4; const StringHash HASH_ELEMENT_SETPARAM__FIXED4X1 = 15431889; extern const char* NAME_ELEMENT_SETPARAM__FIXED4X1; const StringHash HASH_ELEMENT_SETPARAM__FIXED4X2 = 15431890; extern const char* NAME_ELEMENT_SETPARAM__FIXED4X2; const StringHash HASH_ELEMENT_SETPARAM__FIXED4X3 = 15431891; extern const char* NAME_ELEMENT_SETPARAM__FIXED4X3; const StringHash HASH_ELEMENT_SETPARAM__FIXED4X4 = 15431892; extern const char* NAME_ELEMENT_SETPARAM__FIXED4X4; const StringHash HASH_ELEMENT_SETPARAM__STRING = 3903559; extern const char* NAME_ELEMENT_SETPARAM__STRING; const StringHash HASH_ELEMENT_SETPARAM__USERTYPE = 164216885; extern const char* NAME_ELEMENT_SETPARAM__USERTYPE; const StringHash HASH_ELEMENT_SETPARAM__ARRAY = 3250313; extern const char* NAME_ELEMENT_SETPARAM__ARRAY; typedef usertype__array__AttributeData setparam__array__AttributeData; const StringHash HASH_ELEMENT_SETPARAM__CONNECT_PARAM = 151241709; extern const char* NAME_ELEMENT_SETPARAM__CONNECT_PARAM; const StringHash HASH_ELEMENT_PROFILE_CG__TECHNIQUE = 198327461; extern const char* NAME_ELEMENT_PROFILE_CG__TECHNIQUE; struct profile_CG__technique__AttributeData { static const profile_CG__technique__AttributeData DEFAULT; const ParserChar* id; const ParserChar* sid; }; const StringHash HASH_ELEMENT_PROFILE_CG__EXTRA = 84040097; extern const char* NAME_ELEMENT_PROFILE_CG__EXTRA; const StringHash HASH_ELEMENT_PROFILE_COMMON = 128854558; extern const char* NAME_ELEMENT_PROFILE_COMMON; struct profile_COMMON__AttributeData { static const profile_COMMON__AttributeData DEFAULT; const ParserChar* id; }; const StringHash HASH_ELEMENT_PROFILE_COMMON__ASSET = 145422180; extern const char* NAME_ELEMENT_PROFILE_COMMON__ASSET; const StringHash HASH_ELEMENT_PROFILE_COMMON__IMAGE = 145647989; extern const char* NAME_ELEMENT_PROFILE_COMMON__IMAGE; const StringHash HASH_ELEMENT_PROFILE_COMMON__NEWPARAM = 151782173; extern const char* NAME_ELEMENT_PROFILE_COMMON__NEWPARAM; struct profile_COMMON__newparam__AttributeData { static const profile_COMMON__newparam__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_PROFILE_COMMON__TECHNIQUE = 123572309; extern const char* NAME_ELEMENT_PROFILE_COMMON__TECHNIQUE; struct profile_COMMON__technique__AttributeData { static const profile_COMMON__technique__AttributeData DEFAULT; const ParserChar* id; const ParserChar* sid; }; const StringHash HASH_ELEMENT_TECHNIQUE__CONSTANT = 140404900; extern const char* NAME_ELEMENT_TECHNIQUE__CONSTANT; const StringHash HASH_ELEMENT_EMISSION = 17478014; extern const char* NAME_ELEMENT_EMISSION; const StringHash HASH_ELEMENT_CONSTANT__EMISSION = 17478014; extern const char* NAME_ELEMENT_CONSTANT__EMISSION; const StringHash HASH_ELEMENT_EMISSION__COLOR = 99748322; extern const char* NAME_ELEMENT_EMISSION__COLOR; struct emission__color__AttributeData { static const emission__color__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_EMISSION__PARAM = 97460989; extern const char* NAME_ELEMENT_EMISSION__PARAM; struct emission__param__AttributeData { static const emission__param__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_TEXTURE = 56965445; extern const char* NAME_ELEMENT_TEXTURE; const StringHash HASH_ELEMENT_EMISSION__TEXTURE = 56965445; extern const char* NAME_ELEMENT_EMISSION__TEXTURE; const StringHash HASH_ATTRIBUTE_TEXTURE = 181386485; extern const char* NAME_ATTRIBUTE_TEXTURE; const StringHash HASH_ATTRIBUTE_TEXCOORD = 216686884; extern const char* NAME_ATTRIBUTE_TEXCOORD; struct texture__AttributeData { static const texture__AttributeData DEFAULT; const ParserChar* texture; const ParserChar* texcoord; }; const StringHash HASH_ELEMENT_TEXTURE__EXTRA = 161952913; extern const char* NAME_ELEMENT_TEXTURE__EXTRA; const StringHash HASH_ELEMENT_REFLECTIVE = 43423765; extern const char* NAME_ELEMENT_REFLECTIVE; const StringHash HASH_ELEMENT_CONSTANT__REFLECTIVE = 43423765; extern const char* NAME_ELEMENT_CONSTANT__REFLECTIVE; const StringHash HASH_ELEMENT_REFLECTIVE__COLOR = 9172162; extern const char* NAME_ELEMENT_REFLECTIVE__COLOR; typedef emission__color__AttributeData reflective__color__AttributeData; const StringHash HASH_ELEMENT_REFLECTIVE__PARAM = 11876829; extern const char* NAME_ELEMENT_REFLECTIVE__PARAM; typedef emission__param__AttributeData reflective__param__AttributeData; const StringHash HASH_ELEMENT_REFLECTIVE__TEXTURE = 159259701; extern const char* NAME_ELEMENT_REFLECTIVE__TEXTURE; const StringHash HASH_ELEMENT_REFLECTIVITY = 110633513; extern const char* NAME_ELEMENT_REFLECTIVITY; const StringHash HASH_ELEMENT_CONSTANT__REFLECTIVITY = 110633513; extern const char* NAME_ELEMENT_CONSTANT__REFLECTIVITY; const StringHash HASH_ELEMENT_REFLECTIVITY__FLOAT = 149886404; extern const char* NAME_ELEMENT_REFLECTIVITY__FLOAT; struct reflectivity__float__AttributeData { static const reflectivity__float__AttributeData DEFAULT; const ParserChar* sid; }; const StringHash HASH_ELEMENT_REFLECTIVITY__PARAM = 148154429; extern const char* NAME_ELEMENT_REFLECTIVITY__PARAM; struct reflectivity__param__AttributeData { static const reflectivity__param__AttributeData DEFAULT; const ParserChar* ref; }; const StringHash HASH_ELEMENT_TRANSPARENT = 145306628; extern const char* NAME_ELEMENT_TRANSPARENT; const StringHash HASH_ELEMENT_CONSTANT__TRANSPARENT = 145306628; extern const char* NAME_ELEMENT_CONSTANT__TRANSPARENT; const StringHash HASH_ATTRIBUTE_OPAQUE = 124160181; extern const char* NAME_ATTRIBUTE_OPAQUE; struct transparent__AttributeData { static const transparent__AttributeData DEFAULT; fx_opaque_enum opaque; }; const StringHash HASH_ELEMENT_TRANSPARENT__COLOR = 107619106; extern const char* NAME_ELEMENT_TRANSPARENT__COLOR; typedef emission__color__AttributeData transparent__color__AttributeData; const StringHash HASH_ELEMENT_TRANSPARENT__PARAM = 106350653; extern const char* NAME_ELEMENT_TRANSPARENT__PARAM; typedef emission__param__AttributeData transparent__param__AttributeData; const StringHash HASH_ELEMENT_TRANSPARENT__TEXTURE = 177208021; extern const char* NAME_ELEMENT_TRANSPARENT__TEXTURE; const StringHash HASH_ELEMENT_TRANSPARENCY = 177422633; extern const char* NAME_ELEMENT_TRANSPARENCY; const StringHash HASH_ELEMENT_CONSTANT__TRANSPARENCY = 177422633; extern const char* NAME_ELEMENT_CONSTANT__TRANSPARENCY; const StringHash HASH_ELEMENT_TRANSPARENCY__FLOAT = 140067972; extern const char* NAME_ELEMENT_TRANSPARENCY__FLOAT; typedef reflectivity__float__AttributeData transparency__float__AttributeData; const StringHash HASH_ELEMENT_TRANSPARENCY__PARAM = 140679549; extern const char* NAME_ELEMENT_TRANSPARENCY__PARAM; typedef reflectivity__param__AttributeData transparency__param__AttributeData; const StringHash HASH_ELEMENT_INDEX_OF_REFRACTION = 195491134; extern const char* NAME_ELEMENT_INDEX_OF_REFRACTION; const StringHash HASH_ELEMENT_CONSTANT__INDEX_OF_REFRACTION = 195491134; extern const char* NAME_ELEMENT_CONSTANT__INDEX_OF_REFRACTION; const StringHash HASH_ELEMENT_INDEX_OF_REFRACTION__FLOAT = 70494564; extern const char* NAME_ELEMENT_INDEX_OF_REFRACTION__FLOAT; typedef reflectivity__float__AttributeData index_of_refraction__float__AttributeData; const StringHash HASH_ELEMENT_INDEX_OF_REFRACTION__PARAM = 67646621; extern const char* NAME_ELEMENT_INDEX_OF_REFRACTION__PARAM; typedef reflectivity__param__AttributeData index_of_refraction__param__AttributeData; const StringHash HASH_ELEMENT_LAMBERT = 90423428; extern const char* NAME_ELEMENT_LAMBERT; const StringHash HASH_ELEMENT_TECHNIQUE__LAMBERT = 90423428; extern const char* NAME_ELEMENT_TECHNIQUE__LAMBERT; const StringHash HASH_ELEMENT_LAMBERT__EMISSION = 15092238; extern const char* NAME_ELEMENT_LAMBERT__EMISSION; const StringHash HASH_ELEMENT_LAMBERT__AMBIENT = 16135972; extern const char* NAME_ELEMENT_LAMBERT__AMBIENT; const StringHash HASH_ELEMENT_AMBIENT__PARAM = 149506909; extern const char* NAME_ELEMENT_AMBIENT__PARAM; typedef emission__param__AttributeData ambient__param__AttributeData; const StringHash HASH_ELEMENT_AMBIENT__TEXTURE = 84710501; extern const char* NAME_ELEMENT_AMBIENT__TEXTURE; const StringHash HASH_ELEMENT_DIFFUSE = 36835829; extern const char* NAME_ELEMENT_DIFFUSE; const StringHash HASH_ELEMENT_LAMBERT__DIFFUSE = 36835829; extern const char* NAME_ELEMENT_LAMBERT__DIFFUSE; const StringHash HASH_ELEMENT_DIFFUSE__COLOR = 211136114; extern const char* NAME_ELEMENT_DIFFUSE__COLOR; typedef emission__color__AttributeData diffuse__color__AttributeData; const StringHash HASH_ELEMENT_DIFFUSE__PARAM = 212551533; extern const char* NAME_ELEMENT_DIFFUSE__PARAM; typedef emission__param__AttributeData diffuse__param__AttributeData; const StringHash HASH_ELEMENT_DIFFUSE__TEXTURE = 117481509; extern const char* NAME_ELEMENT_DIFFUSE__TEXTURE; const StringHash HASH_ELEMENT_LAMBERT__REFLECTIVE = 242202613; extern const char* NAME_ELEMENT_LAMBERT__REFLECTIVE; const StringHash HASH_ELEMENT_LAMBERT__REFLECTIVITY = 263720665; extern const char* NAME_ELEMENT_LAMBERT__REFLECTIVITY; const StringHash HASH_ELEMENT_LAMBERT__TRANSPARENT = 121356996; extern const char* NAME_ELEMENT_LAMBERT__TRANSPARENT; const StringHash HASH_ELEMENT_LAMBERT__TRANSPARENCY = 62664153; extern const char* NAME_ELEMENT_LAMBERT__TRANSPARENCY; const StringHash HASH_ELEMENT_LAMBERT__INDEX_OF_REFRACTION = 87566030; extern const char* NAME_ELEMENT_LAMBERT__INDEX_OF_REFRACTION; const StringHash HASH_ELEMENT_PHONG = 204592647; extern const char* NAME_ELEMENT_PHONG; const StringHash HASH_ELEMENT_TECHNIQUE__PHONG = 204592647; extern const char* NAME_ELEMENT_TECHNIQUE__PHONG; const StringHash HASH_ELEMENT_PHONG__EMISSION = 105372942; extern const char* NAME_ELEMENT_PHONG__EMISSION; const StringHash HASH_ELEMENT_PHONG__AMBIENT = 157036644; extern const char* NAME_ELEMENT_PHONG__AMBIENT; const StringHash HASH_ELEMENT_PHONG__DIFFUSE = 93849765; extern const char* NAME_ELEMENT_PHONG__DIFFUSE; const StringHash HASH_ELEMENT_SPECULAR = 16253650; extern const char* NAME_ELEMENT_SPECULAR; const StringHash HASH_ELEMENT_PHONG__SPECULAR = 16253650; extern const char* NAME_ELEMENT_PHONG__SPECULAR; const StringHash HASH_ELEMENT_SPECULAR__COLOR = 16126290; extern const char* NAME_ELEMENT_SPECULAR__COLOR; typedef emission__color__AttributeData specular__color__AttributeData; const StringHash HASH_ELEMENT_SPECULAR__PARAM = 13294157; extern const char* NAME_ELEMENT_SPECULAR__PARAM; typedef emission__param__AttributeData specular__param__AttributeData; const StringHash HASH_ELEMENT_SPECULAR__TEXTURE = 110988357; extern const char* NAME_ELEMENT_SPECULAR__TEXTURE; const StringHash HASH_ELEMENT_SHININESS = 211569187; extern const char* NAME_ELEMENT_SHININESS; const StringHash HASH_ELEMENT_PHONG__SHININESS = 211569187; extern const char* NAME_ELEMENT_PHONG__SHININESS; const StringHash HASH_ELEMENT_SHININESS__FLOAT = 39878676; extern const char* NAME_ELEMENT_SHININESS__FLOAT; typedef reflectivity__float__AttributeData shininess__float__AttributeData; const StringHash HASH_ELEMENT_SHININESS__PARAM = 40230381; extern const char* NAME_ELEMENT_SHININESS__PARAM; typedef reflectivity__param__AttributeData shininess__param__AttributeData; const StringHash HASH_ELEMENT_PHONG__REFLECTIVE = 268102997; extern const char* NAME_ELEMENT_PHONG__REFLECTIVE; const StringHash HASH_ELEMENT_PHONG__REFLECTIVITY = 183332681; extern const char* NAME_ELEMENT_PHONG__REFLECTIVITY; const StringHash HASH_ELEMENT_PHONG__TRANSPARENT = 241987796; extern const char* NAME_ELEMENT_PHONG__TRANSPARENT; const StringHash HASH_ELEMENT_PHONG__TRANSPARENCY = 113708105; extern const char* NAME_ELEMENT_PHONG__TRANSPARENCY; const StringHash HASH_ELEMENT_PHONG__INDEX_OF_REFRACTION = 215105534; extern const char* NAME_ELEMENT_PHONG__INDEX_OF_REFRACTION; const StringHash HASH_ELEMENT_BLINN = 202379278; extern const char* NAME_ELEMENT_BLINN; const StringHash HASH_ELEMENT_TECHNIQUE__BLINN = 202379278; extern const char* NAME_ELEMENT_TECHNIQUE__BLINN; const StringHash HASH_ELEMENT_BLINN__EMISSION = 73311438; extern const char* NAME_ELEMENT_BLINN__EMISSION; const StringHash HASH_ELEMENT_BLINN__AMBIENT = 87931284; extern const char* NAME_ELEMENT_BLINN__AMBIENT; const StringHash HASH_ELEMENT_BLINN__DIFFUSE = 167354197; extern const char* NAME_ELEMENT_BLINN__DIFFUSE; const StringHash HASH_ELEMENT_BLINN__SPECULAR = 116301074; extern const char* NAME_ELEMENT_BLINN__SPECULAR; const StringHash HASH_ELEMENT_BLINN__SHININESS = 185448003; extern const char* NAME_ELEMENT_BLINN__SHININESS; const StringHash HASH_ELEMENT_BLINN__REFLECTIVE = 109390693; extern const char* NAME_ELEMENT_BLINN__REFLECTIVE; const StringHash HASH_ELEMENT_BLINN__REFLECTIVITY = 86734393; extern const char* NAME_ELEMENT_BLINN__REFLECTIVITY; const StringHash HASH_ELEMENT_BLINN__TRANSPARENT = 160434500; extern const char* NAME_ELEMENT_BLINN__TRANSPARENT; const StringHash HASH_ELEMENT_BLINN__TRANSPARENCY = 151033145; extern const char* NAME_ELEMENT_BLINN__TRANSPARENCY; const StringHash HASH_ELEMENT_BLINN__INDEX_OF_REFRACTION = 24357934; extern const char* NAME_ELEMENT_BLINN__INDEX_OF_REFRACTION; const StringHash HASH_ELEMENT_PROFILE_COMMON__EXTRA = 145663265; extern const char* NAME_ELEMENT_PROFILE_COMMON__EXTRA; } #endif
[ [ [ 1, 6383 ] ] ]
5962a09164e4c07fde636d299d29a1c36c2af9b3
c95a83e1a741b8c0eb810dd018d91060e5872dd8
/Game/ObjectDLL/ObjectShared/AIPath.h
3cccb490df332979c011d92d6b421680a6f5db85
[]
no_license
rickyharis39/nolf2
ba0b56e2abb076e60d97fc7a2a8ee7be4394266c
0da0603dc961e73ac734ff365bfbfb8abb9b9b04
refs/heads/master
2021-01-01T17:21:00.678517
2011-07-23T12:11:19
2011-07-23T12:11:19
38,495,312
1
0
null
null
null
null
UTF-8
C++
false
false
5,503
h
// (c) 1997-2000 Monolith Productions, Inc. All Rights Reserved #ifndef __AI_PATH_H__ #define __AI_PATH_H__ #include "AIVolume.h" #include "AINode.h" #include "AIVolumeNeighbor.h" #include "AIClassFactory.h" // Vectors. typedef std::vector<LTVector> POINT_LIST; // Classes. class CAI; class CAIPathWaypoint : public CAIClassAbstract, public ILTObjRefReceiver { public : enum Instruction { eInstructionInvalid, eInstructionLockedMoveTo, eInstructionMoveTo, eInstructionCrawlTo, eInstructionClimbUpTo, eInstructionClimbDownTo, eInstructionFaceLadder, eInstructionGetOnLadder, eInstructionGetOffLadder, eInstructionJumpUpTo, eInstructionJumpDownTo, eInstructionJumpOver, eInstructionFaceJumpLand, eInstructionWaitForLift, eInstructionEnterLift, eInstructionRideLift, eInstructionExitLift, eInstructionOpenDoors, eInstructionWaitForDoors, eInstructionFaceDoor, eInstructionReleaseGate, eInstructionMoveToTeleport, eInstructionMoveFromTeleport, }; public : DECLARE_AI_FACTORY_CLASS(CAIPathWaypoint); CAIPathWaypoint( ); ~CAIPathWaypoint( ); // Ctors/Dtors/etc void Load(ILTMessage_Read *pMsg); void Save(ILTMessage_Write *pMsg); // Methods void ReleaseGate(); // Simple accessors Instruction GetInstruction() const { return m_eInstruction; } const LTVector& GetArgumentVector1() const { return m_vVector1; } ILTBaseClass* GetArgumentObject1() const { return m_pObject1; } ILTBaseClass* GetArgumentObject2() const { return m_pObject2; } HOBJECT GetArgumentHObject1() const { return m_hObject1; } HOBJECT GetArgumentHObject2() const { return m_hObject2; } VolumeGate GetArgumentVolumeGate() const { return m_eVolumeGate; } uint32 GetWaypointID() const { return m_nWaypointID; } uint32 GetControlPointIndex() const { return m_iControlPoint; } LTBOOL GetCalculateCurve() const { return m_bCalculateCurve; } EnumAnimProp GetAnimProp() { return m_eProp; } protected : friend class CAIPath; friend class CAIPathMgr; // Setup void SetAI(CAI* pAI) { m_pAI = pAI; } void SetInstruction(Instruction eInstruction) { m_eInstruction = eInstruction; } void SetArgumentVector1(const LTVector& vVector1) { m_vVector1 = vVector1; } void SetArgumentObject1(ILTBaseClass* pObject1); void SetArgumentObject2(ILTBaseClass* pObject2); void SetArgumentVolumeGate(VolumeGate eVolumeGate) { m_eVolumeGate = eVolumeGate; } void SetWaypointID(uint32 id) { m_nWaypointID = id; } void SetControlPointIndex(uint32 i) { m_iControlPoint = i; } void SetCalculateCurve(LTBOOL b) { m_bCalculateCurve = b; } void SetAnimProp(EnumAnimProp eProp) { m_eProp = eProp; } void SetWaypoint(CAI* pAI, Instruction eInstruction, const LTVector& vVector1); void SetControlPoint(CAI* pAI, Instruction eInstruction, const LTVector& vVector1, uint32 iControlPoint); void SetReleaseGatePoint(CAI* pAI, VolumeGate eVolumeGate, ILTBaseClass* pObject1, ILTBaseClass* pObject2); private : // ILTObjRefReceiver implementation for clearing object pointers if doors get destroyed virtual void OnLinkBroken(LTObjRefNotifier* pRef, HOBJECT hObj); protected : CAI* m_pAI; Instruction m_eInstruction; LTVector m_vVector1; LTObjRefNotifier m_hObject1; ILTBaseClass* m_pObject1; LTObjRefNotifier m_hObject2; ILTBaseClass* m_pObject2; VolumeGate m_eVolumeGate; uint32 m_nWaypointID; uint32 m_iControlPoint; LTBOOL m_bCalculateCurve; EnumAnimProp m_eProp; }; typedef std::vector<CAIPathWaypoint*> AI_WAYPOINT_LIST; class CAIPath : public CAIClassAbstract { public : DECLARE_AI_FACTORY_CLASS(CAIPath); CAIPath( ); ~CAIPath( ); // Ctors/Dtors/etc void Load(ILTMessage_Read *pMsg); void Save(ILTMessage_Write *pMsg); void Init(CAI* pAI); // Waypoint methods CAIPathWaypoint* GetWaypoint(int iWaypoint) { return ( iWaypoint < (int)m_lstWaypoints.size() ? m_lstWaypoints[iWaypoint] : LTNULL ); } CAIPathWaypoint* GetCurrentWaypoint() { return GetWaypoint( m_iWaypoint ); } CAIPathWaypoint* GetNextWaypoint() { return ( HasRemainingWaypoints() ? GetWaypoint( m_iWaypoint + 1 ) : LTNULL ); } LTBOOL HasRemainingWaypoints() const { return ( m_iWaypoint < (int)m_lstWaypoints.size() ); } int GetCurrentWaypointIndex() const { return m_iWaypoint; } int GetNumWaypoints() const { return (int)m_lstWaypoints.size(); } AI_WAYPOINT_LIST::iterator Begin() { return m_lstWaypoints.begin(); } AI_WAYPOINT_LIST::iterator End() { return m_lstWaypoints.end(); } void IncrementWaypointIndex() { m_iWaypoint++; } // Path Access void GetInitialDir(LTVector* pvDir); void GetFinalDir(LTVector* pvDir); AIVolume* GetNextVolume(AIVolume* pVolume, AIVolume::EnumVolumeType eVolumeType); AIVolume* GetLastVolume(uint32 nOffsetFromLast); void Print(); protected : friend class CAIPathMgr; LTBOOL HasAI() { return !!m_pAI; } // Setup methods void AddWaypoint(CAIPathWaypoint* pWaypt); AI_WAYPOINT_LIST::iterator RemoveWaypoint(AI_WAYPOINT_LIST::iterator it); AI_WAYPOINT_LIST::iterator InsertWaypoint(AI_WAYPOINT_LIST::iterator it, CAIPathWaypoint* pWaypt); void ClearWaypoints(); protected : CAI* m_pAI; AI_WAYPOINT_LIST m_lstWaypoints; int m_iWaypoint; }; #endif
[ [ [ 1, 184 ] ] ]
fe4c05a453fe3c0bd2b9fa5a502bbe4c7f33a347
fb99c5ca73adb5857a462a98329d5c8753a9cb13
/open/music/Metronome.h
00cc9d52855ab8293f082f250d80a53537ae0af5
[]
no_license
luqui/soylent
f82ff00cdf76b426c2c3580e9c432bcb48715358
94bbe25a1b93a30e94e2ab072f792bb273da3b06
refs/heads/master
2021-01-22T03:44:15.546888
2009-06-24T20:08:55
2009-06-24T20:08:55
113,045
2
3
null
null
null
null
UTF-8
C++
false
false
903
h
#ifndef __METRONOME_H__ #define __METRONOME_H__ #include <iostream> #include "physics.h" template <class T> bool update_q(T& ptr, T newval) { bool ret = false; if (newval != ptr) ret = true; ptr = newval; return ret; } struct Beat { Beat(double len, double offs = 0) : len(len), offs(offs) { } double len, offs; }; double floatmod(double arg, double mod) { if (arg < 0) { arg += (int(-arg/mod) + 1) * mod; } return fmod(arg, mod); } class Metronome { public: Metronome(double tempo) : stepsize_(DT * tempo / 60 / 4), measures_(0) { } ~Metronome() {} void step() { measures_ += stepsize_; } bool quantum(const Beat& beat) const { return floatmod(measures_ - beat.offs, beat.len) + stepsize_ >= beat.len; } double measures() const { return measures_; } private: double stepsize_; double measures_; }; #endif
[ "luqui@94b1653a-ed48-0410-b77d-b6a479af8a11" ]
[ [ [ 1, 54 ] ] ]
9381d402325dca996124c20404e1390057a0fdbf
e54be2f2f96979e8147c56f5f02895e120bb7f62
/Scarabaeus/ui_mainwindow.h
fbe072b9309e776c0e06b29e71aeba66d75f0fd6
[]
no_license
wtrsltnk/kenai-uu3dmod3
824ce2e00ec8560bfa9b350eff5452930fdd6ec6
1fc98a03a42e22bd3c240c945946eaa3213ffd16
refs/heads/master
2021-05-03T16:13:17.769985
2010-03-09T18:30:59
2010-03-09T18:30:59
70,003,384
0
0
null
null
null
null
UTF-8
C++
false
false
9,640
h
/******************************************************************************** ** Form generated from reading UI file 'mainwindow.ui' ** ** Created: Tue 9. Mar 15:54:10 2010 ** by: Qt User Interface Compiler version 4.6.2 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef UI_MAINWINDOW_H #define UI_MAINWINDOW_H #include <QtCore/QVariant> #include <QtGui/QAction> #include <QtGui/QApplication> #include <QtGui/QButtonGroup> #include <QtGui/QDoubleSpinBox> #include <QtGui/QGraphicsView> #include <QtGui/QGridLayout> #include <QtGui/QHeaderView> #include <QtGui/QLabel> #include <QtGui/QMainWindow> #include <QtGui/QMenuBar> #include <QtGui/QSpacerItem> #include <QtGui/QStatusBar> #include <QtGui/QTabWidget> #include <QtGui/QToolBar> #include <QtGui/QWidget> QT_BEGIN_NAMESPACE class Ui_MainWindow { public: QWidget *centralWidget; QGridLayout *gridLayout; QTabWidget *tabWidget; QWidget *tab; QGridLayout *gridLayout_2; QGraphicsView *gvScarabaeus_1; QSpacerItem *horizontalSpacer; QLabel *lblA_1; QDoubleSpinBox *dsbA_1; QWidget *tab_3; QGridLayout *gridLayout_3; QGraphicsView *gvCardinal_2; QSpacerItem *horizontalSpacer_2; QLabel *lblTension_2; QDoubleSpinBox *dsbTension_2; QWidget *tab_2; QGridLayout *gridLayout_4; QGraphicsView *gvCombi_3; QSpacerItem *horizontalSpacer_3; QLabel *lblSampleDensity_3; QDoubleSpinBox *dsbSampleDensity_3; QSpacerItem *horizontalSpacer_4; QLabel *lblA_3; QDoubleSpinBox *dsbA_3; QSpacerItem *horizontalSpacer_5; QLabel *lblTension_3; QDoubleSpinBox *dsbTension_3; QMenuBar *menuBar; QToolBar *mainToolBar; QStatusBar *statusBar; void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) MainWindow->setObjectName(QString::fromUtf8("MainWindow")); MainWindow->resize(650, 555); centralWidget = new QWidget(MainWindow); centralWidget->setObjectName(QString::fromUtf8("centralWidget")); gridLayout = new QGridLayout(centralWidget); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); tabWidget = new QTabWidget(centralWidget); tabWidget->setObjectName(QString::fromUtf8("tabWidget")); tab = new QWidget(); tab->setObjectName(QString::fromUtf8("tab")); gridLayout_2 = new QGridLayout(tab); gridLayout_2->setSpacing(6); gridLayout_2->setContentsMargins(11, 11, 11, 11); gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); gvScarabaeus_1 = new QGraphicsView(tab); gvScarabaeus_1->setObjectName(QString::fromUtf8("gvScarabaeus_1")); gridLayout_2->addWidget(gvScarabaeus_1, 0, 0, 1, 3); horizontalSpacer = new QSpacerItem(401, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout_2->addItem(horizontalSpacer, 1, 0, 1, 1); lblA_1 = new QLabel(tab); lblA_1->setObjectName(QString::fromUtf8("lblA_1")); gridLayout_2->addWidget(lblA_1, 1, 1, 1, 1); dsbA_1 = new QDoubleSpinBox(tab); dsbA_1->setObjectName(QString::fromUtf8("dsbA_1")); dsbA_1->setMinimum(-10); dsbA_1->setMaximum(10); dsbA_1->setSingleStep(0.25); dsbA_1->setValue(1); gridLayout_2->addWidget(dsbA_1, 1, 2, 1, 1); tabWidget->addTab(tab, QString()); tab_3 = new QWidget(); tab_3->setObjectName(QString::fromUtf8("tab_3")); gridLayout_3 = new QGridLayout(tab_3); gridLayout_3->setSpacing(6); gridLayout_3->setContentsMargins(11, 11, 11, 11); gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); gvCardinal_2 = new QGraphicsView(tab_3); gvCardinal_2->setObjectName(QString::fromUtf8("gvCardinal_2")); gridLayout_3->addWidget(gvCardinal_2, 0, 0, 1, 3); horizontalSpacer_2 = new QSpacerItem(432, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout_3->addItem(horizontalSpacer_2, 1, 0, 1, 1); lblTension_2 = new QLabel(tab_3); lblTension_2->setObjectName(QString::fromUtf8("lblTension_2")); gridLayout_3->addWidget(lblTension_2, 1, 1, 1, 1); dsbTension_2 = new QDoubleSpinBox(tab_3); dsbTension_2->setObjectName(QString::fromUtf8("dsbTension_2")); dsbTension_2->setMinimum(-99.99); dsbTension_2->setSingleStep(0.1); gridLayout_3->addWidget(dsbTension_2, 1, 2, 1, 1); tabWidget->addTab(tab_3, QString()); tab_2 = new QWidget(); tab_2->setObjectName(QString::fromUtf8("tab_2")); gridLayout_4 = new QGridLayout(tab_2); gridLayout_4->setSpacing(6); gridLayout_4->setContentsMargins(11, 11, 11, 11); gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); gvCombi_3 = new QGraphicsView(tab_2); gvCombi_3->setObjectName(QString::fromUtf8("gvCombi_3")); gridLayout_4->addWidget(gvCombi_3, 0, 0, 1, 3); horizontalSpacer_3 = new QSpacerItem(378, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout_4->addItem(horizontalSpacer_3, 1, 0, 1, 1); lblSampleDensity_3 = new QLabel(tab_2); lblSampleDensity_3->setObjectName(QString::fromUtf8("lblSampleDensity_3")); gridLayout_4->addWidget(lblSampleDensity_3, 1, 1, 1, 1); dsbSampleDensity_3 = new QDoubleSpinBox(tab_2); dsbSampleDensity_3->setObjectName(QString::fromUtf8("dsbSampleDensity_3")); dsbSampleDensity_3->setDecimals(3); dsbSampleDensity_3->setMinimum(0.04); dsbSampleDensity_3->setMaximum(5); dsbSampleDensity_3->setSingleStep(0.01); dsbSampleDensity_3->setValue(0.4); gridLayout_4->addWidget(dsbSampleDensity_3, 1, 2, 1, 1); horizontalSpacer_4 = new QSpacerItem(378, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout_4->addItem(horizontalSpacer_4, 2, 0, 1, 1); lblA_3 = new QLabel(tab_2); lblA_3->setObjectName(QString::fromUtf8("lblA_3")); gridLayout_4->addWidget(lblA_3, 2, 1, 1, 1); dsbA_3 = new QDoubleSpinBox(tab_2); dsbA_3->setObjectName(QString::fromUtf8("dsbA_3")); dsbA_3->setMinimum(-10); dsbA_3->setMaximum(10); dsbA_3->setSingleStep(0.25); dsbA_3->setValue(1); gridLayout_4->addWidget(dsbA_3, 2, 2, 1, 1); horizontalSpacer_5 = new QSpacerItem(378, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout_4->addItem(horizontalSpacer_5, 3, 0, 1, 1); lblTension_3 = new QLabel(tab_2); lblTension_3->setObjectName(QString::fromUtf8("lblTension_3")); gridLayout_4->addWidget(lblTension_3, 3, 1, 1, 1); dsbTension_3 = new QDoubleSpinBox(tab_2); dsbTension_3->setObjectName(QString::fromUtf8("dsbTension_3")); dsbTension_3->setMinimum(-99.99); dsbTension_3->setSingleStep(0.1); gridLayout_4->addWidget(dsbTension_3, 3, 2, 1, 1); tabWidget->addTab(tab_2, QString()); gridLayout->addWidget(tabWidget, 0, 0, 1, 1); MainWindow->setCentralWidget(centralWidget); menuBar = new QMenuBar(MainWindow); menuBar->setObjectName(QString::fromUtf8("menuBar")); menuBar->setGeometry(QRect(0, 0, 650, 25)); MainWindow->setMenuBar(menuBar); mainToolBar = new QToolBar(MainWindow); mainToolBar->setObjectName(QString::fromUtf8("mainToolBar")); MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar); statusBar = new QStatusBar(MainWindow); statusBar->setObjectName(QString::fromUtf8("statusBar")); MainWindow->setStatusBar(statusBar); retranslateUi(MainWindow); tabWidget->setCurrentIndex(0); QMetaObject::connectSlotsByName(MainWindow); } // setupUi void retranslateUi(QMainWindow *MainWindow) { MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Scarabaeus", 0, QApplication::UnicodeUTF8)); lblA_1->setText(QApplication::translate("MainWindow", "Parameter A", 0, QApplication::UnicodeUTF8)); tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "Assignment 1", 0, QApplication::UnicodeUTF8)); lblTension_2->setText(QApplication::translate("MainWindow", "Tension", 0, QApplication::UnicodeUTF8)); tabWidget->setTabText(tabWidget->indexOf(tab_3), QApplication::translate("MainWindow", "Assignment 2", 0, QApplication::UnicodeUTF8)); lblSampleDensity_3->setText(QApplication::translate("MainWindow", "Sample Density", 0, QApplication::UnicodeUTF8)); lblA_3->setText(QApplication::translate("MainWindow", "Parameter A", 0, QApplication::UnicodeUTF8)); lblTension_3->setText(QApplication::translate("MainWindow", "Tension", 0, QApplication::UnicodeUTF8)); tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Assignment 3", 0, QApplication::UnicodeUTF8)); } // retranslateUi }; namespace Ui { class MainWindow: public Ui_MainWindow {}; } // namespace Ui QT_END_NAMESPACE #endif // UI_MAINWINDOW_H
[ "wtr@bb6c2877-1723-60e2-c9b9-db87233550d1" ]
[ [ [ 1, 246 ] ] ]
d1d2c9cb4198d30c641ef1d56b91cee20c476ec3
25f79693b806edb9041e3786fa3cf331d6fd4b97
/tests/unit/core/DeviceManagerTests.cpp
9484234c054a23505bd2e44622964efe63d97075
[]
no_license
ouj/amd-spl
ff3c9faf89d20b5d6267b7f862c277d16aae9eee
54b38e80088855f5e118f0992558ab88a7dea5b9
refs/heads/master
2016-09-06T03:13:23.993426
2009-08-29T08:55:02
2009-08-29T08:55:02
32,124,284
0
0
null
null
null
null
UTF-8
C++
false
false
2,496
cpp
#include "CommonTestDefs.h" using namespace amdspl; using namespace amdspl::core::cal; TEST(DeviceManagerTests, RuntimeSysDeviceNumTest) { DeviceManager* _deviceMgr = Runtime::getInstance()->getDeviceManager(); ASSERT_TRUE(_deviceMgr != 0); CALuint deviceNum; calDeviceGetCount(&deviceNum); ASSERT_EQ(deviceNum, _deviceMgr->getSysDeviceNum()); printf("System Device Number: %d\n", _deviceMgr->getSysDeviceNum()); Runtime::destroy(); } TEST(DeviceManagerTests, RuntimeAddDevice1Test) { DeviceManager* _deviceMgr = Runtime::getInstance()->getDeviceManager(); ASSERT_TRUE(_deviceMgr != 0); for (int i = 0; i < _deviceMgr->getSysDeviceNum(); i++) { ASSERT_TRUE(_deviceMgr->assignDevice(i, 0)); } Runtime::destroy(); } TEST(DeviceManagerTests, RuntimeAddDevice2Test) { calInit(); CALdevice deviceHandle; ASSERT_EQ(CAL_RESULT_OK, calDeviceOpen(&deviceHandle, 0)); DeviceManager* _deviceMgr = Runtime::getInstance()->getDeviceManager(); ASSERT_TRUE(_deviceMgr != 0); ASSERT_TRUE(_deviceMgr->assignDevice(0, deviceHandle)); Runtime::destroy(); ASSERT_EQ(CAL_RESULT_OK, calDeviceClose(deviceHandle)); calShutdown(); } TEST(DeviceManagerTests, GetDeviceNumTest) { DeviceManager* _deviceMgr = Runtime::getInstance()->getDeviceManager(); ASSERT_TRUE(_deviceMgr != 0); ASSERT_TRUE(_deviceMgr->assignDevice(0, 0)); ASSERT_EQ(1, _deviceMgr->getDeviceNum()); Runtime::destroy(); } TEST(DeviceManagerTests, GetDeviceByIDTest) { DeviceManager* _deviceMgr = Runtime::getInstance()->getDeviceManager(); ASSERT_TRUE(_deviceMgr != 0); for (int i = 0; i < _deviceMgr->getSysDeviceNum(); i++) { ASSERT_TRUE(_deviceMgr->assignDevice(i, 0)); } Device *pDevice = _deviceMgr->getDeviceByID(0); ASSERT_TRUE(pDevice != 0); ASSERT_EQ(0, pDevice->getId()); Runtime::destroy(); } TEST(DeviceManagerTests, SetGetDefualtDeviceTest) { DeviceManager* _deviceMgr = Runtime::getInstance()->getDeviceManager(); ASSERT_TRUE(_deviceMgr != 0); for (int i = 0; i < _deviceMgr->getSysDeviceNum(); i++) { ASSERT_TRUE(_deviceMgr->assignDevice(i, 0)); } ASSERT_TRUE(_deviceMgr->setDefaultDevice(0)); Device *pDevice = _deviceMgr->getDefaultDevice(); ASSERT_TRUE(pDevice != 0); ASSERT_EQ(0, pDevice->getId()); Runtime::destroy(); }
[ "jiawei.ou@1960d7c4-c739-11dd-8829-37334faa441c" ]
[ [ [ 1, 88 ] ] ]
0fc17c61d3dfb65f514efc0736ab13a1b87d6194
1eeae6bd5907f2c17c4fce4aecb2d2aaf72db015
/Arduino/libraries/MechShield/MechShield.cpp
9494465e81dcf9f8acb079dd4d90572732a381a9
[]
no_license
miktallerra/destroyallhumans
4d65796cbfc69adba867562e6beb9f9f6571bd81
ea403c5c45dac219a967c6863ef2cebfb465a186
refs/heads/master
2021-01-10T06:42:51.646933
2011-04-06T03:40:11
2011-04-06T03:40:11
50,189,345
0
0
null
null
null
null
UTF-8
C++
false
false
4,094
cpp
/* MechShield.cpp - Driver for I2C MechShield for Arduino Copyright (c) 2010-2011 Eric Hokanson This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <WProgram.h> #include <Wire.h> #include "MechShield.h" static const uint8_t PORT_MAP[] = { 0x06, 0x0A, 0x0E, 0x12, 0x16, 0x1A, 0x1E, 0x22, 0x26, 0x2A, 0x2E, 0x32, 0x36, 0x3A, 0x3E, 0x42 }; static TwoWire i2c; void Mech::begin() { i2c.begin(); // Set PRE_SCALE to 244Hz i2c.beginTransmission(SHIELD_I2C_ADDRESS); i2c.send(0xFE); i2c.send(0x18); i2c.endTransmission(); // Set mode 1 to enable AI and clock i2c.beginTransmission(SHIELD_I2C_ADDRESS); i2c.send(0x00); i2c.send(0x20); i2c.endTransmission(); // Set all pins to default for (int i = 1; i <= MAX_SERVOS; i++) { _servos[i - 1].min = MIN_PULSE_WIDTH; _servos[i - 1].max = MAX_PULSE_WIDTH; this->setPosition(i, DEFAULT_PULSE_WIDTH); } } uint8_t Mech::setPosition(int pin, int position) { unsigned int off; if (pin > 16) return INVALID_SERVO; --pin; if (position < 200) { // map values < 200 as angle in degrees position = constrain(position, 0, 180); position = map(position, 0, 180, _servos[pin].min, _servos[pin].max); } position = constrain(position, _servos[pin].min, _servos[pin].max); // ensure pulse width is valid _servos[pin].ticks = position; off = position + (pin * OFFSET_MULTIPLIER); // length in us + offset // Set LED control register i2c.beginTransmission(SHIELD_I2C_ADDRESS); i2c.send(PORT_MAP[pin]); i2c.send((byte)(pin * OFFSET_MULTIPLIER)); // Set on register low i2c.send(0x00); // on register high i2c.send((byte) off); // off register low i2c.send((byte)(off >> 8)); // off register high return i2c.endTransmission(); } void Mech::setBounds(int pin, int min, int max) { --pin; if (pin < MAX_SERVOS) { _servos[pin].min = abs(min); _servos[pin].max = abs(max); } } void Mech::sleep() { // Set the sleep bit i2c.beginTransmission(SHIELD_I2C_ADDRESS); i2c.send(0x00); i2c.send(0x30); i2c.endTransmission(); } int Mech::getPosition(int pin) { return map(this->getPositionMicro(pin), _servos[pin - 1].min, _servos[pin - 1].max, 0, 180); } int Mech::getPositionMicro(int pin) { --pin; if (pin < MAX_SERVOS) return _servos[pin].ticks; else return 0; } bool Mech::isRunning(int pin) { // Check full off register i2c.beginTransmission(SHIELD_I2C_ADDRESS); i2c.send(PORT_MAP[pin - 1] + 3); i2c.endTransmission(); i2c.requestFrom(SHIELD_I2C_ADDRESS, 1); return (0x10 & i2c.receive()); } uint8_t Mech::analogWrite(int pin, int value) { if (pin > 16) return INVALID_SERVO; --pin; value = constrain(value, 0, 4095); // Set LED control register i2c.beginTransmission(SHIELD_I2C_ADDRESS); i2c.send(PORT_MAP[pin]); i2c.send(0x00); // Set on register low i2c.send(0x00); // on register high i2c.send((byte) value); // off register low i2c.send((byte)(value >> 8)); // off register high return i2c.endTransmission(); } void Mech::wake() { // Turn the clock back on i2c.beginTransmission(SHIELD_I2C_ADDRESS); i2c.send(0x00); i2c.send(0x20); i2c.endTransmission(); // Wait for clock to stabilize delayMicroseconds(500); // Enable restart i2c.beginTransmission(SHIELD_I2C_ADDRESS); i2c.send(0x00); i2c.send(0xA0); i2c.endTransmission(); }
[ [ [ 1, 144 ] ] ]
79cd566a7f86d6ce91e75e4e4a436f27d34485a3
867f5533667cce30d0743d5bea6b0c083c073386
/jingxian-downloader/wxCURL/samples/curl_app/wxGetFTPFileDialog.h
b8076898ff8720c7ee1ec8dcca9e892e28894d0c
[]
no_license
mei-rune/jingxian-project
32804e0fa82f3f9a38f79e9a99c4645b9256e889
47bc7a2cb51fa0d85279f46207f6d7bea57f9e19
refs/heads/master
2022-08-12T18:43:37.139637
2009-12-11T09:30:04
2009-12-11T09:30:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,321
h
/* * wxGetFTPFileDialog.h * wxCURL * * Created by Casey O'Donnell on Fri Jul 23 2004. * Copyright (c) 2004 Casey O'Donnell. All rights reserved. * */ // wxGetFTPFileDialog.h: interface for the wxGetFTPFileDialog class. // ////////////////////////////////////////////////////////////////////// #ifndef _WXGETFTPFILEDIALOG_H__INCLUDED_ #define _WXGETFTPFILEDIALOG_H__INCLUDED_ #include <wx/dialog.h> #include <wx/textctrl.h> #include <wx/gauge.h> #include "wxcurl/dav.h" class wxGetFTPFileDialog : public wxDialog { public: wxGetFTPFileDialog(wxWindow* pParent); virtual ~wxGetFTPFileDialog(); // Event Handlers (These Functions Should NOT be Virtual) void OnGet(wxCommandEvent& event); void OnBrowseDest(wxCommandEvent& event); void OnProgress(wxCurlProgressEvent& event); protected: wxTextCtrl* m_pDestCtrl; wxTextCtrl* m_pSrcCtrl; wxString m_szDefaultDest; wxString m_szDefaultSrc; wxTextCtrl* m_pUserCtrl; wxTextCtrl* m_pPassCtrl; wxString m_szDefaultUser; wxString m_szDefaultPass; wxTextCtrl* m_pRespCtrl; wxGauge* m_pDlGauge; private: DECLARE_CLASS(wxGetFTPFileDialog) // any class wishing to process wxWindows events must use this macro DECLARE_EVENT_TABLE() }; #endif // _WXGETFTPFILEDIALOG_H__INCLUDED_
[ "runner.mei@0dd8077a-353d-11de-b438-597f59cd7555" ]
[ [ [ 1, 57 ] ] ]
688b0fbfc3422ae19131ec53a1d291ae20f38e43
b9c9a4c5e7952e080a53c81a0781180a9bf80257
/src/net/HostID.cpp
2a06f6a9b92f655387333e8722f92b7fd97f9975
[]
no_license
kaelspencer/confero
296aa9cd87c0254a662be136a571ffb9675d9fe9
a41c71fe082017c316bc2f79e00c2b9e3a8ef7eb
refs/heads/master
2021-01-19T17:47:44.444616
2011-06-12T00:25:25
2011-06-12T00:25:25
1,777,702
0
1
null
null
null
null
UTF-8
C++
false
false
495
cpp
#include "HostID.h" HostID::HostID(const ID_TYPE & id) : m_id(id), m_ipAddr(id.toIPv4Address()) { } HostID::HostID(const HostID & rhs) : m_id(rhs.m_id), m_ipAddr(rhs.m_id.toIPv4Address()) { } HostID::~HostID() { } HostID & HostID::operator =(const HostID & rhs) { if(this != &rhs) { m_id = rhs.m_id; m_ipAddr = rhs.m_ipAddr; } return *this; } uint qHash(const HostID & key) { return qHash(key.m_id.toIPv4Address()); }
[ "kael@euler" ]
[ [ [ 1, 33 ] ] ]
fdf0ce51ea9fb22b7487a769978d811fa63700b7
0c738885f2dadce227f95c4d02ff9bb3a7ac77ed
/libsofadb/rapidjson/rapidjson.h
19997e77281ba8f3041c795f0d16e2e7a72feaff
[]
no_license
Cyberax/SofaDb
dc8283e7ecd7e0a8f2220deb763ca441184daaa6
c0b16333d7715ea2f3e04ab85cb2838256c5d722
refs/heads/master
2021-01-13T01:37:23.069348
2011-12-22T03:22:56
2011-12-22T03:22:56
2,700,170
7
0
null
null
null
null
UTF-8
C++
false
false
19,496
h
#ifndef RAPIDJSON_RAPIDJSON_H_ #define RAPIDJSON_RAPIDJSON_H_ // Copyright (c) 2011 Milo Yip ([email protected]) // Version 0.1 #include <cstdlib> // malloc(), realloc(), free() #include <cstring> // memcpy() /////////////////////////////////////////////////////////////////////////////// // RAPIDJSON_NO_INT64DEFINE // Here defines int64_t and uint64_t types in global namespace. // If user have their own definition, can define RAPIDJSON_NO_INT64DEFINE to disable this. #ifndef RAPIDJSON_NO_INT64DEFINE #ifdef _MSC_VER typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #define RAPIDJSON_FORCEINLINE __forceinline #else #include <inttypes.h> #define RAPIDJSON_FORCEINLINE #endif #endif // RAPIDJSON_NO_INT64TYPEDEF /////////////////////////////////////////////////////////////////////////////// // RAPIDJSON_ENDIAN #define RAPIDJSON_LITTLEENDIAN 0 //!< Little endian machine #define RAPIDJSON_BIGENDIAN 1 //!< Big endian machine //! Endianness of the machine. /*! GCC provided macro for detecting endianness of the target machine. But other compilers may not have this. User can define RAPIDJSON_ENDIAN to either RAPIDJSON_LITTLEENDIAN or RAPIDJSON_BIGENDIAN. */ #ifndef RAPIDJSON_ENDIAN #ifdef __BYTE_ORDER__ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN #else #define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN #endif // __BYTE_ORDER__ #else #define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN // Assumes little endian otherwise. #endif #endif // RAPIDJSON_ENDIAN /////////////////////////////////////////////////////////////////////////////// // RAPIDJSON_SSE2/RAPIDJSON_SSE42/RAPIDJSON_SIMD // Enable SSE2 optimization. //#define RAPIDJSON_SSE2 // Enable SSE4.2 optimization. //#define RAPIDJSON_SSE42 #if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42) #define RAPIDJSON_SIMD #endif /////////////////////////////////////////////////////////////////////////////// // RAPIDJSON_NO_SIZETYPEDEFINE #ifndef RAPIDJSON_NO_SIZETYPEDEFINE namespace rapidjson { //! Use 32-bit array/string indices even for 64-bit platform, instead of using size_t. /*! User may override the SizeType by defining RAPIDJSON_NO_SIZETYPEDEFINE. */ typedef unsigned SizeType; } // namespace rapidjson #endif /////////////////////////////////////////////////////////////////////////////// // RAPIDJSON_ASSERT //! Assertion. /*! By default, rapidjson uses C assert() for assertion. User can override it by defining RAPIDJSON_ASSERT(x) macro. */ #ifndef RAPIDJSON_ASSERT #include <cassert> #define RAPIDJSON_ASSERT(x) assert(x) #endif // RAPIDJSON_ASSERT namespace rapidjson { /////////////////////////////////////////////////////////////////////////////// // Allocator /*! \class rapidjson::Allocator \brief Concept for allocating, resizing and freeing memory block. Note that Malloc() and Realloc() are non-static but Free() is static. So if an allocator need to support Free(), it needs to put its pointer in the header of memory block. \code concept Allocator { static const bool kNeedFree; //!< Whether this allocator needs to call Free(). // Allocate a memory block. // \param size of the memory block in bytes. // \returns pointer to the memory block. void* Malloc(size_t size); // Resize a memory block. // \param originalPtr The pointer to current memory block. Null pointer is permitted. // \param originalSize The current size in bytes. (Design issue: since some allocator may not book-keep this, explicitly pass to it can save memory.) // \param newSize the new size in bytes. void* Realloc(void* originalPtr, size_t originalSize, size_t newSize); // Free a memory block. // \param pointer to the memory block. Null pointer is permitted. static void Free(void *ptr); }; \endcode */ /////////////////////////////////////////////////////////////////////////////// // CrtAllocator //! C-runtime library allocator. /*! This class is just wrapper for standard C library memory routines. \implements Allocator */ class CrtAllocator { public: static const bool kNeedFree = true; void* Malloc(size_t size) { return malloc(size); } void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) { return realloc(originalPtr, newSize); } static void Free(void *ptr) { free(ptr); } }; /////////////////////////////////////////////////////////////////////////////// // MemoryPoolAllocator //! Default memory allocator used by the parser and DOM. /*! This allocator allocate memory blocks from pre-allocated memory chunks. It does not free memory blocks. And Realloc() only allocate new memory. The memory chunks are allocated by BaseAllocator, which is CrtAllocator by default. User may also supply a buffer as the first chunk. If the user-buffer is full then additional chunks are allocated by BaseAllocator. The user-buffer is not deallocated by this allocator. \tparam BaseAllocator the allocator type for allocating memory chunks. Default is CrtAllocator. \implements Allocator */ template <typename BaseAllocator = CrtAllocator> class MemoryPoolAllocator { public: static const bool kNeedFree = false; //!< Tell users that no need to call Free() with this allocator. (concept Allocator) //! Constructor with chunkSize. /*! \param chunkSize The size of memory chunk. The default is kDefaultChunkSize. \param baseAllocator The allocator for allocating memory chunks. */ MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) : chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(0), baseAllocator_(baseAllocator), ownBaseAllocator_(0) { if (!baseAllocator_) ownBaseAllocator_ = baseAllocator_ = new BaseAllocator(); AddChunk(chunk_capacity_); } //! Constructor with user-supplied buffer. /*! The user buffer will be used firstly. When it is full, memory pool allocates new chunk with chunk size. The user buffer will not be deallocated when this allocator is destructed. \param buffer User supplied buffer. \param size Size of the buffer in bytes. It must at least larger than sizeof(ChunkHeader). \param chunkSize The size of memory chunk. The default is kDefaultChunkSize. \param baseAllocator The allocator for allocating memory chunks. */ MemoryPoolAllocator(char *buffer, size_t size, size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) : chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(buffer), baseAllocator_(baseAllocator), ownBaseAllocator_(0) { RAPIDJSON_ASSERT(buffer != 0); RAPIDJSON_ASSERT(size > sizeof(ChunkHeader)); chunkHead_ = (ChunkHeader*)buffer; chunkHead_->capacity = size - sizeof(ChunkHeader); chunkHead_->size = 0; chunkHead_->next = 0; } //! Destructor. /*! This deallocates all memory chunks, excluding the user-supplied buffer. */ ~MemoryPoolAllocator() { Clear(); delete ownBaseAllocator_; } //! Deallocates all memory chunks, excluding the user-supplied buffer. void Clear() { while(chunkHead_ != 0 && chunkHead_ != (ChunkHeader *)userBuffer_) { ChunkHeader* next = chunkHead_->next; baseAllocator_->Free(chunkHead_); chunkHead_ = next; } } //! Computes the total capacity of allocated memory chunks. /*! \return total capacity in bytes. */ size_t Capacity() { size_t capacity = 0; for (ChunkHeader* c = chunkHead_; c != 0; c = c->next) capacity += c->capacity; return capacity; } //! Computes the memory blocks allocated. /*! \return total used bytes. */ size_t Size() { size_t size = 0; for (ChunkHeader* c = chunkHead_; c != 0; c = c->next) size += c->size; return size; } //! Allocates a memory block. (concept Allocator) void* Malloc(size_t size) { if (chunkHead_->size + size > chunkHead_->capacity) AddChunk(chunk_capacity_ > size ? chunk_capacity_ : size); char *buffer = (char *)(chunkHead_ + 1) + chunkHead_->size; chunkHead_->size += size; return buffer; } //! Resizes a memory block (concept Allocator) void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) { if (originalPtr == 0) return Malloc(newSize); // Do not shrink if new size is smaller than original if (originalSize >= newSize) return originalPtr; // Simply expand it if it is the last allocation and there is sufficient space if (originalPtr == (char *)(chunkHead_ + 1) + chunkHead_->size - originalSize) { size_t increment = newSize - originalSize; if (chunkHead_->size + increment <= chunkHead_->capacity) { chunkHead_->size += increment; return originalPtr; } } // Realloc process: allocate and copy memory, do not free original buffer. void* newBuffer = Malloc(newSize); RAPIDJSON_ASSERT(newBuffer != 0); // Do not handle out-of-memory explicitly. return memcpy(newBuffer, originalPtr, originalSize); } //! Frees a memory block (concept Allocator) static void Free(void *ptr) {} // Do nothing private: //! Creates a new chunk. /*! \param capacity Capacity of the chunk in bytes. */ void AddChunk(size_t capacity) { ChunkHeader* chunk = (ChunkHeader*)baseAllocator_->Malloc(sizeof(ChunkHeader) + capacity); chunk->capacity = capacity; chunk->size = 0; chunk->next = chunkHead_; chunkHead_ = chunk; } static const int kDefaultChunkCapacity = 64 * 1024; //!< Default chunk capacity. //! Chunk header for perpending to each chunk. /*! Chunks are stored as a singly linked list. */ struct ChunkHeader { size_t capacity; //!< Capacity of the chunk in bytes (excluding the header itself). size_t size; //!< Current size of allocated memory in bytes. ChunkHeader *next; //!< Next chunk in the linked list. }; ChunkHeader *chunkHead_; //!< Head of the chunk linked-list. Only the head chunk serves allocation. size_t chunk_capacity_; //!< The minimum capacity of chunk when they are allocated. char *userBuffer_; //!< User supplied buffer. BaseAllocator* baseAllocator_; //!< base allocator for allocating memory chunks. BaseAllocator* ownBaseAllocator_; //!< base allocator created by this object. }; /////////////////////////////////////////////////////////////////////////////// // Encoding /*! \class rapidjson::Encoding \brief Concept for encoding of Unicode characters. \code concept Encoding { typename Ch; //! Type of character. //! \brief Encode a Unicode codepoint to a stream. //! \param os Output stream. //! \param codepoint An unicode codepoint, ranging from 0x0 to 0x10FFFF inclusively. template<typename OutputStream> static void Encode(OutputStream& os, unsigned codepoint) { //! \brief Validate one Unicode codepoint from an encoded stream. //! \param is Input stream to obtain codepoint. //! \param os Output for copying one codepoint. //! \return true if it is valid. //! \note This function just validating and copying the codepoint without actually decode it. template <typename InputStream, typename OutputStream> RAPIDJSON_FORCEINLINE static bool Validate(InputStream& is, OutputStream& os) { }; \endcode */ /////////////////////////////////////////////////////////////////////////////// // UTF8 //! UTF-8 encoding. /*! http://en.wikipedia.org/wiki/UTF-8 http://tools.ietf.org/html/rfc3629 \tparam CharType Type for storing 8-bit UTF-8 data. Default is char. \implements Encoding */ template<typename CharType = char> struct UTF8 { typedef CharType Ch; template<typename OutputStream> static void Encode(OutputStream& os, unsigned codepoint) { if (codepoint <= 0x7F) os.Put(codepoint & 0xFF); else if (codepoint <= 0x7FF) { os.Put(0xC0 | ((codepoint >> 6) & 0xFF)); os.Put(0x80 | ((codepoint & 0x3F))); } else if (codepoint <= 0xFFFF) { os.Put(0xE0 | ((codepoint >> 12) & 0xFF)); os.Put(0x80 | ((codepoint >> 6) & 0x3F)); os.Put(0x80 | (codepoint & 0x3F)); } else { RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); os.Put(0xF0 | ((codepoint >> 18) & 0xFF)); os.Put(0x80 | ((codepoint >> 12) & 0x3F)); os.Put(0x80 | ((codepoint >> 6) & 0x3F)); os.Put(0x80 | (codepoint & 0x3F)); } } template <typename InputStream, typename OutputStream> RAPIDJSON_FORCEINLINE static bool Validate(InputStream& is, OutputStream& os) { // Referring to DFA of http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ // With new mapping 1 -> 0x10, 7 -> 0x20, 9 -> 0x40, such that AND operation can test multiple types. static const unsigned char type[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, }; #define COPY() os.Put(c = is.Take()) #define TRANS(mask) result &= ((type[(unsigned char)c] & mask) != 0) #define TAIL() COPY(); TRANS(0x70) Ch c; COPY(); if (!(c & 0x80)) return true; bool result = true; switch (type[(unsigned char)c]) { case 2: TAIL(); return result; case 3: TAIL(); TAIL(); return result; case 4: COPY(); TRANS(0x50); TAIL(); return result; case 5: COPY(); TRANS(0x10); COPY(); TAIL(); return result; case 6: TAIL(); TAIL(); TAIL(); return result; case 10: COPY(); TRANS(0x20); TAIL(); return result; case 11: COPY(); TRANS(0x60); TAIL(); return result; default: return false; } #undef COPY #undef TRANS #undef TAIL } }; /////////////////////////////////////////////////////////////////////////////// // UTF16 //! UTF-16 encoding. /*! http://en.wikipedia.org/wiki/UTF-16 http://tools.ietf.org/html/rfc2781 \tparam CharType Type for storing 16-bit UTF-16 data. Default is wchar_t. C++11 may use char16_t instead. \implements Encoding */ template<typename CharType = wchar_t> struct UTF16 { typedef CharType Ch; template<typename OutputStream> static void Encode(OutputStream& os, unsigned codepoint) { if (codepoint <= 0xFFFF) { RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair os.Put(codepoint); } else { RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); unsigned v = codepoint - 0x10000; os.Put((v >> 10) + 0xD800); os.Put((v & 0x3FF) + 0xDC00); } } template <typename InputStream, typename OutputStream> RAPIDJSON_FORCEINLINE static bool Validate(InputStream& is, OutputStream& os) { Ch c; os.Put(c = is.Take()); if (c < 0xD800 || c > 0xDFFF) return true; else if (c < 0xDBFF) { os.Put(c = is.Take()); return c >= 0xDC00 && c <= 0xDFFF; } else return false; } }; /////////////////////////////////////////////////////////////////////////////// // UTF32 //! UTF-32 encoding. /*! http://en.wikipedia.org/wiki/UTF-32 \tparam Ch Type for storing 32-bit UTF-32 data. Default is unsigned. C++11 may use char32_t instead. \implements Encoding */ template<typename CharType = unsigned> struct UTF32 { typedef CharType Ch; template<typename OutputStream> static void Encode(OutputStream& os, unsigned codepoint) { RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); os.Put(codepoint); } template <typename InputStream, typename OutputStream> RAPIDJSON_FORCEINLINE static bool Validate(InputStream& is, OutputStream& os) { Ch c; os.Put(c = is.Take()); return c <= 0x10FFFF; } }; /////////////////////////////////////////////////////////////////////////////// // Stream /*! \class rapidjson::Stream \brief Concept for reading and writing characters. For read-only stream, no need to implement PutBegin(), Put(), Flush() and PutEnd(). For write-only stream, only need to implement Put() and Flush(). \code concept Stream { typename Ch; //!< Character type of the stream. //! Read the current character from stream without moving the read cursor. Ch Peek() const; //! Read the current character from stream and moving the read cursor to next character. Ch Take(); //! Get the current read cursor. //! \return Number of characters read from start. size_t Tell(); //! Begin writing operation at the current read pointer. //! \return The begin writer pointer. Ch* PutBegin(); //! Write a character. void Put(Ch c); //! Flush the buffer. void Flush(); //! End the writing operation. //! \param begin The begin write pointer returned by PutBegin(). //! \return Number of characters written. size_t PutEnd(Ch* begin); } \endcode */ //! Put N copies of a character to a stream. template<typename Stream, typename Ch> inline void PutN(Stream& stream, Ch c, size_t n) { for (size_t i = 0; i < n; i++) stream.Put(c); } /////////////////////////////////////////////////////////////////////////////// // StringStream //! Read-only string stream. /*! \implements Stream */ template <typename Encoding> struct GenericStringStream { typedef typename Encoding::Ch Ch; GenericStringStream(const Ch *src) : src_(src), head_(src) {} Ch Peek() const { return *src_; } Ch Take() { return *src_++; } size_t Tell() const { return src_ - head_; } Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } void Put(Ch c) { RAPIDJSON_ASSERT(false); } void Flush() { RAPIDJSON_ASSERT(false); } size_t PutEnd(Ch* begin) { RAPIDJSON_ASSERT(false); return 0; } const Ch* src_; //!< Current read position. const Ch* head_; //!< Original head of the string. }; typedef GenericStringStream<UTF8<> > StringStream; /////////////////////////////////////////////////////////////////////////////// // InsituStringStream //! A read-write string stream. /*! This string stream is particularly designed for in-situ parsing. \implements Stream */ template <typename Encoding> struct GenericInsituStringStream { typedef typename Encoding::Ch Ch; GenericInsituStringStream(Ch *src) : src_(src), dst_(0), head_(src) {} // Read Ch Peek() { return *src_; } Ch Take() { return *src_++; } size_t Tell() { return src_ - head_; } // Write Ch* PutBegin() { return dst_ = src_; } void Put(Ch c) { RAPIDJSON_ASSERT(dst_ != 0); *dst_++ = c; } void Flush() {} size_t PutEnd(Ch* begin) { return dst_ - begin; } Ch* src_; Ch* dst_; Ch* head_; }; typedef GenericInsituStringStream<UTF8<> > InsituStringStream; /////////////////////////////////////////////////////////////////////////////// // Type //! Type of JSON value enum Type { kNullType = 0, //!< null kFalseType = 1, //!< false kTrueType = 2, //!< true kObjectType = 3, //!< object kArrayType = 4, //!< array kStringType = 5, //!< string kNumberType = 6, //!< number }; } // namespace rapidjson #endif // RAPIDJSON_RAPIDJSON_H_
[ [ [ 1, 590 ] ] ]
e7a1bebfe8e8a747308de88da97ecab5a557a7de
d01196cdfc4451c4e1c88343bdb1eb4db9c5ac18
/source/client/hud/hud.h
7150fbfc47de3c47ae1e80a6068d61856e8b871e
[]
no_license
ferhan66h/Xash3D_ancient
7491cd4ff1c7d0b48300029db24d7e08ba96e88a
075e0a6dae12a0952065eb9b2954be4a8827c72f
refs/heads/master
2021-12-10T07:55:29.592432
2010-05-09T00:00:00
2016-07-30T17:37:36
null
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
18,804
h
//======================================================================= // Copyright XashXT Group 2008 © // hud.h - hud primary header //======================================================================= #define RGB_YELLOWISH 0x00FFA000 // 255, 160, 0 #define RGB_REDISH 0x00FF1010 // 255, 160, 0 #define RGB_GREENISH 0x0000A000 // 0, 160, 0 #include "hud_ammo.h" #define DHN_DRAWZERO 1 #define DHN_2DIGITS 2 #define DHN_3DIGITS 4 #define MIN_ALPHA 100 #define HUDELEM_ACTIVE 1 #define HUD_MAX_FADES 8 // can be blindly increased typedef struct { int x, y; } POSITION; // This structure is sent over the net to describe a screen shake event typedef struct { float time; float duration; float amplitude; float frequency; float nextShake; Vector offset; float angle; Vector appliedOffset; float appliedAngle; } CL_ScreenShake; typedef struct { float fadeSpeed; // How fast to fade (tics / second) (+ fade in, - fade out) float fadeEnd; // When the fading hits maximum float fadeReset; // When to reset to not fading (for fadeout and hold) Vector fadeColor; float fadeAlpha; int fadeFlags; // Fading flags } CL_ScreenFade; typedef struct { int dripsPerSecond; float distFromPlayer; float windX, windY; float randX, randY; int weatherMode; // 0 - snow, 1 - rain float globalHeight; } RainData; typedef struct { byte r, g, b, a; } RGBA; #define HUD_ACTIVE 1 #define HUD_INTERMISSION 2 #define MAX_SEC_AMMO_VALUES 4 #define MAX_PLAYER_NAME_LENGTH 32 #define MAX_MOTD_LENGTH 1536 #define FADE_TIME 100 #define maxHUDMessages 16 #define MAX_SPRITE_NAME_LENGTH 24 // //----------------------------------------------------- // class CHudBase { public: POSITION m_pos; int m_type; int m_iFlags; // active, moving, virtual ~CHudBase(){ } virtual int Init( void ){ return 0; } virtual int VidInit( void ){ return 0; } virtual int Draw( float flTime ){ return 0; } virtual void Think( void ){ return; } virtual void Reset( void ){ return; } virtual void InitHUDData( void ){ } // called every time a server is connected to }; struct HUDLIST { CHudBase *p; HUDLIST *pNext; }; // //----------------------------------------------------- // class CHudAmmo: public CHudBase { public: int Init( void ); int VidInit( void ); int Draw(float flTime); void Think(void); void Reset(void); int DrawWList(float flTime); int MsgFunc_CurWeapon( const char *pszName, int iSize, void *pbuf ); int MsgFunc_WeaponList( const char *pszName, int iSize, void *pbuf ); int MsgFunc_AmmoX(const char *pszName, int iSize, void *pbuf ); int MsgFunc_AmmoPickup( const char *pszName, int iSize, void *pbuf ); int MsgFunc_WeapPickup( const char *pszName, int iSize, void *pbuf ); int MsgFunc_ItemPickup( const char *pszName, int iSize, void *pbuf ); int MsgFunc_HideWeapon( const char *pszName, int iSize, void *pbuf ); void SlotInput( int iSlot ); void _cdecl UserCmd_Slot1( void ); void _cdecl UserCmd_Slot2( void ); void _cdecl UserCmd_Slot3( void ); void _cdecl UserCmd_Slot4( void ); void _cdecl UserCmd_Slot5( void ); void _cdecl UserCmd_Slot6( void ); void _cdecl UserCmd_Slot7( void ); void _cdecl UserCmd_Slot8( void ); void _cdecl UserCmd_Slot9( void ); void _cdecl UserCmd_Slot10( void ); void _cdecl UserCmd_Close( void ); void _cdecl UserCmd_NextWeapon( void ); void _cdecl UserCmd_PrevWeapon( void ); private: float m_fFade; RGBA m_rgba; WEAPON *m_pWeapon; int m_HUD_bucket0; int m_HUD_selection; }; // //----------------------------------------------------- // class CHudAmmoSecondary: public CHudBase { public: int Init( void ); int VidInit( void ); void Reset( void ); int Draw(float flTime); int MsgFunc_SecAmmoVal( const char *pszName, int iSize, void *pbuf ); int MsgFunc_SecAmmoIcon( const char *pszName, int iSize, void *pbuf ); private: int m_HUD_ammoicon; // sprite indices int m_iAmmoAmounts[MAX_SEC_AMMO_VALUES]; float m_fFade; }; #include "hud_health.h" // //----------------------------------------------------- // class CHudGeiger: public CHudBase { public: int Init( void ); int VidInit( void ); int Draw( float flTime ); int MsgFunc_Geiger( const char *pszName, int iSize, void *pbuf ); private: int m_iGeigerRange; }; // //----------------------------------------------------- // class CHudTrain: public CHudBase { public: int Init( void ); int VidInit( void ); int Draw( float flTime ); int MsgFunc_Train( const char *pszName, int iSize, void *pbuf ); private: HSPRITE m_hSprite; int m_iPos; }; class CHudMOTD : public CHudBase { public: int Init( void ); int VidInit( void ); int Draw( float flTime ); void Reset( void ); int MsgFunc_MOTD( const char *pszName, int iSize, void *pbuf ); protected: static int MOTD_DISPLAY_TIME; char m_szMOTD[MAX_MOTD_LENGTH]; float m_flActiveTill; int m_iLines; }; // //----------------------------------------------------- // class CHudSound: public CHudBase { public: int Init( void ); int VidInit( void ); int MsgFunc_Fsound( const char *pszName, int iSize, void *pbuf ); int PlayStream( const char* name ); int Draw( float flTime ); // used for get pause int Update( void ); int Close( void ); private: int m_iStatus; int m_iTime; float m_flVolume; }; // //----------------------------------------------------- // class CHudScoreboard: public CHudBase { public: int Init( void ); void InitHUDData( void ); int VidInit( void ); int Draw( float flTime ); int DrawPlayers( int xoffset, float listslot, int nameoffset = 0, char *team = NULL ); // returns the ypos where it finishes drawing void UserCmd_ShowScores( void ); void UserCmd_HideScores( void ); int MsgFunc_ScoreInfo( const char *pszName, int iSize, void *pbuf ); int MsgFunc_TeamInfo( const char *pszName, int iSize, void *pbuf ); int MsgFunc_TeamScore( const char *pszName, int iSize, void *pbuf ); void DeathMsg( int killer, int victim ); enum { MAX_PLAYERS = 64, MAX_TEAMS = 64, MAX_TEAM_NAME = 16, }; struct extra_player_info_t { short frags; short deaths; char teamname[MAX_TEAM_NAME]; }; struct team_info_t { char name[MAX_TEAM_NAME]; short frags; short deaths; short ping; short packetloss; short ownteam; short players; int already_drawn; int scores_overriden; }; hud_player_info_t m_PlayerInfoList[MAX_PLAYERS+1]; // player info from the engine extra_player_info_t m_PlayerExtraInfo[MAX_PLAYERS+1]; // additional player info sent directly to the client.dll team_info_t m_TeamInfo[MAX_TEAMS+1]; int m_iNumTeams; int m_iLastKilledBy; int m_fLastKillTime; int m_iPlayerNum; int m_iShowscoresHeld; void GetAllPlayersInfo( void ); }; // //----------------------------------------------------- // class CHudStatusBar : public CHudBase { public: int Init( void ); int VidInit( void ); int Draw( float flTime ); void Reset( void ); void ParseStatusString( int line_num ); int MsgFunc_StatusText( const char *pszName, int iSize, void *pbuf ); int MsgFunc_StatusValue( const char *pszName, int iSize, void *pbuf ); protected: enum { MAX_STATUSTEXT_LENGTH = 128, MAX_STATUSBAR_VALUES = 8, MAX_STATUSBAR_LINES = 2, }; char m_szStatusText[MAX_STATUSBAR_LINES][MAX_STATUSTEXT_LENGTH]; // a text string describing how the status bar is to be drawn char m_szStatusBar[MAX_STATUSBAR_LINES][MAX_STATUSTEXT_LENGTH]; // the constructed bar that is drawn int m_iStatusValues[MAX_STATUSBAR_VALUES]; // an array of values for use in the status bar int m_bReparseString; // set to TRUE whenever the m_szStatusBar needs to be recalculated // an array of colors...one color for each line float *m_pflNameColors[MAX_STATUSBAR_LINES]; }; // //----------------------------------------------------- // class CHudDeathNotice : public CHudBase { public: int Init( void ); void InitHUDData( void ); int VidInit( void ); int Draw( float flTime ); int MsgFunc_DeathMsg( const char *pszName, int iSize, void *pbuf ); private: int m_HUD_d_skull; // sprite index of skull icon }; // //----------------------------------------------------- // class CHudMenu : public CHudBase { public: int Init( void ); void InitHUDData( void ); int VidInit( void ); void Reset( void ); int Draw( float flTime ); int MsgFunc_ShowMenu( const char *pszName, int iSize, void *pbuf ); void SelectMenuItem( int menu_item ); int m_fMenuDisplayed; int m_bitsValidSlots; float m_flShutoffTime; int m_fWaitingForMore; }; // //----------------------------------------------------- // class CHudSayText : public CHudBase { public: int Init( void ); void InitHUDData( void ); int VidInit( void ); int Draw( float flTime ); int MsgFunc_SayText( const char *pszName, int iSize, void *pbuf ); void SayTextPrint( const char *pszBuf, int iBufSize, int clientIndex = -1 ); void EnsureTextFitsInOneLineAndWrapIfHaveTo( int line ); private: float m_HUD_saytext; float m_HUD_saytext_time; }; // //----------------------------------------------------- // class CHudBattery: public CHudBase { public: int Init( void ); int VidInit( void ); int Draw( float flTime ); int MsgFunc_Battery(const char *pszName, int iSize, void *pbuf ); private: HSPRITE m_hSprite1; HSPRITE m_hSprite2; wrect_t *m_prc1; wrect_t *m_prc2; int m_iBat; float m_fFade; int m_iHeight; // width of the battery innards }; // //----------------------------------------------------- // class CHudFlashlight: public CHudBase { public: int Init( void ); int VidInit( void ); int Draw(float flTime); void Reset( void ); int MsgFunc_Flashlight( const char *pszName, int iSize, void *pbuf ); int MsgFunc_FlashBat( const char *pszName, int iSize, void *pbuf ); private: HSPRITE m_hSprite1; HSPRITE m_hSprite2; HSPRITE m_hBeam; wrect_t *m_prc1; wrect_t *m_prc2; wrect_t *m_prcBeam; float m_flBat; int m_iBat; int m_fOn; float m_fFade; int m_iWidth; // width of the battery innards }; class CHudRedeemer: public CHudBase { public: int Init( void ); int VidInit( void ); int Draw( float flTime ); int MsgFunc_WarHUD( const char *pszName, int iSize, void *pbuf ); int m_iHudMode; int m_iOldHudMode; private: HSPRITE m_hSprite; HSPRITE m_hCrosshair; HSPRITE m_hStatic; HSPRITE m_hCamera; HSPRITE m_hCamRec; }; class CHudZoom: public CHudBase { public: int Init( void ); int VidInit( void ); int Draw( float flTime ); int MsgFunc_ZoomHUD( const char *pszName, int iSize, void *pbuf ); int m_iHudMode; private: HSPRITE m_hCrosshair; HSPRITE m_hLines; }; // //----------------------------------------------------- // struct message_parms_t { client_textmessage_t *pMessage; float time; int x, y; int totalWidth, totalHeight; int width; int lines; int lineLength; int length; int r, g, b; int text; int fadeBlend; float charTime; float fadeTime; }; // //----------------------------------------------------- // class CHudTextMessage: public CHudBase { public: int Init( void ); static char *LocaliseTextString( const char *msg, char *dst_buffer, int buffer_size ); static char *BufferedLocaliseTextString( const char *msg ); char *LookupString( const char *msg_name, int *msg_dest = NULL ); int MsgFunc_TextMsg( const char *pszName, int iSize, void *pbuf ); }; // //----------------------------------------------------- // class CHudMessage: public CHudBase { public: int Init( void ); int VidInit( void ); int Draw( float flTime ); int MsgFunc_HudText( const char *pszName, int iSize, void *pbuf ); int MsgFunc_GameTitle( const char *pszName, int iSize, void *pbuf ); float FadeBlend( float fadein, float fadeout, float hold, float localTime ); int XPosition( float x, int width, int lineWidth ); int YPosition( float y, int height ); void MessageAdd( const char *pName, float time ); void MessageAdd( client_textmessage_t * newMessage ); void MessageDrawScan( client_textmessage_t *pMessage, float time ); void MessageScanStart( void ); void MessageScanNextChar( void ); void Reset( void ); private: client_textmessage_t *m_pMessages[maxHUDMessages]; float m_startTime[maxHUDMessages]; message_parms_t m_parms; float m_gameTitleTime; client_textmessage_t *m_pGameTitle; int HUD_Logo; // display logo }; // //----------------------------------------------------- // class CHudStatusIcons: public CHudBase { public: int Init( void ); int VidInit( void ); void Reset( void ); int Draw( float flTime ); int MsgFunc_StatusIcon( const char *pszName, int iSize, void *pbuf ); enum { MAX_ICONSPRITENAME_LENGTH = MAX_SPRITE_NAME_LENGTH, MAX_ICONSPRITES = 4, }; // had to make these public so CHud could access them (to enable concussion icon) // could use a friend declaration instead... void EnableIcon( char *pszIconName, byte red, byte green, byte blue ); void DisableIcon( char *pszIconName ); private: typedef struct { char szSpriteName[MAX_ICONSPRITENAME_LENGTH]; HSPRITE spr; wrect_t rc; byte r, g, b; } icon_sprite_t; icon_sprite_t m_IconList[MAX_ICONSPRITES]; }; // //----------------------------------------------------- // #define SKY_OFF 0 #define SKY_ON 1 class CHud { private: HUDLIST *m_pHudList; client_sprite_t *m_pSpriteList; int m_iSpriteCount; float m_flMouseSensitivity; int m_iConcussionEffect; int m_iNoClip; public: HSPRITE m_hsprCursor; float m_flTime; // the current client time float m_fOldTime; // the time at which the HUD was last redrawn double m_flTimeDelta;// the difference between flTime and fOldTime float m_vecOrigin[3]; float m_vecAngles[3]; int m_iKeyBits; int m_iHideHUDDisplay; float m_flFOV; int m_Teamplay; int m_iRes; Vector m_vecSkyPos; int m_iSkyMode; int m_iCameraMode; int m_iLastCameraMode; int m_iFontHeight; int DrawHudNumber( int x, int y, int iFlags, int iNumber, int r, int g, int b ); int DrawHudString( int x, int y, int iMaxX, char *szString, int r, int g, int b ); int DrawHudStringReverse( int xpos, int ypos, int iMinX, char *szString, int r, int g, int b ); int DrawHudNumberString( int xpos, int ypos, int iMinX, int iNumber, int r, int g, int b ); int GetNumWidth( int iNumber, int iFlags ); int viewEntityIndex; int m_iHUDColor; int viewFlags; private: // the memory for these arrays are allocated in the first call to CHud::VidInit() // when the hud.txt and associated sprites are loaded. freed in ~CHud() HSPRITE *m_rghSprites; // the sprites loaded from hud.txt wrect_t *m_rgrcRects; wrect_t nullRect; char *m_rgszSpriteNames; public: HSPRITE GetSprite( int index ) { return (index < 0) ? 0 : m_rghSprites[index]; } wrect_t& GetSpriteRect( int index ) { return (index < 0) ? nullRect : m_rgrcRects[index]; } int InitMessages( void ); // init hud messages int GetSpriteIndex( const char *SpriteName ); CHudAmmo m_Ammo; CHudHealth m_Health; CHudGeiger m_Geiger; CHudBattery m_Battery; CHudTrain m_Train; CHudFlashlight m_Flash; CHudRedeemer m_Redeemer; CHudZoom m_Zoom; CHudMessage m_Message; CHudScoreboard m_Scoreboard; CHudStatusBar m_StatusBar; CHudDeathNotice m_DeathNotice; CHudSayText m_SayText; CHudMenu m_Menu; CHudAmmoSecondary m_AmmoSecondary; CHudTextMessage m_TextMessage; CHudStatusIcons m_StatusIcons; CHudSound m_Sound; CHudMOTD m_MOTD; void Init( void ); void VidInit( void ); void Think( void ); int Redraw( float flTime ); int UpdateClientData( void ); CHud() : m_pHudList(NULL) { } ~CHud(); // destructor, frees allocated memory // user messages int _cdecl MsgFunc_Damage( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_GameMode( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_RoomType( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_ScreenFade( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_ServerName( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_ResetHUD( const char *pszName, int iSize, void *pbuf); int _cdecl MsgFunc_InitHUD( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_Intermission( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_ViewMode( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_Concuss( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_ScreenShake( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_RainData( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_HUDColor( const char *pszName, int iSize, void *pbuf); int _cdecl MsgFunc_SetFog( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_SetSky( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_CamData( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_SetBody( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_SetSkin( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_WeaponAnim( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_AddScreen( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_AddMirror( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_AddPortal( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_Particle( const char *pszName, int iSize, void *pbuf ); int _cdecl MsgFunc_TempEntity( const char *pszName, int iSize, void *pbuf ); // user commansds void _cdecl UserCmd_ChangeLevel( void ); // Screen information SCREENINFO m_scrinfo; int m_iWeaponBits; int m_fPlayerDead; int m_iIntermission; int m_iDrawPlaque; RainData Rain; // buz rain // fog stuff Vector m_vecFogColor; float m_flStartDist; float m_flEndDist; int m_iFinalEndDist; float m_fFadeDuration; // wind stuff Vector m_vecWindVelocity; // sprite indexes int m_HUD_number_0; // screen shake handler CL_ScreenShake m_Shake; // screen fade handler CL_ScreenFade m_FadeList[HUD_MAX_FADES]; Vector m_vecFadeColor; float m_flFadeAlpha; BOOL m_bModulate; // error sprite int m_HUD_error; HSPRITE m_hHudError; void AddHudElem( CHudBase *p ); float GetSensitivity() { return m_flMouseSensitivity; } int IsNoClipping() { return m_iNoClip; } }; extern CHud gHUD;
[ [ [ 1, 715 ] ] ]
6d33e7d33b5216a7dd75bfabd4bd9541c685feb8
f0c08b3ddefc91f1fa342f637b0e947a9a892556
/branches/develop/calcioIA/Calcio/Vector.cpp
53e6994aad3d8a79f468d1d7b790ef8cd362fae3
[]
no_license
BackupTheBerlios/coffeestore-svn
1db0f60ddb85ccbbdfeb9b3271a687b23e29fc8f
ddee83284fe9875bf0d04e6b7da7a2113e85a040
refs/heads/master
2021-01-01T05:30:22.345767
2009-10-11T08:55:35
2009-10-11T08:55:35
40,725,038
0
0
null
null
null
null
UTF-8
C++
false
false
1,413
cpp
#include "Vector.h" #include <cmath> #include <ostream> Vector::Vector() { } Vector::Vector(const Point& tail, const Point& head) : _p(head.x() - tail.x(), head.y() - tail.y()) { } Vector::Vector(float x, float y) : _p(x, y) { } float Vector::x() const { return _p.x(); } float Vector::y() const { return _p.y(); } float Vector::length() const { return sqrt(x()*x() + y()*y()); } Vector Vector::normalize() const { return *this / length(); } Vector operator * (const Vector& v, float s) { return Vector(v.x() * s, v.y() * s); } Vector operator * (float s, const Vector& v) { return Vector(v.x() * s, v.y() * s); } float operator*( const Vector& v0,const Vector& v1 ) { return v0.x() * v1.x() + v0.y() * v1.y(); } Point operator + (const Vector& v,const Point& p) { return Point(v.x() + p.x(),v.y() + p.y()); } Point operator + (const Point& p,const Vector& v) { return Point(v.x() + p.x(),v.y() + p.y()); } Vector operator+( const Vector& v1,const Vector& v2 ) { return Vector(v1.x() + v2.x(),v1.y() + v2.y()); } Vector operator - (const Point& p1, const Point& p2) { return Vector(p1.x() - p2.x(), p1.y() - p2.y()); } Vector operator / (const Vector& v, float s) { return Vector(v.x() / s, v.y() / s); } std::ostream& operator << (std::ostream& os, const Vector& v) { os << v._p; return os; }
[ "fabioppp@e591b805-c13a-0410-8b2d-a75de64125fb", "ranzuglia@e591b805-c13a-0410-8b2d-a75de64125fb" ]
[ [ [ 1, 50 ], [ 56, 85 ] ], [ [ 51, 55 ] ] ]
ad2dab6fd35d85a5f59cd9e1b18a3adc9bc82b5a
12732dc8a5dd518f35c8af3f2a805806f5e91e28
/trunk/Plugin/async_executable_cmd.cpp
4cb978ed94f6b0033eb8d784ed672e11019780cf
[]
no_license
BackupTheBerlios/codelite-svn
5acd9ac51fdd0663742f69084fc91a213b24ae5c
c9efd7873960706a8ce23cde31a701520bad8861
refs/heads/master
2020-05-20T13:22:34.635394
2007-08-02T21:35:35
2007-08-02T21:35:35
40,669,327
0
0
null
null
null
null
UTF-8
C++
false
false
2,425
cpp
#include "async_executable_cmd.h" #include "wx/tokenzr.h" DEFINE_EVENT_TYPE(wxEVT_ASYNC_PROC_ADDLINE) DEFINE_EVENT_TYPE(wxEVT_ASYNC_PROC_STARTED) DEFINE_EVENT_TYPE(wxEVT_ASYNC_PROC_ENDED) AsyncExeCmd::~AsyncExeCmd() { delete m_timer; m_timer = NULL; if(m_proc) { delete m_proc; m_proc = NULL; } }; void AsyncExeCmd::AppendLine(const wxString &line) { if( !m_owner) return; wxCommandEvent event(wxEVT_ASYNC_PROC_ADDLINE); event.SetString(line); m_owner->ProcessEvent(event); } void AsyncExeCmd::Stop() { m_stop = true; //kill the build process if(m_proc){ m_proc->Terminate(); } } void AsyncExeCmd::SendStartMsg() { if( !m_owner) return; wxCommandEvent event(wxEVT_ASYNC_PROC_STARTED); event.SetString(wxT("Running program: ") + m_cmdLine + wxT("\n")); m_owner->ProcessEvent(event); } void AsyncExeCmd::SendEndMsg(int exitCode) { if( !m_owner) return; wxCommandEvent event(wxEVT_ASYNC_PROC_ENDED); wxString message(wxT("Program exited with return code: ")); message << exitCode << wxT("\n"); event.SetString(message); m_owner->ProcessEvent(event); } void AsyncExeCmd::OnTimer(wxTimerEvent &event) { wxUnusedVar(event); if( m_stop ){ m_proc->Terminate(); return; } PrintOutput(); } void AsyncExeCmd::PrintOutput() { wxString data, errors; m_proc->HasInput(data, errors); if(!data.IsEmpty()){ wxStringTokenizer tt(data, wxT("\n")); while(tt.HasMoreTokens()){ AppendLine(tt.NextToken() + wxT("\n")); } } if(!errors.IsEmpty()){ wxStringTokenizer tt(errors, wxT("\n")); while(tt.HasMoreTokens()){ AppendLine(tt.NextToken() + wxT("\n")); } } data.Clear(); errors.Clear(); } void AsyncExeCmd::ProcessEnd(wxProcessEvent& event) { //read all input before stopping the timer if( !m_stop ){ PrintOutput(); } m_timer->Stop(); m_busy = false; m_stop = false; SendEndMsg(event.GetExitCode()); } void AsyncExeCmd::Execute(const wxString &cmdLine) { m_cmdLine = cmdLine; SetBusy(true); SendStartMsg(); m_proc = new clProcess(wxNewId(), m_cmdLine); if(m_proc){ if(m_proc->Start(false) == 0){ delete m_proc; m_proc = NULL; SetBusy(false); }else{ Connect(wxEVT_TIMER, wxTimerEventHandler(AsyncExeCmd::OnTimer), NULL, this); m_timer->Start(10); } } } void AsyncExeCmd::Terminate() { m_proc->Terminate(); }
[ "eranif@b1f272c1-3a1e-0410-8d64-bdc0ffbdec4b" ]
[ [ [ 1, 131 ] ] ]
87b2bae990df12c024d34ef78440f04bbb9a0b92
521721c2e095daf757ad62a267b1c0f724561935
/bsTransform.cpp
a3b7bddfc6c415df242c48c768ee5185272d2eab
[]
no_license
MichaelSPG/boms
251922d78f2db85ece495e067bd56a1e9fae14b1
23a13010e0aaa79fea3b7cf1b23e2faab02fa5d4
refs/heads/master
2021-01-10T16:23:51.722062
2011-12-08T00:04:33
2011-12-08T00:04:33
48,052,727
1
0
null
null
null
null
UTF-8
C++
false
false
9,123
cpp
#include "StdAfx.h" #include "bsTransform.h" #include "bsAssert.h" #include "bsEntity.h" #include "bsMath.h" #include "bsTemplates.h" #include <Physics/Dynamics/Entity/hkpRigidBody.h> bsTransform::bsTransform(bsEntity* ownerEntity) : mLocalPosition(XMVectorZero()) , mLocalRotation(XMQuaternionIdentity()) , mLocalScale(XMVectorReplicate(1.0f)) , mWorldPosition(XMVectorZero()) , mWorldRotation(XMQuaternionIdentity()) , mWorldScale(XMVectorReplicate(1.0f)) , mTransposedWorldTransform(XMMatrixIdentity()) , mWorldTransform(XMMatrixIdentity()) , mParentTransform(nullptr) , mEntity(ownerEntity) { BS_ASSERT2(((uintptr_t)this) % 16 == 0, "bsTransform must be 16 byte aligned!"); BS_ASSERT(ownerEntity); } void bsTransform::setParentTransform(bsTransform* newParent) { BS_ASSERT2(newParent != this, "Trying to attach a transform to itself"); mParentTransform = newParent; //Update transformations to make the correct with respect to the new parent. updateDerivedTransform(); if (newParent) { //TODO: Detect cyclic parenting by verifying that all of newParent's parents //are not equal to 'this'. newParent->mChildren.push_back(this); } } void bsTransform::setTransformFromRigidBody(const XMVECTOR& position, const XMVECTOR& rotation) { if (mParentTransform) { mWorldPosition = position; mWorldRotation = rotation; //Calculate own local position so that own world position is the same as the rigid //body's position. const XMVECTOR& parentPosition = mParentTransform->getPosition(); const XMVECTOR deltaPosition = XMVectorSubtract(mWorldPosition, parentPosition); mLocalPosition = deltaPosition; //TODO: Verify that this works. const XMVECTOR& parentRotation = mParentTransform->getRotation(); mLocalRotation = XMQuaternionMultiply(mWorldRotation, XMQuaternionInverse(parentRotation)); } else { mWorldPosition = mLocalPosition = position; mWorldRotation = mLocalRotation = rotation; } updateDerivedTransform(); } void bsTransform::setPosition(const XMVECTOR& newPosition) { mWorldPosition = newPosition; if (mParentTransform != nullptr) { //Calculate offset from parent. const XMVECTOR& parentPosition = mParentTransform->getPosition(); mLocalPosition = XMVectorSubtract(mWorldPosition, parentPosition); } else { //No parent, local space == world space. mLocalPosition = newPosition; } updateDerivedTransform(); updateRigidBodyPosition(); } void bsTransform::setRotation(const XMVECTOR& newRotation) { //mWorldRotation = XMQuaternionInverse(newRotation); mWorldRotation = newRotation; if (mParentTransform != nullptr) { //Calculate rotation offset from parent. const XMVECTOR& parentRotation = mParentTransform->getRotation(); mLocalRotation = XMQuaternionMultiply(XMQuaternionInverse(parentRotation), mWorldRotation); } else { //No parent, local space == world space. mLocalRotation = mWorldRotation; } updateDerivedTransform(); updateRigidBodyRotation(); } void bsTransform::setScale(const XMVECTOR& newScale) { mWorldScale = newScale; if (mParentTransform != nullptr) { //Calculate scale offset from parent. const XMVECTOR& parentScale = mParentTransform->getScale(); mLocalScale = XMVectorDivide(newScale, parentScale); } else { //No parent, local space == world space. mLocalScale = newScale; } updateDerivedTransform(); } void bsTransform::updateDerivedTransform() { //Verify that vectors have not been corrupted. BS_ASSERT(!XMVector3IsNaN(mLocalPosition)); BS_ASSERT(!XMVector3IsInfinite(mLocalPosition)); BS_ASSERT(!XMVector3IsNaN(mWorldPosition)); BS_ASSERT(!XMVector3IsInfinite(mWorldPosition)); BS_ASSERT(!XMQuaternionIsNaN(mLocalRotation)); BS_ASSERT(!XMQuaternionIsInfinite(mLocalRotation)); BS_ASSERT(!XMQuaternionIsNaN(mWorldRotation)); BS_ASSERT(!XMQuaternionIsInfinite(mWorldRotation)); BS_ASSERT(!XMVector3IsNaN(mLocalScale)); BS_ASSERT(!XMVector3IsInfinite(mLocalScale)); BS_ASSERT(!XMVector3IsNaN(mWorldScale)); BS_ASSERT(!XMVector3IsInfinite(mWorldScale)); if (mParentTransform != nullptr) { //In a node hierarchy, include parent transforms in own transform. //mWorldPosition = XMVectorAdd(mParentTransform->getPosition(), mLocalPosition); //mWorldPosition = XMVector3Rotate(mWorldPosition, (mParentTransform->getRotation())); //XMVECTOR worldPosition = mParentTransform->getPosition(); //XMVECTOR localPositionOffset = XMVector3Rotate(mLocalPosition, mParentTransform->getRotation()); //mWorldPosition = XMVectorAdd(worldPosition, localPositionOffset); //XMVECTOR worldPosition = XMVectorAdd(mParentTransform->getPosition(), mLocalPosition); //Local position rotated by parent's rotation. const XMVECTOR localPositionOffset = XMVector3Rotate(mLocalPosition, mParentTransform->getRotation()); mWorldPosition = XMVectorAdd(mParentTransform->getPosition(), localPositionOffset); //mWorldPosition = XMVectorAdd(mWorldPosition, mParentTransform->getPosition()); //mWorldRotation = XMQuaternionMultiply((mParentTransform->getRotation()), // mLocalRotation); mWorldRotation = XMQuaternionMultiply(mLocalRotation, mParentTransform->getRotation()); //mWorldRotation = XMQuaternionMultiply(XMQuaternionInverse(mParentTransform->getRotation()), // mLocalRotation); mWorldScale = XMVectorMultiply(mParentTransform->getScale(), mLocalScale); } else { //Not in a hierarchy, own local transform and world transform are identical. mWorldPosition = mLocalPosition; mWorldRotation = mLocalRotation; mWorldScale = mLocalScale; } //Combine to a full scale * rotation * translation matrix. //const XMMATRIX positionMat = XMMatrixTranslationFromVector(mWorldPosition); //const XMMATRIX rotationMat = XMMatrixRotationQuaternion(mWorldRotation); //const XMMATRIX scaleMat = XMMatrixScalingFromVector(mWorldScale); XMVECTOR rotationOrigin = mParentTransform ? XMVector3Rotate(mParentTransform->getPosition(), mParentTransform->getRotation()) : XMVectorZero(); if (mParentTransform) { rotationOrigin = XMVectorSubtract(rotationOrigin, mParentTransform->getPosition()); } //XMMATRIX mat = XMMatrixMultiply(scaleMat, rotationMat); //mat = XMMatrixMultiply(mat, positionMat); XMMATRIX mat = XMMatrixAffineTransformation(mWorldScale,//scale //XMVectorSubtract(mWorldPosition, mLocalPosition),//rotation origin //mWorldPosition, XMVectorZero(), //mParentTransform ? mWorldPosition : XMVectorZero(), //mWorldPosition, //mParentTransform ? mParentTransform->getPosition() : XMVectorZero(), //XMVectorScale(mParentTransform ? mParentTransform->getPosition() : mWorldPosition, -1.0f), mWorldRotation,//rotation //mParentTransform ? XMQuaternionMultiply((mLocalRotation), (mParentTransform->getRotation())) : mWorldRotation, mWorldPosition //mParentTransform ? mParentTransform->getPosition() : XMVectorZero() );//position //Transpose to save some CPU when sending to the GPU. mTransposedWorldTransform = XMMatrixTranspose(mat); mWorldTransform = mat; for (unsigned int i = 0; i < mChildren.size(); ++i) { mChildren[i]->updateDerivedTransform(); } } void bsTransform::updateRigidBodyPosition() { hkpRigidBody* rigidBody = mEntity->getRigidBody(); if (rigidBody != nullptr) { hkpWorld* world = rigidBody->getWorld(); if (world != nullptr) { world->markForWrite(); } rigidBody->setPosition(bsMath::toHK(mWorldPosition)); if (world != nullptr) { world->unmarkForWrite(); } } } void bsTransform::updateRigidBodyRotation() { hkpRigidBody* rigidBody = mEntity->getRigidBody(); if (rigidBody != nullptr) { hkpWorld* world = rigidBody->getWorld(); if (world != nullptr) { world->markForWrite(); } hkQuaternion rotation; rotation.m_vec = bsMath::toHK(mWorldRotation); rigidBody->setRotation(rotation); if (world != nullptr) { world->unmarkForWrite(); } } } void bsTransform::updateRigidBodyTransform() { hkpRigidBody* rigidBody = mEntity->getRigidBody(); if (rigidBody != nullptr) { hkpWorld* world = rigidBody->getWorld(); if (world != nullptr) { world->markForWrite(); } hkQuaternion rotation; rotation.m_vec = bsMath::toHK(mWorldRotation); rigidBody->setPositionAndRotation(bsMath::toHK(mWorldPosition), rotation); if (world != nullptr) { world->unmarkForWrite(); } } } void bsTransform::unparentChild(bsTransform& childToRemove) { BS_ASSERT2(childToRemove.getParentTransform() == this, "Trying to remove a child, but" " that child's parent is not 'this'"); auto child = std::find(std::begin(mChildren), std::end(mChildren), &childToRemove); BS_ASSERT2(child != std::end(mChildren), "Trying to remove a child, but that child is" " not a child of this transform"); bs::unordered_erase(mChildren, child); childToRemove.setParentTransform(nullptr); }
[ [ [ 1, 311 ] ] ]
3b22334dc07dca2e3d48e5d438e58d0869871934
bfe8eca44c0fca696a0031a98037f19a9938dd26
/libjingle-0.4.0/talk/base/messagequeue.h
455d5023f30c4102b20ae220914707c6b68748a7
[ "BSD-3-Clause" ]
permissive
luge/foolject
a190006bc0ed693f685f3a8287ea15b1fe631744
2f4f13a221a0fa2fecab2aaaf7e2af75c160d90c
refs/heads/master
2021-01-10T07:41:06.726526
2011-01-21T10:25:22
2011-01-21T10:25:22
36,303,977
0
0
null
null
null
null
UTF-8
C++
false
false
6,367
h
/* * libjingle * Copyright 2004--2005, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TALK_BASE_MESSAGEQUEUE_H__ #define TALK_BASE_MESSAGEQUEUE_H__ #include <vector> #include <queue> #include <algorithm> #include <string.h> #include "talk/base/basictypes.h" #include "talk/base/criticalsection.h" #include "talk/base/socketserver.h" #include "talk/base/time.h" namespace talk_base { struct Message; class MessageQueue; class MessageHandler; // MessageQueueManager does cleanup of of message queues class MessageQueueManager { public: static MessageQueueManager* Instance(); void Add(MessageQueue *message_queue); void Remove(MessageQueue *message_queue); void Clear(MessageHandler *handler); private: MessageQueueManager(); ~MessageQueueManager(); static MessageQueueManager* instance_; // This list contains 'active' MessageQueues. std::vector<MessageQueue *> message_queues_; CriticalSection crit_; }; // Messages get dispatched to a MessageHandler class MessageHandler { public: virtual ~MessageHandler() { MessageQueueManager::Instance()->Clear(this); } virtual void OnMessage(Message *pmsg) = 0; }; // Derive from this for specialized data // App manages lifetime, except when messages are purged class MessageData { public: MessageData() {} virtual ~MessageData() {} }; template <class T> class TypedMessageData : public MessageData { public: TypedMessageData(const T& data) : data_(data) { } const T& data() const { return data_; } T& data() { return data_; } private: T data_; }; template<class T> inline MessageData* WrapMessageData(const T& data) { return new TypedMessageData<T>(data); } template<class T> inline const T& UseMessageData(MessageData* data) { return static_cast< TypedMessageData<T>* >(data)->data(); } template<class T> class DisposeData : public MessageData { public: DisposeData(T* data) : data_(data) { } virtual ~DisposeData() { delete data_; } private: T* data_; }; const uint32 MQID_ANY = static_cast<uint32>(-1); const uint32 MQID_DISPOSE = static_cast<uint32>(-2); // No destructor struct Message { Message() { memset(this, 0, sizeof(*this)); } MessageHandler *phandler; uint32 message_id; MessageData *pdata; uint32 ts_sensitive; }; // DelayedMessage goes into a priority queue, sorted by trigger time class DelayedMessage { public: DelayedMessage(int cmsDelay, Message *pmsg) { cmsDelay_ = cmsDelay; msTrigger_ = GetMillisecondCount() + cmsDelay; msg_ = *pmsg; } bool operator< (const DelayedMessage& dmsg) const { return dmsg.msTrigger_ < msTrigger_; } int cmsDelay_; // for debugging uint32 msTrigger_; Message msg_; }; class MessageQueue { public: MessageQueue(SocketServer* ss = 0); virtual ~MessageQueue(); SocketServer* socketserver() { return ss_; } void set_socketserver(SocketServer* ss); // Note: The behavior of MessageQueue has changed. When a MQ is stopped, // futher Posts and Sends will fail. However, any pending Sends and *ready* // Posts (as opposed to unexpired delayed Posts) will be delivered before // Get (or Peek) returns false. By guaranteeing delivery of those messages, // we eliminate the race condition when an MessageHandler and MessageQueue // may be destroyed independently of each other. virtual void Stop(); virtual bool IsStopping(); virtual void Restart(); // Get() will process I/O until: // 1) A message is available (returns true) // 2) cmsWait seconds have elapsed (returns false) // 3) Stop() is called (returns false) virtual bool Get(Message *pmsg, int cmsWait = kForever); virtual bool Peek(Message *pmsg, int cmsWait = 0); virtual void Post(MessageHandler *phandler, uint32 id = 0, MessageData *pdata = NULL, bool time_sensitive = false); virtual void PostDelayed(int cmsDelay, MessageHandler *phandler, uint32 id = 0, MessageData *pdata = NULL); virtual void Clear(MessageHandler *phandler, uint32 id = MQID_ANY); virtual void Dispatch(Message *pmsg); virtual void ReceiveSends(); virtual int GetDelay(); // Internally posts a message which causes the doomed object to be deleted template<class T> void Dispose(T* doomed) { if (doomed) { Post(NULL, MQID_DISPOSE, new talk_base::DisposeData<T>(doomed)); } } protected: void EnsureActive(); SocketServer* ss_; bool new_ss; bool fStop_; bool fPeekKeep_; Message msgPeek_; // A message queue is active if it has ever had a message posted to it. // This also corresponds to being in MessageQueueManager's global list. bool active_; std::queue<Message> msgq_; std::priority_queue<DelayedMessage> dmsgq_; CriticalSection crit_; }; } // namespace talk_base #endif // TALK_BASE_MESSAGEQUEUE_H__
[ "[email protected]@756bb6b0-a119-0410-8338-473b6f1ccd30" ]
[ [ [ 1, 208 ] ] ]
8ac7b51b8129c3d1f20bef94b9752c3e1117d82d
7cf0bc0c3120c2040c3ed534421082cd93f0242f
/ab_mfc/ab_mfc/Dlg2.cpp
7c77c13f0431155e70b50b994a65e05bbcf4bd27
[]
no_license
zephyrer/ab-mfc
3d7be0283fa3fff3dcb7120fc1544e60a3811d88
f228b27a6fdbcb55f481155e9e9d77302335336a
refs/heads/master
2021-01-13T02:15:55.470629
2010-12-10T12:16:23
2010-12-10T12:16:23
40,066,957
0
0
null
null
null
null
GB18030
C++
false
false
1,846
cpp
// Dlg2.cpp : 实现文件 // #include "stdafx.h" #include "ab_mfc.h" #include "Dlg2.h" #include "Page3.h" #include "Page4.h" // CDlg2 对话框 IMPLEMENT_DYNAMIC(CDlg2, CDialog) CDlg2::CDlg2(CWnd* pParent /*=NULL*/) : CDialog(CDlg2::IDD, pParent) { } CDlg2::~CDlg2() { } void CDlg2::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_TAB1, m_tab); } BEGIN_MESSAGE_MAP(CDlg2, CDialog) ON_WM_CREATE() ON_WM_TIMER() ON_WM_DESTROY() ON_NOTIFY(TCN_SELCHANGE, IDC_TAB1, &CDlg2::OnTcnSelchangeTab1) END_MESSAGE_MAP() // CDlg2 消息处理程序 BOOL CDlg2::OnInitDialog() { CDialog::OnInitDialog(); m_tab.InsertItem(0, _T("性能")); m_tab.InsertItem(1, _T("进程")); m_page1.Create(IDD_TAB_DLG3, &m_tab); m_page2.Create(IDD_TAB_DLG4, &m_tab); //设置画面窗口大小在控件内 CRect rc; m_tab.GetClientRect(rc); rc.top += 20; rc.bottom -= 0; rc.left += 0; rc.right -= 0; m_page1.MoveWindow(&rc); m_page2.MoveWindow(&rc); pDialog[0] = &m_page1; pDialog[1] = &m_page2; //显示初始画面 pDialog[0]->ShowWindow(SW_SHOW); pDialog[1]->ShowWindow(SW_HIDE); //保存当前点 选项 m_CurSelTab = 0; return true; } int CDlg2::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDialog::OnCreate(lpCreateStruct) == -1) return -1; return 0; } void CDlg2::OnDestroy() { CDialog::OnDestroy(); // TODO: 在此处添加消息处理程序代码 //KillTimer(1); } void CDlg2::OnTcnSelchangeTab1(NMHDR *pNMHDR, LRESULT *pResult) { //把当前的页面隐藏起来 pDialog[m_CurSelTab]->ShowWindow(SW_HIDE); //得到新的页面索引 m_CurSelTab = m_tab.GetCurSel(); //把新的页面显示出来 pDialog[m_CurSelTab]->ShowWindow(SW_SHOW); *pResult = 0; }
[ [ [ 1, 91 ] ] ]
af318293d4058473ccb6fc524e4df7c9a636fb8a
fc1fcbc65e81d785cc51cc9da1a8ac3911875534
/include/hge/hgecolor.h
d50cc057f3379221bf8669a56eb9a1e222d4d053
[]
no_license
sgastudio/topoc
9a4d527579f137ece55548ffbfb6554ee8db44a2
cea5de9b6f3e1d00020fcafc7786e967bc610fc9
refs/heads/master
2021-01-10T04:17:36.768185
2009-04-27T16:20:24
2009-04-27T16:20:24
55,675,663
0
0
null
null
null
null
UTF-8
C++
false
false
3,638
h
/* * Thanks to Dr.Watson JGE++! ** Haaf's Game Engine 1.7 ** Copyright (C) 2003-2007, Relish Games ** hge.relishgames.com ** ** hgeColor*** helper classes */ #ifndef HGECOLOR_H #define HGECOLOR_H #include "nge_define.h" #define hgeColor hgeColorRGB inline void ColorClamp(float &x) { if(x<0.0f) x=0.0f; if(x>1.0f) x=1.0f; } class hgeColorRGB { public: float r,g,b,a; hgeColorRGB(float _r, float _g, float _b, float _a) { r=_r; g=_g; b=_b; a=_a; } hgeColorRGB(uint32 col) { SetHWColor(col); } hgeColorRGB() { r=g=b=a=0; } hgeColorRGB operator- (const hgeColorRGB &c) const { return hgeColorRGB(r-c.r, g-c.g, b-c.b, a-c.a); } hgeColorRGB operator+ (const hgeColorRGB &c) const { return hgeColorRGB(r+c.r, g+c.g, b+c.b, a+c.a); } hgeColorRGB operator* (const hgeColorRGB &c) const { return hgeColorRGB(r*c.r, g*c.g, b*c.b, a*c.a); } hgeColorRGB& operator-= (const hgeColorRGB &c) { r-=c.r; g-=c.g; b-=c.b; a-=c.a; return *this; } hgeColorRGB& operator+= (const hgeColorRGB &c) { r+=c.r; g+=c.g; b+=c.b; a+=c.a; return *this; } BOOL operator== (const hgeColorRGB &c) const { return (r==c.r && g==c.g && b==c.b && a==c.a); } BOOL operator!= (const hgeColorRGB &c) const { return (r!=c.r || g!=c.g || b!=c.b || a!=c.a); } hgeColorRGB operator/ (const float scalar) const { return hgeColorRGB(r/scalar, g/scalar, b/scalar, a/scalar); } hgeColorRGB operator* (const float scalar) const { return hgeColorRGB(r*scalar, g*scalar, b*scalar, a*scalar); } hgeColorRGB& operator*= (const float scalar) { r*=scalar; g*=scalar; b*=scalar; a*=scalar; return *this; } void Clamp() { ColorClamp(r); ColorClamp(g); ColorClamp(b); ColorClamp(a); } void SetHWColor(uint32 col) { a = (col>>24)/255.0f; r = ((col>>16) & 0xFF)/255.0f; g = ((col>>8) & 0xFF)/255.0f; b = (col & 0xFF)/255.0f; } uint32 GetHWColor() const { return MAKE_RGBA_8888(((int)(r*255.0f)), ((int)(g*255.0f)), ((int)(b*255.0f)),((int)(a*255.0f))); } }; inline hgeColorRGB operator* (const float sc, const hgeColorRGB &c) { return c*sc; } class hgeColorHSV { public: float h,s,v,a; hgeColorHSV(float _h, float _s, float _v, float _a) { h=_h; s=_s; v=_v; a=_a; } hgeColorHSV(uint32 col) { SetHWColor(col); } hgeColorHSV() { h=s=v=a=0; } hgeColorHSV operator- (const hgeColorHSV &c) const { return hgeColorHSV(h-c.h, s-c.s, v-c.v, a-c.a); } hgeColorHSV operator+ (const hgeColorHSV &c) const { return hgeColorHSV(h+c.h, s+c.s, v+c.v, a+c.a); } hgeColorHSV operator* (const hgeColorHSV &c) const { return hgeColorHSV(h*c.h, s*c.s, v*c.v, a*c.a); } hgeColorHSV& operator-= (const hgeColorHSV &c) { h-=c.h; s-=c.s; v-=c.v; a-=c.a; return *this; } hgeColorHSV& operator+= (const hgeColorHSV &c) { h+=c.h; s+=c.s; v+=c.v; a+=c.a; return *this; } BOOL operator== (const hgeColorHSV &c) const { return (h==c.h && s==c.s && v==c.v && a==c.a); } BOOL operator!= (const hgeColorHSV &c) const { return (h!=c.h || s!=c.s || v!=c.v || a!=c.a); } hgeColorHSV operator/ (const float scalar) const { return hgeColorHSV(h/scalar, s/scalar, v/scalar, a/scalar); } hgeColorHSV operator* (const float scalar) const { return hgeColorHSV(h*scalar, s*scalar, v*scalar, a*scalar); } hgeColorHSV& operator*= (const float scalar) { h*=scalar; s*=scalar; v*=scalar; a*=scalar; return *this; } void Clamp() { ColorClamp(h); ColorClamp(s); ColorClamp(v); ColorClamp(a); } void SetHWColor(uint32 col); uint32 GetHWColor() const; }; inline hgeColorHSV operator* (const float sc, const hgeColorHSV &c) { return c*sc; } #endif
[ "pspbter@7a141ce8-6c34-0410-b069-259f8a6abf5c" ]
[ [ [ 1, 79 ] ] ]
fa18a5d26f4ed75a919576d9cde4a5c1dc0f3ef6
d6eba554d0c3db3b2252ad34ffce74669fa49c58
/Source/Wrappers/CSGD_DirectInput.h
0be1383a281f1c87d06e607f1b19b8de4ac1876a
[]
no_license
nbucciarelli/Polarity-Shift
e7246af9b8c3eb4aa0e6aaa41b17f0914f9d0b10
8b9c982f2938d7d1e5bd1eb8de0bdf10505ed017
refs/heads/master
2016-09-11T00:24:32.906933
2008-09-26T18:01:01
2008-09-26T18:01:01
3,408,115
1
0
null
null
null
null
UTF-8
C++
false
false
81,720
h
//////////////////////////////////////////////////////////////// // File : "CSGD_DirectInput.h" // // Author : David Brown (DB) // Based in part on: // -Input code from the book: "OpenGL Game Programming" by Kevin Hawkins and Dave Astle. // -The previous CSGD_DirectInput wrapper by Jensen Rivera. // // Creation Date : 5/25/2008 // // Purpose : To wrap DirectInput functionality. // Allows the use of Keyboard, Mouse, // and Joysticks through DirectInput. // // Special thanks to: Ari Patrick for testing this wrapper and // providing the product name for wireless Xbox360 controllers. ///////////////////////////////////////////////////////////////// /* Disclaimer: This source code was developed for and is the property of Full Sail University's Game Development Program (c) 2008. Full Sail students may not redistribute this code, but may use it in any project used for educational purposes. */ #pragma once // The version of DirectInput to use. #ifndef DIRECTINPUT_VERSION #define DIRECTINPUT_VERSION 0X800 #endif #include <dinput.h> #pragma comment(lib, "dinput8.lib") #pragma comment(lib, "dxguid.lib") #include <vector> using std::vector; #include "SGD_Util.h" // for utility macros // Forward declarations: class CSGD_DIKeyboard; class CSGD_DIMouse; class CSGD_DIJoystick; // Enumerations: // Devices: enum DeviceFlags { DI_KEYBOARD = 1, DI_MOUSE = 2, DI_JOYSTICKS = 4 }; // Directions enum Directions { DIR_LEFT = 0, DIR_RIGHT = 1, DIR_UP = 2, DIR_DOWN = 3, DIR_MAX }; // Mouse buttons enum MouseButtons { MOUSE_LEFT = 0, MOUSE_RIGHT = 1, MOUSE_MIDDLE = 2, MOUSE_MAX }; class CSGD_DirectInput { private: LPDIRECTINPUT8 m_lpDIObject; // DirectInput COM Object CSGD_DIKeyboard* m_pKeyboard; // Keyboard object CSGD_DIMouse* m_pMouse; // Mouse object vector<CSGD_DIJoystick*> m_vpJoysticks; // Joysticks attached to the system // Utility struct for joystick setup: struct tJoystickSetupInfo { HWND hWnd; bool bIsExclusive; }; static CSGD_DirectInput m_Instance; // The instance of this class. // Trilogy of EVIL! // Constructor CSGD_DirectInput(void); // Copy Constructor CSGD_DirectInput(const CSGD_DirectInput&); // Assignment Operator CSGD_DirectInput& operator=(const CSGD_DirectInput&); // Plus Destructor ~CSGD_DirectInput(void); // Private utility functions: /////////////////////////////////////////////////////////////////// // Function: "InitKeyboard" // // Last Modified: 5/25/2008 // // Input : hWnd - The Main window handle. // bIsExclusive - Whether or not you want exclusive control of the device. // // Return : true if it was able to initialize the Keyboard. // // Purpose : Initialize the Keyboard for DirectInput. /////////////////////////////////////////////////////////////////// bool InitKeyboard(HWND hWnd, bool bIsExclusive = false); /////////////////////////////////////////////////////////////////// // Function: "InitMouse" // // Last Modified: 5/25/2008 // // Input : hWnd - The Main window handle. // bIsExclusive - Whether or not you want exclusive control of the device. // // Return : true if it was able to initialize the Mouse. // // Purpose : Initialize the Mouse for DirectInput. /////////////////////////////////////////////////////////////////// bool InitMouse(HWND hWnd, bool bIsExclusive = false); /////////////////////////////////////////////////////////////////// // Function: "InitJoysticks" // // Last Modified: 5/26/2008 // // Input : hWnd - The Main window handle. // bIsExclusive - Whether or not you want exclusive control of the device. // // Return : true if it was able to initialize the joysticks. // // Purpose : Initialize the joysticks for DirectInput. /////////////////////////////////////////////////////////////////// bool InitJoysticks(HWND hWnd, bool bIsExclusive = false); /////////////////////////////////////////////////////////////////// // Function: "EnumJoysticksCallback" // // Last Modified: 5/26/2008 // // Input : lpddi - Pointer to the DirectInput Device Instance of the joystick that was found. // pVoid - Pointer to something you want to use for this function. // // Return : Returns after all of the joysticks connected to the computer have been found. // // Purpose : Checks to see if there are any Joysticks presently attached to the computer. /////////////////////////////////////////////////////////////////// static BOOL CALLBACK EnumJoysticksCallback(const DIDEVICEINSTANCE* lpdidi, VOID* pVoid); public: ///////////////////////////////////////////////////////////////////// // Function: "GetInstance" // // Last Modified: 5/25/2008 // // Input : void // // Return : The instance of this class. // // Purpose : Gets the instance of this class. //////////////////////////////////////////////////////////////////// static CSGD_DirectInput* GetInstance(void); /////////////////////////////////////////////////////////////////// // Function: "InitDirectInput" // // Last Modified: 7/05/2008 // // Input : hWnd - The Main window handle. // hInstance - The Main application Instance. // unInitDevices - A combination of flags representing which // devices to initialize (i.e. DI_KEYBOARD | DI_MOUSE). // unExclusiveDevices - A combination of flags representing which // devices to make exclusive (i.e. DI_JOYSTICKS). // // Return : true if it initialized the DirectInput object and all // of the requested devices. // // Purpose : To initialize the DirectInput Object and requested devices. /////////////////////////////////////////////////////////////////// bool InitDirectInput(HWND hWnd, HINSTANCE hInstance, unsigned int unInitDevices, unsigned int unExclusiveDevices = 0); /////////////////////////////////////////////////////////////////// // Function: "ShutdownDirectInput" // // Last Modified: 5/25/2008 // // Input: void // // Return: void // // Purpose: Shuts down DirectInput and any initialized devices. /////////////////////////////////////////////////////////////////// void ShutdownDirectInput(void); /////////////////////////////////////////////////////////////////// // Function: "ReadDevices" // // Last Modified: 6/13/2008 // // Input : void // // Return : void // // Purpose : Gets the state of all the initialized devices. // Reads buffered data as well (for Ex functions). /////////////////////////////////////////////////////////////////// void ReadDevices(void); /////////////////////////////////////////////////////////////////// // Function: "AcquireAll" // // Last Modified: 5/25/2008 // // Input : void // // Return : void // // Purpose : Acquires all the initialized direct input devices (i.e. keyboard, mouse, and joysticks). // Ideally called when the application gains focus. /////////////////////////////////////////////////////////////////// void AcquireAll(void); /////////////////////////////////////////////////////////////////// // Function: "UnacquireAll" // // Last Modified: 5/25/2008 // // Input : void // // Return : void // // Purpose : Unacquires all the initialized direct input devices (i.e. keyboard, mouse, and joysticks). // Ideally called when the application loses focus. /////////////////////////////////////////////////////////////////// void UnacquireAll(void); /*********************** Device specific functions: ********************/ /////////////////////////////////////////////////////////////////// // KEYBOARD // /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Function: "KeyDown" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if the Key is currently down. // // Purpose : Gets the current (immediate) state of a Key. /////////////////////////////////////////////////////////////////// bool KeyDown(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "KeyPressed" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if Key was pressed this frame. // // Purpose : To tell if a key was just pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool KeyPressed(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "KeyPressedEx" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if the Key was pressed this frame. // // Purpose : To tell if a key was just pressed (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool KeyPressedEx(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "KeyUp" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if the Key is currently up. // // Purpose : Gets the current (immediate) state of a Key. /////////////////////////////////////////////////////////////////// bool KeyUp(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "KeyReleased" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if the Key was released this frame. // // Purpose : To tell if a key was just released (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool KeyReleased(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "KeyReleasedEx" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if the Key was released this frame. // // Purpose : To tell if a key was just released (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool KeyReleasedEx(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "CheckKeys" // // Last Modified: 5/25/2008 // // Input : void // // Return : 0 if nothing was pressed, otherwise the ascii character // value of the key the user pressed. // // Purpose : To get the ascii character value of the key the user typed. // So they can enter letters. /////////////////////////////////////////////////////////////////// char CheckKeys(void); /////////////////////////////////////////////////////////////////// // Function: "CheckBufferedKeysEx" // // Last Modified: 5/25/2008 // // Input : void // // Return : 0 if nothing was pressed, otherwise the ascii character // value of the key the user pressed. // // Purpose : To get the ascii character value of the key the user just typed. // So they can enter letters (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// char CheckBufferedKeysEx(void); /////////////////////////////////////////////////////////////////// // Function: "GetDIKCode" // // Last Modified: 5/25/2008 // // Input : void // // Return : 0 if nothing was pressed, otherwise the DIK code // of the key the user pressed. // // Purpose : To get the DIK code of the key the user is pressing. // For key binding. /////////////////////////////////////////////////////////////////// unsigned char GetDIKCode(void); /////////////////////////////////////////////////////////////////// // Function: "GetBufferedDIKCodeEx" // // Last Modified: 5/25/2008 // // Input : void // // Return : 0 if nothing was pressed, otherwise the DIK code // of the key the user pressed. // // Purpose : To get the DIK code of the key the user just pressed. // For key binding (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// unsigned char GetBufferedDIKCodeEx(void); /////////////////////////////////////////////////////////////////// // MOUSE // /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Function: "MouseButtonDown" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button is currently down. // // Purpose : Gets the current (immediate) state of a mouse button. /////////////////////////////////////////////////////////////////// bool MouseButtonDown(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "MouseButtonPressed" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button was pressed this frame. // // Purpose : To tell if a mouse button was just pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool MouseButtonPressed(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "MouseButtonPressedEx" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button was pressed this frame. // // Purpose : To tell if a mouse button was just pressed (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool MouseButtonPressedEx(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "MouseButtonUp" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button is currently up. // // Purpose : Gets the current (immediate) state of a mouse button. /////////////////////////////////////////////////////////////////// bool MouseButtonUp(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "MouseButtonReleased" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button was released this frame. // // Purpose : To tell if a mouse button was just released (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool MouseButtonReleased(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "MouseButtonReleasedEx" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button was released this frame. // // Purpose : To tell if a mouse button was just released (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool MouseButtonReleasedEx(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "MouseCheckBufferedButtons" // // Last Modified: 6/13/2008 // // Input : void // // Return : The mouse button that was just pressed (i.e. 0, 1, or 2). -1 if there was no button pressed. // // Purpose : To tell if a mouse button was just pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// int MouseCheckBufferedButtons(void); /////////////////////////////////////////////////////////////////// // Function: "MouseCheckBufferedButtonsEx" // // Last Modified: 5/27/2008 // // Input : void // // Return : The mouse button that was just pressed (i.e. 0, 1, or 2). -1 if there was no button pressed. // // Purpose : To tell if a mouse button was just pressed (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// int MouseCheckBufferedButtonsEx(void); /////////////////////////////////////////////////////////////////// // Function : "MouseMovementX" // // Last Modified : 5/25/2008 // // Input : void // // Return : The amount the mouse has moved this frame. // // Purpose : To report the relative motion of the mouse // in the X dimension. /////////////////////////////////////////////////////////////////// long MouseMovementX(void); /////////////////////////////////////////////////////////////////// // Function : "MouseMovementY" // // Last Modified : 5/25/2008 // // Input : void // // Return : The amount the mouse has moved this frame. // // Purpose : To report the relative motion of the mouse // in the Y dimension. /////////////////////////////////////////////////////////////////// long MouseMovementY(void); /////////////////////////////////////////////////////////////////// // Function : "MouseWheelMovement" // // Last Modified : 5/25/2008 // // Input : void // // Return : The amount the mouse wheel has moved this frame. // Positive(+) values mean pushing the wheel away from you. // Negative(-) values mean pulling the wheel toward you. // // Purpose : To report the relative motion of the mouse // wheel. /////////////////////////////////////////////////////////////////// long MouseWheelMovement(void); /////////////////////////////////////////////////////////////////// // Function : "MouseGetNumButtons" // // Last Modified : 5/26/2008 // // Input : void // // Return : The number of buttons supported on the device. // // Purpose : To report the number of buttons on the device. /////////////////////////////////////////////////////////////////// int MouseGetNumButtons(void); /////////////////////////////////////////////////////////////////// // Function : "MouseGetPosX" // // Last Modified : 6/23/2008 // // Input : void // // Return : The "psuedo" position of the mouse. // // Purpose : To help track the "psuedo" position of the mouse. /////////////////////////////////////////////////////////////////// int MouseGetPosX(void); /////////////////////////////////////////////////////////////////// // Function : "MouseGetPosY" // // Last Modified : 6/23/2008 // // Input : void // // Return : The "psuedo" position of the mouse. // // Purpose : To help track the "psuedo" position of the mouse. /////////////////////////////////////////////////////////////////// int MouseGetPosY(void); /////////////////////////////////////////////////////////////////// // Function : "MouseSetPosX" // // Last Modified : 7/05/2008 // // Input : The "psuedo" position of the mouse. // // Return : void // // Purpose : To set the "psuedo" position of the mouse. /////////////////////////////////////////////////////////////////// void MouseSetPosX(int nPosX); /////////////////////////////////////////////////////////////////// // Function : "MouseSetPosY" // // Last Modified : 7/05/2008 // // Input : The "psuedo" position of the mouse. // // Return : void // // Purpose : To set the "psuedo" position of the mouse. /////////////////////////////////////////////////////////////////// void MouseSetPosY(int nPosY); /////////////////////////////////////////////////////////////////// // JOYSTICKS // /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Function: "JoystickButtonDown" // // Last Modified: 6/01/2008 // // Input : ucButton - The joystick button to check for. // nJoyNum - The joystick to check. // // Return : true if the joystick button is currently down. // // Purpose : Gets the current (immediate) state of a joystick button. /////////////////////////////////////////////////////////////////// bool JoystickButtonDown(unsigned char ucButton, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickButtonPressed" // // Last Modified: 6/01/2008 // // Input : ucButton - The joystick button to check for. // nJoyNum - The joystick to check. // // Return : true if the joystick button was pressed this frame. // // Purpose : To tell if a joystick button was just pressed (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool JoystickButtonPressed(unsigned char ucButton, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickButtonPressedEx" // // Last Modified: 6/01/2008 // // Input : ucButton - The joystick button to check for. // nJoyNum - The joystick to check. // // Return : true if the joystick button was pressed this frame. // // Purpose : To tell if a joystick button was just pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool JoystickButtonPressedEx(unsigned char ucButton, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickButtonUp" // // Last Modified: 6/01/2008 // // Input : ucButton - The joystick button to check for. // nJoyNum - The joystick to check. // // Return : true if the joystick button is currently up. // // Purpose : Gets the current (immediate) state of a joystick button. /////////////////////////////////////////////////////////////////// bool JoystickButtonUp(unsigned char ucButton, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickButtonReleased" // // Last Modified: 6/01/2008 // // Input : ucButton - The joystick button to check for. // nJoyNum - The joystick to check. // // Return : true if the joystick button was released this frame. // // Purpose : To tell if a joystick button was just released (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool JoystickButtonReleased(unsigned char ucButton, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickButtonReleasedEx" // // Last Modified: 6/01/2008 // // Input : ucButton - The joystick button to check for. // nJoyNum - The joystick to check. // // Return : true if the joystick button was released this frame. // // Purpose : To tell if a joystick button was just released (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool JoystickButtonReleasedEx(unsigned char ucButton, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // D-pad: /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Function: "JoystickDPadDown" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // nJoyNum - The joystick to check. // // Return : true if the D-pad direction is currently being held down. // // Purpose : To tell if a D-pad direction is down. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool JoystickDPadDown(int nDir, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickDPadPressed" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // nJoyNum - The joystick to check. // // Return : true if the D-pad was pressed a certain direction. // // Purpose : To get the (buffered) direction the D-pad was pressed (without using DirectInput's Buffered Input). // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool JoystickDPadPressed(int nDir, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickDPadUp" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // nJoyNum - The joystick to check. // // Return : true if the D-pad direction is currently up. // // Purpose : To tell if a D-pad direction is up. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool JoystickDPadUp(int nDir, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickDPadReleased" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // nJoyNum - The joystick to check. // // Return : true if the D-pad direction was released this frame. // // Purpose : To tell if a D-pad direction was just released (without using DirectInput's Buffered Input). // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool JoystickDPadReleased(int nDir, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Analog Sticks: /////////////////////////////////////////////////////////////////// // L-stick: /////////////////////////////////////////////////////////////////// // Function: "JoystickGetLStickDirDown" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // nJoyNum - The joystick to check. // // Return : true if the left stick is currently held a certain direction. // // Purpose : To get the (immediate) direction the stick is being held. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool JoystickGetLStickDirDown(int nDir, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetLStickDirPressed" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // nJoyNum - The joystick to check. // // Return : true if the left stick was pressed a certain direction. // // Purpose : To get the (buffered) direction the stick was pressed (without using DirectInput's Buffered Input). // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool JoystickGetLStickDirPressed(int nDir, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetLStickXAmount" // // Last Modified: 6/01/2008 // // Input : nJoyNum - The joystick to check. // // Return : -JOYSTICK_RANGE to +JOYSTICK_RANGE ((-) Left and (+) Right) // // Purpose : To get the position of the joystick in a digital range. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// int JoystickGetLStickXAmount(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetLStickYAmount" // // Last Modified: 6/01/2008 // // Input : nJoyNum - The joystick to check. // // Return : -JOYSTICK_RANGE to +JOYSTICK_RANGE (-JOYSTICK_RANGE is Up, +JOYSTICK_RANGE is Down) // // Purpose : To get the position of the joystick in a digital range. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// int JoystickGetLStickYAmount(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetLStickXNormalized" // // Last Modified: 6/01/2008 // // Input : nJoyNum - The joystick to check. // // Return : -1.0 to +1.0 (-1.0 is Left, +1.0 is Right) // // Purpose : To get the position of the joystick in a normalized range. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// float JoystickGetLStickXNormalized(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetLStickYNormalized" // // Last Modified: 6/01/2008 // // Input : nJoyNum - The joystick to check. // // Return : -1.0 to +1.0 (-1.0 is Up, +1.0 is Down) // // Purpose : To get the position of the joystick in a normalized range. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// float JoystickGetLStickYNormalized(int nJoyNum = 0); // R-stick: /////////////////////////////////////////////////////////////////// // Function: "JoystickGetRStickDirDown" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // nJoyNum - The joystick to check. // // Return : true if the right stick is currently held a certain direction. // // Purpose : To get the (immediate) direction the stick is being held. /////////////////////////////////////////////////////////////////// bool JoystickGetRStickDirDown(int nDir, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetRStickDirPressed" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // nJoyNum - The joystick to check. // // Return : true if the right stick was pressed a certain direction. // // Purpose : To get the (buffered) direction the stick was pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool JoystickGetRStickDirPressed(int nDir, int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetRStickXAmount" // // Last Modified: 6/01/2008 // // Input : nJoyNum - The joystick to check. // // Return : -JOYSTICK_RANGE to +JOYSTICK_RANGE ((-) Left and (+) Right) // // Purpose : To get the position of the joystick in a digital range. /////////////////////////////////////////////////////////////////// int JoystickGetRStickXAmount(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetRStickYAmount" // // Last Modified: 6/01/2008 // // Input : nJoyNum - The joystick to check. // // Return : -JOYSTICK_RANGE to +JOYSTICK_RANGE (-JOYSTICK_RANGE is Up, +JOYSTICK_RANGE is Down) // // Purpose : To get the position of the joystick in a digital range. /////////////////////////////////////////////////////////////////// int JoystickGetRStickYAmount(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetRStickXNormalized" // // Last Modified: 6/01/2008 // // Input : nJoyNum - The joystick to check. // // Return : -1.0 to +1.0 (-1.0 is Left, +1.0 is Right) // // Purpose : To get the position of the joystick in a normalized range. /////////////////////////////////////////////////////////////////// float JoystickGetRStickXNormalized(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetRStickYNormalized" // // Last Modified: 6/01/2008 // // Input : nJoyNum - The joystick to check. // // Return : -1.0 to +1.0 (-1.0 is Up, +1.0 is Down) // // Purpose : To get the position of the joystick in a normalized range. /////////////////////////////////////////////////////////////////// float JoystickGetRStickYNormalized(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Triggers: /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Function: "JoystickGetLTriggerAmount" // // Last Modified: 6/12/2008 // // Input : nJoyNum - The joystick to check. // // Return : 0 to JOYSTICK_AXIS_RANGE // // Purpose : To get the position of the trigger in a digital range. // // NOTE: If both triggers are pulled at the same time the reading won't // be accurate as their input is combined into one axis by DirectInput. /////////////////////////////////////////////////////////////////// int JoystickGetLTriggerAmount(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetRTriggerAmount" // // Last Modified: 6/012/2008 // // Input : nJoyNum - The joystick to check. // // Return : 0 to JOYSTICK_AXIS_RANGE // // Purpose : To get the position of the trigger in a digital range. // // NOTE: If both triggers are pulled at the same time the reading won't // be accurate as their input is combined into one axis by DirectInput. /////////////////////////////////////////////////////////////////// int JoystickGetRTriggerAmount(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetLTriggerNormalized" // // Last Modified: 6/12/2008 // // Input : nJoyNum - The joystick to check. // // Return : 0.0 to 1.0 to (0.0 is not pressed, +1.0 is pulled all the way down) // // Purpose : To get the position of the trigger in a normalized range. // // NOTE: If both triggers are pulled at the same time the reading won't // be accurate as their input is combined into one axis by DirectInput. /////////////////////////////////////////////////////////////////// float JoystickGetLTriggerNormalized(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickGetRTriggerNormalized" // // Last Modified: 6/12/2008 // // Input : nJoyNum - The joystick to check. // // Return : 0.0 to 1.0 to (0.0 is not pressed, +1.0 is pulled all the way down) // // Purpose : To get the position of the trigger in a normalized range. // // NOTE: If both triggers are pulled at the same time the reading won't // be accurate as their input is combined into one axis by DirectInput. /////////////////////////////////////////////////////////////////// float JoystickGetRTriggerNormalized(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickCheckBufferedButtons" // // Last Modified: 5/27/2008 // // Input : nJoyNum - The joystick to check. // // Return : The joystick button that was just pressed. -1 if no button was pressed. // // Purpose : To tell which joystick button was just pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// int JoystickCheckBufferedButtons(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function: "JoystickCheckBufferedButtonsEx" // // Last Modified: 6/07/2008 // // Input : nJoyNum - The joystick to check. // // Return : The joystick button that was just pressed. -1 if no button was pressed. // // Purpose : To tell which joystick button was just pressed (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// int JoystickCheckBufferedButtonsEx(int nJoyNum = 0); /////////////////////////////////////////////////////////////////// // Function : "JoystickGetNumButtons" // // Last Modified : 5/26/2008 // // Input : nJoyNum - The joystick to check. // // Return : The number of buttons supported on the device. // // Purpose : To report the number of buttons on the device. /////////////////////////////////////////////////////////////////// int JoystickGetNumButtons(int nJoyNum = 0) const; /////////////////////////////////////////////////////////////////// // Function: "JoystickIsUnplugged" // // Last Modified: 5/26/2008 // // Input : nJoyNum - The joystick to check. // // Return : true if the joystick is unplugged. // // Purpose : Returns the true if the joystick is unplugged. /////////////////////////////////////////////////////////////////// bool JoystickIsUnplugged(int nJoyNum = 0) const; /////////////////////////////////////////////////////////////////// // Function: "JoystickGetName" // // Last Modified: 5/26/2008 // // Input : nJoyNum - The joystick to check. // // Return : The name of the joystick. // // Purpose : Returns the name of the joystick (i.e. "Logitech RumblePad 2 USB") /////////////////////////////////////////////////////////////////// const char* JoystickGetName(int nJoyNum = 0) const; /////////////////////////////////////////////////////////////////// // Function: "JoystickSwapRStickAxes" // // Last Modified: 6/13/2008 // // Input : bSwapAxes - Whether or not to swap the X/Y axes of the Rstick. // nJoyNum - The joystick to set. // // Return : void // // Purpose : To swap the X/Y axes of certain controllers. // // NOTE: Z axis is considered R-stick's X-axis by default. // Only works on non-Xbox360 controllers. /////////////////////////////////////////////////////////////////// void JoystickSwapRStickAxes(bool bSwapAxes, int nJoyNum = 0); }; // end class CSGD_DirectInput //////////////////////////////////////////////////////////////////////////////////////////// const int g_knBUFFER_SIZE = 10; // Arbitrary number of elements for Buffered Input. // Interface class defining "blue print" functions. class ISGD_DirectInputDevice { public: virtual ~ISGD_DirectInputDevice(void) = 0 {}; virtual bool ReadDevice(void) = 0; virtual bool ReadBufferedDevice(void) = 0; virtual bool Acquire(void) = 0; virtual bool Unacquire(void) = 0; }; // end class ISGD_DirectInputDevice //////////////////////////////////////////////////////////////////////////////////////////// // Abstract class with partial functionality. class CSGD_DirectInputDevice : public ISGD_DirectInputDevice { protected: LPDIRECTINPUTDEVICE8 m_lpDevice; // DirectInput Device pointer. // For DirectX Buffered input: DIDEVICEOBJECTDATA m_didod[g_knBUFFER_SIZE]; // Receives buffered data for the device. DWORD m_dwBufferElements; // Number of element in the buffer for the device. // Utility function to clear buffered data. void ClearBufferedData(void) { memset(&m_didod, 0, sizeof(m_didod)); // clear out device object data. m_dwBufferElements = g_knBUFFER_SIZE; // set buffer elements to the size of the array. } public: // Constructor. CSGD_DirectInputDevice(void) { m_lpDevice = NULL; ClearBufferedData(); } // Destructor. virtual ~CSGD_DirectInputDevice(void) { if (m_lpDevice) { m_lpDevice->Unacquire(); SAFE_RELEASE(m_lpDevice); } } // Common way to read DirectInput buffered data. /////////////////////////////////////////////////////////////////// // Function: "ReadBufferedDevice" // // Last Modified: 5/26/2008 // // Input : void // // Return : true if it can read the device data, false if it can't. // // Purpose : Gets the DirectInput Buffered Data. // // NOTE : For all Ex functions. /////////////////////////////////////////////////////////////////// virtual bool ReadBufferedDevice(void) { // Make sure the device was made. if (!m_lpDevice) return false; ClearBufferedData(); // Attempt to read the device... if (FAILED( m_lpDevice->GetDeviceData(sizeof(DIDEVICEOBJECTDATA), m_didod, &m_dwBufferElements, 0) )) { // If we couldn't, try to re-acquire the device. if (FAILED( m_lpDevice->Acquire() )) return false; // Could not re-acquire the Device. ClearBufferedData(); // Now try reading it if (FAILED( m_lpDevice->GetDeviceData(sizeof(DIDEVICEOBJECTDATA), m_didod, &m_dwBufferElements, 0) )) return false; } // Success return true; } // returns true if the device was able to be acquired. virtual bool Acquire(void) { return (m_lpDevice) ? SUCCEEDED( m_lpDevice->Acquire() ) : false; } // returns true if the device was able to be unacquired. virtual bool Unacquire(void) { return (m_lpDevice) ? SUCCEEDED( m_lpDevice->Unacquire() ) : false; } }; // end class CSGD_DirectInputDevice //////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// // CSGD_DIKeyboard ////////////////////////////////////////////////////////////////////////////////// // Class to encapsulate the keyboard's functionality. class CSGD_DIKeyboard : public CSGD_DirectInputDevice { private: unsigned char m_ucKeysPressed[256]; // Holds Keyboard Data. unsigned char m_ucPrevKeysPressed[256]; // Used for BufferedKeyEx. unsigned char m_ucAsciiVals[256]; // For CheckKeys and CheckBufferedKeys. HKL m_keyLayout; // For CheckKeys and CheckBufferedKeys. // Utility function to clear the state of the pressed keys. void ClearKeys(void) { // clear the currently pressed keys memset(m_ucKeysPressed, 0, 256 * sizeof(unsigned char)); // clear the previously pressed keys memset(m_ucPrevKeysPressed, 0, 256 * sizeof(unsigned char)); } public: /////////////////////////////////////////////////////////////////// // Function: "CSGD_DIKeyboard (Constructor)" // // Last Modified: 5/25/2008 // // Input : pDI - Pointer to the DirectInput Object. // hWnd - Handle of the window to use the device for. // bIsExclusive - Whether or not you want exclusive control of the device. // // Return : N/A // // Purpose : Setup the keyboard for use with DirectInput. /////////////////////////////////////////////////////////////////// CSGD_DIKeyboard(LPDIRECTINPUT8 pDI, HWND hWnd, bool bIsExclusive=false); /////////////////////////////////////////////////////////////////// // Function: "ReadDevice" // // Last Modified: 5/25/2008 // // Input : void // // Return : true if it can read the device state, false if it can't. // // Purpose : Reads the state of the device. /////////////////////////////////////////////////////////////////// bool ReadDevice(void); /////////////////////////////////////////////////////////////////// // Function: "ReadBufferedDevice" // // Last Modified: 5/25/2008 // // Input : void // // Return : true if it can read the device data, false if it can't. // // Purpose : Gets the DirectInput Buffered Data. // // NOTE : For all Ex functions. /////////////////////////////////////////////////////////////////// bool ReadBufferedDevice(void); /////////////////////////////////////////////////////////////////// // Function: "Acquire" // // Last Modified: 5/25/2008 // // Input : void // // Return : true if it could acquire the device // // Purpose : To acquire the device when the application gains focus. // // NOTE : Also clears the state of the keys. /////////////////////////////////////////////////////////////////// bool Acquire(void) { ClearKeys(); return CSGD_DirectInputDevice::Acquire(); } /////////////////////////////////////////////////////////////////// // Function: "Unacquire" // // Last Modified: 5/25/2008 // // Input : void // // Return : true if it could unacquire the device // // Purpose : To unacquire the device when the application loses focus. // // NOTE : Also clears the state of the keys. /////////////////////////////////////////////////////////////////// bool Unacquire(void) { ClearKeys(); return CSGD_DirectInputDevice::Unacquire(); } /////////////////////////////////////////////////////////////////// // Function: "KeyDown" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if the Key is currently down. // // Purpose : Gets the current (immediate) state of a Key. /////////////////////////////////////////////////////////////////// bool KeyDown(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "KeyPressed" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if the Key was pressed this frame. // // Purpose : To tell if a key was just pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool KeyPressed(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "KeyPressedEx" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if Key was pressed this frame. // // Purpose : To tell if a key was just pressed (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool KeyPressedEx(unsigned char ucDIKey); // was key just pressed? /////////////////////////////////////////////////////////////////// // Function: "KeyUp" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if the Key is currently up. // // Purpose : Gets the current (immediate) state of a Key. /////////////////////////////////////////////////////////////////// bool KeyUp(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "KeyReleased" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if the Key was released this frame. // // Purpose : To tell if a key was just released (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool KeyReleased(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "KeyReleasedEx" // // Last Modified: 5/25/2008 // // Input : ucDIKey - The DirectInput Keyboard Constant to check, such as DIK_ESCAPE. // // Return : true if the Key was released this frame. // // Purpose : To tell if a key was just released (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool KeyReleasedEx(unsigned char ucDIKey); /////////////////////////////////////////////////////////////////// // Function: "CheckKeys" // // Last Modified: 5/25/2008 // // Input : void // // Return : 0 if nothing was pressed, otherwise the ascii character // value of the key the user pressed. // // Purpose : To get the ascii character value of the key the user typed. // So they can enter letters. /////////////////////////////////////////////////////////////////// char CheckKeys(void); /////////////////////////////////////////////////////////////////// // Function: "CheckBufferedKeys" // // Last Modified: 5/25/2008 // // Input : void // // Return : 0 if nothing was pressed, otherwise the ascii character // value of the key the user pressed. // // Purpose : To get the ascii character value of the key the user just typed. // So they can enter letters (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// char CheckBufferedKeysEx(void); /////////////////////////////////////////////////////////////////// // Function: "GetDIKCode" // // Last Modified: 5/25/2008 // // Input : void // // Return : 0 if nothing was pressed, otherwise the DIK code // of the key the user pressed. // // Purpose : To get the DIK code of the key the user is pressing. // For key binding. /////////////////////////////////////////////////////////////////// unsigned char GetDIKCode(void); /////////////////////////////////////////////////////////////////// // Function: "GetBufferedDIKCodeEx" // // Last Modified: 5/25/2008 // // Input : void // // Return : 0 if nothing was pressed, otherwise the DIK code // of the key the user pressed. // // Purpose : To get the DIK code of the key the user just pressed. // For key binding (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// unsigned char GetBufferedDIKCodeEx(void); }; // end class CSGD_DIKeyboard ////////////////////////////////////////////////////////////////////////////////// // CSGD_DIMouse ////////////////////////////////////////////////////////////////////////////////// // Class to encapsulate the mouse class CSGD_DIMouse : public CSGD_DirectInputDevice { private: DIMOUSESTATE2 m_diMouseState; // Holds Mouse Data (button and movement info). DIMOUSESTATE2 m_diPrevMouseState; // Holds the previous state. int m_nNumButtons; // Number of buttons supported. int m_nPosX; // Helper positions for mouse cursor. int m_nPosY; public: /////////////////////////////////////////////////////////////////// // Function: "CSGD_DIMouse (Constructor)" // // Last Modified: 5/25/2008 // // Input : pDI - Pointer to the DirectInput Object. // hWnd - Handle of the window to use the device for. // bIsExclusive - Whether or not you want exclusive control of the device. // // Return : N/A // // Purpose : Setup the mouse for use with DirectInput. /////////////////////////////////////////////////////////////////// CSGD_DIMouse(LPDIRECTINPUT8 pDI, HWND hWnd, bool bIsExclusive=false); /////////////////////////////////////////////////////////////////// // Function: "ReadDevice" // // Last Modified: 6/23/2008 // // Input : void // // Return : true if it can read the device state, false if it can't. // // Purpose : Reads the state of the device every frame. /////////////////////////////////////////////////////////////////// bool ReadDevice(void); /////////////////////////////////////////////////////////////////// // Function: "ReadBufferedDevice" // // Last Modified: 5/25/2008 // // Input : void // // Return : true if it can read the device state, false if it can't. // // Purpose : Gets the DirectInput Buffered Data. // // NOTE : For use with all Ex functions. /////////////////////////////////////////////////////////////////// bool ReadBufferedDevice(void); /////////////////////////////////////////////////////////////////// // Function: "ButtonDown" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button is currently down. // // Purpose : Gets the current (immediate) state of a mouse button. /////////////////////////////////////////////////////////////////// bool ButtonDown(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "ButtonPressed" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button was pressed this frame. // // Purpose : To tell if a mouse button was just pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool ButtonPressed(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "ButtonPressedEx" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button was pressed this frame. // // Purpose : To tell if a mouse button was just pressed (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool ButtonPressedEx(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "ButtonUp" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button is currently up. // // Purpose : Gets the current (immediate) state of a mouse button. /////////////////////////////////////////////////////////////////// bool ButtonUp(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "ButtonReleased" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button was released this frame. // // Purpose : To tell if a mouse button was just released (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool ButtonReleased(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "ButtonReleasedEx" // // Last Modified: 5/25/2008 // // Input : ucButton - The mouse button to check for (i.e. 0, 1, or 2) // 0 = left, 1 = right, 2 = middle // // Return : true if the mouse button was released this frame. // // Purpose : To tell if a mouse button was just released (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool ButtonReleasedEx(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "CheckBufferedButtons" // // Last Modified: 6/13/2008 // // Input : void // // Return : The mouse button that was just pressed (i.e. 0, 1, or 2). // // Purpose : To tell if a mouse button was just pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// int CheckBufferedButtons(void); /////////////////////////////////////////////////////////////////// // Function: "CheckBufferedButtonsEx" // // Last Modified: 5/27/2008 // // Input : void // // Return : The mouse button that was just pressed (i.e. 0, 1, or 2). // // Purpose : To tell if a mouse button was just pressed (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// int CheckBufferedButtonsEx(void); /////////////////////////////////////////////////////////////////// // Function : "MovementX" // // Last Modified : 5/25/2008 // // Input : void // // Return : The amount the mouse has moved this frame. // // Purpose : To report the relative motion of the mouse // in the X dimension. /////////////////////////////////////////////////////////////////// long MovementX(void); /////////////////////////////////////////////////////////////////// // Function : "MovementY" // // Last Modified : 5/25/2008 // // Input : void // // Return : The amount the mouse has moved this frame. // // Purpose : To report the relative motion of the mouse // in the Y dimension. /////////////////////////////////////////////////////////////////// long MovementY(void); /////////////////////////////////////////////////////////////////// // Function : "WheelMovement" // // Last Modified : 5/25/2008 // // Input : void // // Return : The amount the mouse wheel has moved this frame. // Positive(+) values mean pushing the wheel away from you. // Negative(-) values mean pulling the wheel toward you. // // Purpose : To report the relative motion of the mouse // wheel. /////////////////////////////////////////////////////////////////// long WheelMovement(void); /////////////////////////////////////////////////////////////////// // Function : "GetNumButtons" // // Last Modified : 5/26/2008 // // Input : void // // Return : The number of buttons supported on the device. // // Purpose : To report the number of buttons on the device. /////////////////////////////////////////////////////////////////// int GetNumButtons(void) { return m_nNumButtons; } /////////////////////////////////////////////////////////////////// // Function : "GetPosX" // // Last Modified : 6/23/2008 // // Input : void // // Return : The "psuedo" position of the mouse on the screen. // // Purpose : To help track the "psuedo" position of the mouse. /////////////////////////////////////////////////////////////////// int GetPosX(void) { return m_nPosX; } /////////////////////////////////////////////////////////////////// // Function : "GetPosY" // // Last Modified : 6/23/2008 // // Input : void // // Return : The "psuedo" position of the mouse on the screen. // // Purpose : To help track the "psuedo" position of the mouse. /////////////////////////////////////////////////////////////////// int GetPosY(void) { return m_nPosY; } /////////////////////////////////////////////////////////////////// // Function : "SetPosX" // // Last Modified : 6/23/2008 // // Input : nPosX // // Return : void // // Purpose : To set the "psuedo" position of the mouse. /////////////////////////////////////////////////////////////////// void SetPosX(int nPosX) { m_nPosX = nPosX; } /////////////////////////////////////////////////////////////////// // Function : "SetPosY" // // Last Modified : 6/23/2008 // // Input : nPosY // // Return : void // // Purpose : To set the "psuedo" position of the mouse. /////////////////////////////////////////////////////////////////// void SetPosY(int nPosY) { m_nPosY = nPosY; } }; // end class CSGD_DIMouse ////////////////////////////////////////////////////////////////////////////////// // CSGD_DIJoystick ////////////////////////////////////////////////////////////////////////////////// // Class to encapsulate the Joystick class CSGD_DIJoystick : public CSGD_DirectInputDevice { private: char m_szJoyName[MAX_PATH]; // Holds the product name of the joystick. DIJOYSTATE2 m_diJoyState; // Holds Joystick Data (button and movement info). DIJOYSTATE2 m_diPrevJoyState; // Holds the previous state. int m_nNumButtons; // Number of buttons supported. bool m_bIsUnplugged; // Tracks if the joystick is currently unplugged. bool m_bIsXbox360Pad; // Tracks if it is an Xbox360 pad. bool m_bIsZAxisY; // Swaps whether Z or RotationZ is considered the Y-Axis. // POV constants enum POV_dirs { POV_NEUTRAL = -1, POV_UP = 0, POV_UPRIGHT = 45 * DI_DEGREES, POV_RIGHT = 90 * DI_DEGREES, POV_DOWNRIGHT = 135 * DI_DEGREES, POV_DOWN = 180 * DI_DEGREES, POV_DOWNLEFT = 225 * DI_DEGREES, POV_LEFT = 270 * DI_DEGREES, POV_UPLEFT = 315 * DI_DEGREES }; // Utility functions: /////////////////////////////////////////////////////////////////// // Function: "TranslatePOV" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check. // dwPOVDir - The value of the D-pad. // // Return : true if it can translate the direction as what is being pressed, false if it can't. // // Purpose : Translates a checked for direction from a numerical mess. /////////////////////////////////////////////////////////////////// bool TranslatePOV(int nDir, DWORD dwPOVDir); /////////////////////////////////////////////////////////////////// // Function: "TranslateRStickX" // // Last Modified: 6/06/2008 // // Input : diJoyState - The joystate to translate. // // Return : -JOYSTICK_RANGE to +JOYSTICK_RANGE // // Purpose : To get the position of the joystick in a digital range. /////////////////////////////////////////////////////////////////// LONG TranslateRStickX(DIJOYSTATE2& diJoyState); /////////////////////////////////////////////////////////////////// // Function: "TranslateRStickY" // // Last Modified: 6/07/2008 // // Input : diJoyState - The joystate to translate. // // Return : -JOYSTICK_RANGE to +JOYSTICK_RANGE // // Purpose : To get the position of the joystick in a digital range. /////////////////////////////////////////////////////////////////// LONG TranslateRStickY(DIJOYSTATE2& diJoyState); public: /////////////////////////////////////////////////////////////////// // Function: "CSGD_DIJoystick (Constructor)" // // Last Modified: 5/26/2008 // // Input : pDI - Pointer to the DirectInput Object. // hWnd - Handle of the window to use the device for. // bIsExclusive - Whether or not you want exclusive control of the device. // // Return : N/A // // Purpose : Setup the joystick for use with DirectInput. /////////////////////////////////////////////////////////////////// CSGD_DIJoystick(LPDIRECTINPUT8 pDI, HWND hWnd, const DIDEVICEINSTANCE* lpdidi, bool bIsExclusive=false); /////////////////////////////////////////////////////////////////// // Function: "ReadDevice" // // Last Modified: 5/26/2008 // // Input : void // // Return : true if it could read the device state, false if it couldn't. // // Purpose : Reads the state of the device. /////////////////////////////////////////////////////////////////// bool ReadDevice(void); /////////////////////////////////////////////////////////////////// // Function: "ReadBufferedDevice" // // Last Modified: 5/26/2008 // // Input : void // // Return : true if it could read the device state, false if it couldn't. // // Purpose : Gets the DirectInput Buffered Data. // // NOTE : For use with all Ex functions. /////////////////////////////////////////////////////////////////// bool ReadBufferedDevice(void); /////////////////////////////////////////////////////////////////// // Function: "SwitchRStickAxes" // // Last Modified: 6/06/2008 // // Input : void // // Return : void // // Purpose : Toggles whether the Z or RotationZ axis is considered the Y Axis. // // NOTE : Defaults to RotationZ is the Y Axis. /////////////////////////////////////////////////////////////////// void SwitchRStickAxes(void); /////////////////////////////////////////////////////////////////// // Buttons: /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Function: "ButtonDown" // // Last Modified: 5/26/2008 // // Input : ucButton - The joystick button to check for. // // Return : true if the joystick button is currently down. // // Purpose : Gets the current (immediate) state of a joystick button. /////////////////////////////////////////////////////////////////// bool ButtonDown(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "ButtonPressed" // // Last Modified: 5/26/2008 // // Input : ucButton - The joystick button to check for. // // Return : true if the joystick button was pressed this frame. // // Purpose : To tell if a joystick button was just pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool ButtonPressed(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "ButtonPressedEx" // // Last Modified: 5/26/2008 // // Input : ucButton - The joystick button to check for. // // Return : true if the joystick button was pressed this frame. // // Purpose : To tell if a joystick button was just pressed (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool ButtonPressedEx(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "ButtonUp" // // Last Modified: 5/26/2008 // // Input : ucButton - The joystick button to check for. // // Return : true if the joystick button is currently up. // // Purpose : Gets the current (immediate) state of a joystick button. /////////////////////////////////////////////////////////////////// bool ButtonUp(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "ButtonReleased" // // Last Modified: 5/26/2008 // // Input : ucButton - The joystick button to check for. // // Return : true if the joystick button was released this frame. // // Purpose : To tell if a joystick button was just released (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool ButtonReleased(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // Function: "ButtonReleasedEx" // // Last Modified: 5/26/2008 // // Input : ucButton - The joystick button to check for. // // Return : true if the joystick button was released this frame. // // Purpose : To tell if a joystick button was just released (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool ButtonReleasedEx(unsigned char ucButton); /////////////////////////////////////////////////////////////////// // D-pad: /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Function: "DPadDown" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // // Return : true if the D-pad direction is currently being held down. // // Purpose : To tell if a D-pad direction is down. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool DPadDown(int nDir); /////////////////////////////////////////////////////////////////// // Function: "DPadPressed" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // // Return : true if the D-pad was pressed a certain direction. // // Purpose : To get the (buffered) direction the D-pad was pressed (without using DirectInput's Buffered Input). // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool DPadPressed(int nDir); /////////////////////////////////////////////////////////////////// // Function: "DPadUp" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // // Return : true if the D-pad direction is currently up. // // Purpose : To tell if a D-pad direction is up. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool DPadUp(int nDir); /////////////////////////////////////////////////////////////////// // Function: "DPadReleased" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // // Return : true if the D-pad direction was released this frame. // // Purpose : To tell if a D-pad direction was just released (without using DirectInput's Buffered Input). // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool DPadReleased(int nDir); /////////////////////////////////////////////////////////////////// // Analog Sticks: /////////////////////////////////////////////////////////////////// // L-stick: /////////////////////////////////////////////////////////////////// // Function: "GetLStickDirDown" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // // Return : true if the left stick is currently held a certain direction. // // Purpose : To get the (immediate) direction the stick is being held. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool GetLStickDirDown(int nDir); /////////////////////////////////////////////////////////////////// // Function: "GetLStickDirPressed" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // // Return : true if the left stick was pressed a certain direction. // // Purpose : To get the (buffered) direction the stick was pressed (without using DirectInput's Buffered Input). // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// bool GetLStickDirPressed(int nDir); /////////////////////////////////////////////////////////////////// // Function: "GetLStickXAmount" // // Last Modified: 6/01/2008 // // Input : void // // Return : -JOYSTICK_RANGE to +JOYSTICK_RANGE // // Purpose : To get the position of the joystick in a digital range. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// int GetLStickXAmount(void); /////////////////////////////////////////////////////////////////// // Function: "GetLStickYAmount" // // Last Modified: 6/01/2008 // // Input : void // // Return : -JOYSTICK_RANGE to +JOYSTICK_RANGE // // Purpose : To get the position of the joystick in a digital range. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// int GetLStickYAmount(void); /////////////////////////////////////////////////////////////////// // Function: "GetLStickXNormalized" // // Last Modified: 6/01/2008 // // Input : void // // Return : -1.0 to +1.0 (-1.0 is Left, +1.0 is Right) // // Purpose : To get the position of the joystick in a normalized range. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// float GetLStickXNormalized(); /////////////////////////////////////////////////////////////////// // Function: "GetLStickYNormalized" // // Last Modified: 6/01/2008 // // Input : void // // Return : -1.0 to +1.0 (-1.0 is Up, +1.0 is Down) // // Purpose : To get the position of the joystick in a normalized range. // // NOTE: L-stick and D-pad can usually be swapped by pressing a "Mode" button on the controller. /////////////////////////////////////////////////////////////////// float GetLStickYNormalized(); // R-stick: /////////////////////////////////////////////////////////////////// // Function: "GetRStickDirDown" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // // Return : true if the right stick is currently held a certain direction. // // Purpose : To get the (immediate) direction the stick is being held. /////////////////////////////////////////////////////////////////// bool GetRStickDirDown(int nDir); /////////////////////////////////////////////////////////////////// // Function: "GetRStickDirPressed" // // Last Modified: 6/01/2008 // // Input : nDir - The direction to check (i.e. DIR_RIGHT). // // Return : true if the right stick was pressed a certain direction. // // Purpose : To get the (buffered) direction the stick was pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// bool GetRStickDirPressed(int nDir); /////////////////////////////////////////////////////////////////// // Function: "GetRStickXAmount" // // Last Modified: 6/01/2008 // // Input : void // // Return : -JOYSTICK_RANGE to +JOYSTICK_RANGE ((-) Left and (+) Right) // // Purpose : To get the position of the joystick in a digital range. /////////////////////////////////////////////////////////////////// int GetRStickXAmount(void); /////////////////////////////////////////////////////////////////// // Function: "GetRStickYAmount" // // Last Modified: 6/01/2008 // // Input : void // // Return : -JOYSTICK_RANGE to +JOYSTICK_RANGE (-JOYSTICK_RANGE is Up, +JOYSTICK_RANGE is Down) // // Purpose : To get the position of the joystick in a digital range. /////////////////////////////////////////////////////////////////// int GetRStickYAmount(void); /////////////////////////////////////////////////////////////////// // Function: "GetRStickXNormalized" // // Last Modified: 6/01/2008 // // Input : void // // Return : -1.0 to +1.0 (-1.0 is Left, +1.0 is Right) // // Purpose : To get the position of the joystick in a normalized range. /////////////////////////////////////////////////////////////////// float GetRStickXNormalized(void); /////////////////////////////////////////////////////////////////// // Function: "GetRStickYNormalized" // // Last Modified: 6/01/2008 // // Input : void // // Return : -1.0 to +1.0 (-1.0 is Up, +1.0 is Down) // // Purpose : To get the position of the joystick in a normalized range. /////////////////////////////////////////////////////////////////// float GetRStickYNormalized(void); /////////////////////////////////////////////////////////////////// // Function: "GetLTriggerAmount" // // Last Modified: 6/07/2008 // // Input : void // // Return : 0 to JOYSTICK_AXIS_RANGE // // Purpose : To get the position of the trigger in a digital range. // // NOTE: If both triggers are pulled at the same time the reading won't // be accurate as their input is combined into one axis by DirectInput. /////////////////////////////////////////////////////////////////// int GetLTriggerAmount(void); /////////////////////////////////////////////////////////////////// // Function: "GetRTriggerAmount" // // Last Modified: 6/07/2008 // // Input : void // // Return : 0 to JOYSTICK_AXIS_RANGE // // Purpose : To get the position of the trigger in a digital range. // // NOTE: If both triggers are pulled at the same time the reading won't // be accurate as their input is combined into one axis by DirectInput. /////////////////////////////////////////////////////////////////// int GetRTriggerAmount(void); /////////////////////////////////////////////////////////////////// // Function: "GetLTriggerNormalized" // // Last Modified: 6/07/2008 // // Input : void // // Return : 0.0 to 1.0 to (0.0 is not pressed, +1.0 is pulled all the way down) // // Purpose : To get the position of the trigger in a normalized range. // // NOTE: If both triggers are pulled at the same time the reading won't // be accurate as their input is combined into one axis by DirectInput. /////////////////////////////////////////////////////////////////// float GetLTriggerNormalized(void); /////////////////////////////////////////////////////////////////// // Function: "GetRTriggerNormalized" // // Last Modified: 6/07/2008 // // Input : void // // Return : 0.0 to 1.0 to (0.0 is not pressed, +1.0 is pulled all the way down) // // Purpose : To get the position of the trigger in a normalized range. // // NOTE: If both triggers are pulled at the same time the reading won't // be accurate as their input is combined into one axis by DirectInput. /////////////////////////////////////////////////////////////////// float GetRTriggerNormalized(void); /////////////////////////////////////////////////////////////////// // Function: "CheckBufferedButtons" // // Last Modified: 5/27/2008 // // Input : void // // Return : The joystick button that was just pressed. -1 if no button was pressed. // // Purpose : To tell which joystick button was just pressed (without using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// int CheckBufferedButtons(void); /////////////////////////////////////////////////////////////////// // Function: "CheckBufferedButtonsEx" // // Last Modified: 6/07/2008 // // Input : void // // Return : The joystick button that was just pressed. -1 if no button was pressed. // // Purpose : To tell which joystick button was just pressed (using DirectInput's Buffered Input). /////////////////////////////////////////////////////////////////// int CheckBufferedButtonsEx(void); /////////////////////////////////////////////////////////////////// // Function : "GetNumButtons" // // Last Modified : 5/26/2008 // // Input : void // // Return : The number of buttons supported on the device. // // Purpose : To report the number of buttons on the device. /////////////////////////////////////////////////////////////////// int GetNumButtons(void) const { return m_nNumButtons; } /////////////////////////////////////////////////////////////////// // Function: "IsUnplugged" // // Last Modified: 5/26/2008 // // Input : void // // Return : The name of the joystick. // // Purpose : Returns the true if the joystick is unplugged. /////////////////////////////////////////////////////////////////// bool IsUnplugged(void) const { return m_bIsUnplugged; } /////////////////////////////////////////////////////////////////// // Function: "GetName" // // Last Modified: 5/26/2008 // // Input : void // // Return : The name of the joystick. // // Purpose : Returns the name of the joystick (i.e. "Logitech RumblePad 2 USB") /////////////////////////////////////////////////////////////////// const char* GetName(void) const { return (const char*)m_szJoyName; } /////////////////////////////////////////////////////////////////// // Function: "SwapRStickAxes" // // Last Modified: 6/13/2008 // // Input : bSwapAxes - Whether or not to swap the X/Y axes of the Rstick. // // Return : void // // Purpose : To swap the X/Y axes of certain controllers. // // NOTE: Z axis is considered R-stick's X-axis by default. // Only works on non-Xbox360 controllers. /////////////////////////////////////////////////////////////////// void SwapRStickAxes(bool bSwapAxes) { m_bIsZAxisY = bSwapAxes; } }; // end class CSGD_DIJoystick
[ [ [ 1, 2310 ] ] ]
68a03587fceb94c78b99f953009b6fcb69e60cd8
6477cf9ac119fe17d2c410ff3d8da60656179e3b
/Projects/openredalert/src/include/fibheap.h
8d95dbba2fefce0b64d2a5b67641891bd162e60b
[]
no_license
crutchwalkfactory/motocakerteam
1cce9f850d2c84faebfc87d0adbfdd23472d9f08
0747624a575fb41db53506379692973e5998f8fe
refs/heads/master
2021-01-10T12:41:59.321840
2010-12-13T18:19:27
2010-12-13T18:19:27
46,494,539
0
0
null
null
null
null
UTF-8
C++
false
false
1,763
h
#ifndef FIBHEAP_H #define FIBHEAP_H #include "video/Renderer.h" class FibHeapEntry { public: friend class FibHeap; FibHeapEntry(void *value, Uint32 key); void *getValue() { return value; } void setKey(Uint32 k) { key = k; } private: void insertInList(FibHeapEntry *value) { FibHeapEntry *tmp = value->left; value->left = this; tmp->right = right; right->left = tmp; right = value; } void link(FibHeapEntry *nparent) { /* Remove y from the rootlist */ left->right = right; right->left = left; parent = nparent; /* Add y as x's child */ if( nparent->child == NULL ) { nparent->child = this; left = this; right = this; } else { right = nparent->child->right; left = nparent->child; nparent->child->right->left = this; nparent->child->right = this; } /* Increase the degree of x */ nparent->degree++; mark = 0; } void *value; FibHeapEntry *left; FibHeapEntry *right; FibHeapEntry *parent; FibHeapEntry *child; Uint32 degree: 31; Uint32 mark: 1; Uint32 key; }; class FibHeap { public: FibHeap(); ~FibHeap(); FibHeapEntry *top() { return min; } FibHeapEntry *pop(); void push(FibHeapEntry *value); void decreaseKey(FibHeapEntry *x, Uint32 k); private: void consolidate(); void cut(FibHeapEntry *x, FibHeapEntry *y); void cascading_cut(FibHeapEntry *x); FibHeapEntry *min; Uint32 n; }; #endif
[ [ [ 1, 89 ] ] ]
1f36307c74067a044c85dd255c6b0e7116b9f4f8
478570cde911b8e8e39046de62d3b5966b850384
/apicompatanamdw/bcdrivers/mw/classicui/uifw/apps/S60_SDK3.0/bctestappfrm/src/bctestappfrmdocument.cpp
bbcdd3bfe1f3c84c3be28e50677b6babdb349513
[]
no_license
SymbianSource/oss.FCL.sftools.ana.compatanamdw
a6a8abf9ef7ad71021d43b7f2b2076b504d4445e
1169475bbf82ebb763de36686d144336fcf9d93b
refs/heads/master
2020-12-24T12:29:44.646072
2010-11-11T14:03:20
2010-11-11T14:03:20
72,994,432
0
0
null
null
null
null
UTF-8
C++
false
false
2,173
cpp
/* * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. * * Contributors: * * Description: Avkon Template test application * */ // INCLUDE FILES #include "bctestappfrmdocument.h" #include "bctestappfrmappui.h" // ================= MEMBER FUNCTIONS ========================================= // ---------------------------------------------------------------------------- // CBCTestAppFrmDocument* CBCTestAppFrmDocument::NewL( CEikApplication& ) // Symbian OS two-phased constructor. // ---------------------------------------------------------------------------- // CBCTestAppFrmDocument* CBCTestAppFrmDocument::NewL( CEikApplication& aApp ) { CBCTestAppFrmDocument* self = new( ELeave ) CBCTestAppFrmDocument( aApp ); return self; } // ---------------------------------------------------------------------------- // CBCTestAppFrmDocument::~CBCTestAppFrmDocument() // Destructor. // ---------------------------------------------------------------------------- // CBCTestAppFrmDocument::~CBCTestAppFrmDocument() { } // ---------------------------------------------------------------------------- // CBCTestAppFrmDocument::CBCTestAppFrmDocument( CEikApplication& ) // Overload constructor. // ---------------------------------------------------------------------------- // CBCTestAppFrmDocument::CBCTestAppFrmDocument( CEikApplication& aApp ) : CAknDocument( aApp ) { } // ---------------------------------------------------------------------------- // CEikAppUi* CBCTestAppFrmDocument::CreateAppUiL() // Constructs CBCTestVolumeAppUi. // ---------------------------------------------------------------------------- // CEikAppUi* CBCTestAppFrmDocument::CreateAppUiL() { return new( ELeave ) CBCTestAppFrmAppUi; }
[ "none@none" ]
[ [ [ 1, 64 ] ] ]
ac8c20b32ac5f568e8c8d67d5bb6b192fcd09439
60b362ba672a29bedf3d44abf11138dd71742c5d
/ex1/ex1/testPaint.cpp
e439ebf089cb57a7b3fe09764cf34a92ba8e127f
[]
no_license
AndreyShamis/oop1
9e04882ab6969cc542e99422b84114157d4b20f3
861da0e7a70eba21e4b7ee39e355c21a864ce8b1
refs/heads/master
2016-09-06T14:15:47.867525
2011-03-16T22:20:04
2011-03-16T22:20:04
32,789,848
0
0
null
null
null
null
UTF-8
C++
false
false
6,493
cpp
//includes #include <iostream> #include <time.h> #include <iomanip> // for setw #include <stdlib.h> // for rand #include <windows.h> #include "macros.h" #include "Line.h" #include "Plus.h" #include "Vertex.h" #include "Stairs.h" #include "Square.h" //Name spaces using namespace std; //Constants const bool LINE = false; const bool STAIRS = false; const bool PLUS = true; const bool SQUARE = false; //Global variables declaration bool paintBoard[MAX_X+1][MAX_Y+1]; //Methods declaration void clearBoard(); void printBoard(); void sleep(unsigned int mseconds); void gotoTop(); void print_data(Vertex x) { float x1 = x._x; float x2 = x._y; cout << "------------------------------------------\n" <<"cord 1: " << x1 << "\n" <<"cord 2: " << x2 << "\n" << "\n"; } int main(){ clearBoard(); if(LINE){ srand ((int)(time(0))); cout << time(0) << "\n"; cout << "Please enter x and y coordinates for one end of the line separated by spaces:" << endl; float x0,y0,x1,y1; cin >> x0 >> y0; cout << "Please enter x and y coordinates for the second end of the line:" << endl; cin >> x1 >> y1; Line inputLine = Line(x0,y0,x1,y1); clearBoard(); inputLine.draw(paintBoard); printBoard(); Vertex a1; a1._x= x0; a1._y = y0; //while(x1 != 99 && y1 != 99) //{ for(int op=0;op<360;op=op+5) { inputLine = Line(a1,7,(float)op); clearBoard(); inputLine.draw(paintBoard); printBoard(); print_data(inputLine.getEnd1()); print_data(inputLine.getEnd2()); gotoTop(); sleep(100); } /* cout << "Please enter Lentgh and Zavit" << endl; cout << "Cancel : Enter : 99 99" << endl; y1++; //cin >> x1 >> y1; inputLine = Line(a1,7,y1); clearBoard(); inputLine.draw(paintBoard); printBoard(); print_data(inputLine.getEnd1()); print_data(inputLine.getEnd2()); */ //} Vertex v1; Vertex v2; v1._x = (float)(rand()% 70); v2._x = (float)(rand()% 70); v1._y = (float)(rand()% 50); v2._y = (float)(rand()% 50); Line inputLine1 = Line(v1,v2); print_data(inputLine1.getEnd1()); print_data(inputLine1.getEnd2()); inputLine1.draw(paintBoard); printBoard(); clearBoard(); /* Vertex v_arr[1]; v_arr[0]._x = (float)(rand()% 70); v_arr[1]._x = (float)(rand()% 70); v_arr[0]._y = (float)(rand()% 50); v_arr[1]._y = (float)(rand()% 50); Line inputLine2 = Line(v_arr); print_data(inputLine2.getEnd1()); print_data(inputLine2.getEnd2()); inputLine2.draw(paintBoard); printBoard(); clearBoard(); */ Vertex v3; for(int op=0;op<0;op++) { float ll = (float)(rand()%20) + 1; v3._x = (float)(rand()% 70); v3._y = (float)(rand()% 50); float grad =(float)(rand()% 359)+1; Line inputLine4 = Line(v3,ll,grad); print_data(inputLine4.getEnd1()); print_data(inputLine4.getEnd2()); inputLine4.draw(paintBoard); printBoard(); clearBoard(); } } if (SQUARE){ Vertex tl,shift; tl._x = 0.0; tl._y = 0.0; shift._x = 2.0; shift._y = 1.0; clearBoard(); Square mySquare = Square(tl,5); mySquare.draw(paintBoard); printBoard(); gotoTop(); sleep(100); for (int i=0; i< 100; i++) { clearBoard(); mySquare.move(shift); mySquare.draw(paintBoard); printBoard(); gotoTop(); sleep(100); } } if (PLUS){ Vertex t2; Vertex shift; shift._x = 0; shift._y = -1; float delta = 1; t2._x = 20.0; t2._y = 25.0; Plus myPlus = Plus(t2,2); clearBoard(); myPlus.draw(paintBoard); printBoard(); sleep(1000); print_data(myPlus.getTopLeft()); clearBoard(); myPlus.grow(delta); gotoTop(); sleep(3000); gotoTop(); for (int i=0; i< 100; i++) { //myPlus.move(shift); //clearBoard(); //myPlus.draw(paintBoard); //printBoard(); ////todo //sleep(1); //gotoTop(); myPlus.grow(delta); clearBoard(); myPlus.draw(paintBoard); printBoard(); gotoTop(); sleep(100); } } if (STAIRS){ Vertex t2; t2._x = 40.0; t2._y = 30.0; Stairs myStairs = Stairs(t2,2,7,2); myStairs.rotate(0); myStairs.draw(paintBoard); printBoard(); clearBoard(); gotoTop(); sleep(9000); myStairs.rotate(-90); myStairs.draw(paintBoard); printBoard(); clearBoard(); gotoTop(); //float hh,ww; //int st; srand ((int)(time(0))); for (int i=0; i< 60; i++) { clearBoard(); Vertex pp; pp._x = -1; pp._y = 0; myStairs.move(pp); myStairs.draw(paintBoard); printBoard(); sleep(1); gotoTop(); myStairs.rotate(-90); myStairs.draw(paintBoard); printBoard(); clearBoard(); gotoTop(); } for (int i=0; i< 60; i++) { clearBoard(); Vertex pp; pp._x = 1; pp._y = 0; myStairs.move(pp); myStairs.draw(paintBoard); printBoard(); sleep(1); gotoTop(); } for (int i=0; i< 90; i++) { clearBoard(); Vertex pp; pp._x = 0; pp._y = -1; myStairs.move(pp); myStairs.draw(paintBoard); printBoard(); sleep(1); gotoTop(); } for (int i=0; i< 90; i++) { clearBoard(); Vertex pp; pp._x = 0; pp._y = 1; myStairs.move(pp); myStairs.draw(paintBoard); printBoard(); sleep(1); gotoTop(); } } return 0; } /* * Clears the board. */ void clearBoard(){ for(int i=0;i<=MAX_X;i++){ for(int j=0;j<=MAX_Y;j++){ paintBoard[i][j]= false; } } } /* * Prints the board to the standart output. */ void printBoard(){ for(int j=0;j<=MAX_Y;j++){ for(int i=0;i<=MAX_X;i++){ if(paintBoard[i][j]) cout << '*'; else{ //Draw the axes (i==0) ? cout << setw(3) << j << '|' : ((j==0) ? cout << '-' : cout << '#'); } } cout << endl; } } /* * Delay method, Used for the animation */ void sleep(unsigned int mseconds) { clock_t goal = mseconds + (clock()); while (goal > clock()); } /* * Places the cursor in the top left corner of the console screen */ void gotoTop() { HANDLE screen_buffer_handle = GetStdHandle(STD_OUTPUT_HANDLE); COORD coord; coord.X = 0; coord.Y = 0; SetConsoleCursorPosition(screen_buffer_handle, coord); }
[ "[email protected]@915c7e4a-0830-d67a-7742-9bd6d4e428b7", "[email protected]@915c7e4a-0830-d67a-7742-9bd6d4e428b7" ]
[ [ [ 1, 20 ], [ 25, 165 ], [ 168, 168 ], [ 179, 180 ], [ 182, 184 ], [ 186, 191 ], [ 194, 195 ], [ 202, 202 ], [ 208, 210 ], [ 214, 214 ], [ 221, 222 ], [ 226, 226 ], [ 231, 232 ], [ 234, 234 ], [ 237, 245 ], [ 248, 250 ], [ 254, 254 ], [ 260, 263 ], [ 265, 266 ], [ 287, 287 ], [ 302, 302 ], [ 315, 315 ], [ 323, 324 ], [ 327, 327 ], [ 333, 371 ], [ 373, 389 ] ], [ [ 21, 24 ], [ 166, 167 ], [ 169, 178 ], [ 181, 181 ], [ 185, 185 ], [ 192, 193 ], [ 196, 201 ], [ 203, 207 ], [ 211, 213 ], [ 215, 220 ], [ 223, 225 ], [ 227, 230 ], [ 233, 233 ], [ 235, 236 ], [ 246, 247 ], [ 251, 253 ], [ 255, 259 ], [ 264, 264 ], [ 267, 286 ], [ 288, 301 ], [ 303, 314 ], [ 316, 322 ], [ 325, 326 ], [ 328, 332 ], [ 372, 372 ] ] ]
7f9befc231fed88176b1741fa74854e50ede3b78
eb9c9c17a5266763562e53098e70128dab7043a7
/src/vgUtil/vgConsole.cpp
a9394df079356e8deb845e5c6b07f49a9e97837d
[]
no_license
kimmyungwon/videogear
36b80c1c346ed14f923bd7e05e84a72cd5cacde6
e5f35adb7d561bfc1c6ecf61900ad7a45d02dc88
refs/heads/master
2016-09-06T09:49:37.589673
2010-05-11T07:06:47
2010-05-11T07:06:47
35,530,887
0
0
null
null
null
null
UTF-8
C++
false
false
668
cpp
#include "vgConsole.h" VG_NAMESPACE_BEGIN Console& Console::GetInstance( void ) { static Console instance; return instance; } void Console::Print( const wchar_t *format, ... ) { va_list args; va_start(args, format); int length = _vscwprintf(format, args) + 1; wchar_t *message = (wchar_t*)calloc(length, sizeof(wchar_t)); vswprintf_s(message, length, format, args); DWORD writtenChars; WriteConsoleW(m_outputHandle, message, length - 1, &writtenChars, NULL); #ifdef _DEBUG OutputDebugStringW(message); #endif free(message); } Console::Console( void ) { m_outputHandle = GetStdHandle(STD_OUTPUT_HANDLE); } VG_NAMESPACE_END
[ "[email protected]@e2f205af-d647-0410-b852-25b4803e6a9f" ]
[ [ [ 1, 31 ] ] ]
dd091e6517c05d54443f53aa68cf6d5dea887460
252e638cde99ab2aa84922a2e230511f8f0c84be
/toollib/src/SessionDateForm.cpp
f6f62e7a9a00373c8aa79a1e00c72d96b2756641
[]
no_license
openlab-vn-ua/tour
abbd8be4f3f2fe4d787e9054385dea2f926f2287
d467a300bb31a0e82c54004e26e47f7139bd728d
refs/heads/master
2022-10-02T20:03:43.778821
2011-11-10T12:58:15
2011-11-10T12:58:15
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,635
cpp
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "StdTool.h" #include "SessionDateForm.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TTourSessionDateForm *TourSessionDateForm = NULL; //--------------------------------------------------------------------------- __fastcall TTourSessionDateForm::TTourSessionDateForm(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TTourSessionDateForm::TimerTimer(TObject *Sender) { FunctionArgUsedSkip(Sender); DateLabel->Caption = Date().FormatString("dd' 'mmmm' 'yyyy (dddd)"); } //--------------------------------------------------------------------------- void __fastcall TTourSessionDateForm::FormCloseQuery(TObject *Sender, bool &CanClose) { FunctionArgUsedSkip(Sender); Timer->Enabled = false; } //--------------------------------------------------------------------------- void __fastcall TTourSessionDateForm::FormShow(TObject *Sender) { FunctionArgUsedSkip(Sender); DateLabel->Caption = Date().FormatString("dd' 'mmmm' 'yyyy (dddd)"); Timer->Enabled = true; } //--------------------------------------------------------------------------- void __fastcall TTourSessionDateForm::FormClose(TObject *Sender, TCloseAction &Action) { Action = caFree; TourSessionDateForm = NULL; } //---------------------------------------------------------------------------
[ [ [ 1, 50 ] ] ]
0a951b3d2ed0c097298618819b0c29b13f926c0a
0f8559dad8e89d112362f9770a4551149d4e738f
/Wall_Destruction/Havok/Source/Physics/Collide/Query/Collector/PointCollector/hkpRootCdPoint.inl
5c9dcd5678ca5026a9b21b487d9e31416d33e7b2
[]
no_license
TheProjecter/olafurabertaymsc
9360ad4c988d921e55b8cef9b8dcf1959e92d814
456d4d87699342c5459534a7992f04669e75d2e1
refs/heads/master
2021-01-10T15:15:49.289873
2010-09-20T12:58:48
2010-09-20T12:58:48
45,933,002
0
0
null
null
null
null
UTF-8
C++
false
false
1,314
inl
/* * * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's * prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok. * Level 2 and Level 3 source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2009 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement. * */ inline hkBool hkpRootCdPoint::operator<( const hkpRootCdPoint& b ) const { return m_contact.getDistance() < b.m_contact.getDistance(); } /* * Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20091222) * * Confidential Information of Havok. (C) Copyright 1999-2009 * Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok * Logo, and the Havok buzzsaw logo are trademarks of Havok. Title, ownership * rights, and intellectual property rights in the Havok software remain in * Havok and/or its suppliers. * * Use of this software for evaluation purposes is subject to and indicates * acceptance of the End User licence Agreement for this product. A copy of * the license is included with this software and is also available at www.havok.com/tryhavok. * */
[ [ [ 1, 27 ] ] ]
41b7d419b1920fe96040664650a02d3bd7280259
0f40e36dc65b58cc3c04022cf215c77ae31965a8
/src/apps/vis/properties/vis_properties_init.h
f8317648dbc7dec9338b33fd220dff5ed74431b2
[ "MIT", "BSD-3-Clause" ]
permissive
venkatarajasekhar/shawn-1
08e6cd4cf9f39a8962c1514aa17b294565e849f8
d36c90dd88f8460e89731c873bb71fb97da85e82
refs/heads/master
2020-06-26T18:19:01.247491
2010-10-26T17:40:48
2010-10-26T17:40:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,330
h
/************************************************************************ ** This file is part of the network simulator Shawn. ** ** Copyright (C) 2004,2005 by SwarmNet (www.swarmnet.de) ** ** and SWARMS (www.swarms.de) ** ** Shawn is free software; you can redistribute it and/or modify it ** ** under the terms of the GNU General Public License, version 2. ** ************************************************************************/ #ifndef __SHAWN_TUBSAPPS_VIS_PROPERTIES_INIT_H #define __SHAWN_TUBSAPPS_VIS_PROPERTIES_INIT_H #include "../buildfiles/_apps_enable_cmake.h" #ifdef ENABLE_VIS namespace shawn { class SimulationController; } namespace vis { void init_vis_properties( shawn::SimulationController& ); } #endif #endif /*----------------------------------------------------------------------- * Source $Source: /cvs/shawn/shawn/tubsapps/vis/properties/vis_properties_init.h,v $ * Version $Revision: 1.1 $ * Date $Date: 2006/01/29 21:02:01 $ *----------------------------------------------------------------------- * $Log: vis_properties_init.h,v $ * Revision 1.1 2006/01/29 21:02:01 ali * began vis * *-----------------------------------------------------------------------*/
[ [ [ 1, 35 ] ] ]
464d8e055ffed0b07e772405fcf748209ed8df1e
ea12fed4c32e9c7992956419eb3e2bace91f063a
/zombie/code/zombie/ngeomipmap/src/ngeomipmap/nterrainmaterial_cmds.cc
e69da876689421589e05e9203c343b919a466b8f
[]
no_license
ugozapad/TheZombieEngine
832492930df28c28cd349673f79f3609b1fe7190
8e8c3e6225c2ed93e07287356def9fbdeacf3d6a
refs/heads/master
2020-04-30T11:35:36.258363
2011-02-24T14:18:43
2011-02-24T14:18:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,901
cc
#include "precompiled/pchngeomipmap.h" //------------------------------------------------------------------------------ // nterrainmaterial_cmds.cc // (C) 2005 Conjurer Services, S.A. //------------------------------------------------------------------------------ #include "ngeomipmap/nterrainmaterial.h" #include "kernel/npersistserver.h" #include "gameplay/ngamematerial.h" //------------------------------------------------------------------------------ /** Nebula class scripting initialization */ NSCRIPT_INITCMDS_BEGIN( nTerrainMaterial ) NSCRIPT_ADDCMD('BLRE', bool, LoadResources, 0, (), 0, ()); NSCRIPT_ADDCMD('STFN', void, SetTextureFileName, 1, (const char *), 0, ()); NSCRIPT_ADDCMD('GTFN', const nString &, GetTextureFileName , 0, (), 0, ()); NSCRIPT_ADDCMD('SPRJ', void, SetProjection, 1, (int), 0, ()); NSCRIPT_ADDCMD('GPRJ', int, GetProjection , 0, (), 0, ()); NSCRIPT_ADDCMD('SUVS', void, SetUVScale, 1, (vector2), 0, ()); NSCRIPT_ADDCMD('GUVS', vector2, GetUVScale , 0, (), 0, ()); NSCRIPT_ADDCMD('GLHN', nTerrainMaterial::LayerHandle, GetLayerHandle, 0, (), 0, ()); NSCRIPT_ADDCMD('SLHN', void, SetLayerHandle, 1, (int), 0, ()); NSCRIPT_ADDCMD('BSGM', void, SetGameMaterialByName, 1, (const char *), 0, ()); NSCRIPT_ADDCMD('BGMN', const char * , GetGameMaterialName, 0, (), 0, ()); NSCRIPT_ADDCMD('BGGM', nGameMaterial *, GetGameMaterial, 0, (), 0, ()); NSCRIPT_ADDCMD('GTTP', nString, GetTextureThumbnail, 1, (int), 0, ()); NSCRIPT_ADDCMD('SCOL', void, SetMaskColor, 1, (vector4), 0, ()); NSCRIPT_ADDCMD('GCOL', vector4, GetMaskColor , 0, (), 0, ()); NSCRIPT_ADDCMD('SLAB', void, SetLabel, 1, (nString), 0, ()); NSCRIPT_ADDCMD('GLAB', nString, GetLabel , 0, (), 0, ()); NSCRIPT_ADDCMD('SLAP', void, SetLayerPath, 1, (const nString &), 0, ()); NSCRIPT_ADDCMD('GLAP', const nString &, GetLayerPath, 0, (), 0, ()); NSCRIPT_ADDCMD('SLUP', void, SetLayerUsePath, 1, (const nString &), 0, ()); NSCRIPT_ADDCMD('GLUP', const nString &, GetLayerUsePath, 0, (), 0, ()); NSCRIPT_INITCMDS_END() //------------------------------------------------------------------------------ /** Nebula class persistence */ bool nTerrainMaterial::SaveCmds(nPersistServer * ps) { if (nObject::SaveCmds(ps)) { nCmd * cmd; // --- SetLayerHandle cmd = ps->GetCmd(this, 'SLHN'); cmd->In()->SetI( this->GetLayerHandle() ); ps->PutCmd( cmd ); // --- SetTextureFileName cmd = ps->GetCmd(this, 'STFN'); cmd->In()->SetS( this->GetTextureFileName().Get() ); ps->PutCmd( cmd ); // --- SetProjection cmd = ps->GetCmd(this, 'SPRJ'); cmd->In()->SetI( this->GetProjection() ); ps->PutCmd( cmd ); // --- SetUVScale cmd = ps->GetCmd(this, 'SUVS'); cmd->In()->SetF( this->GetUVScale().x ); cmd->In()->SetF( this->GetUVScale().y ); ps->PutCmd( cmd ); // --- SetMaskColor cmd = ps->GetCmd(this, 'SCOL'); cmd->In()->SetF( this->GetMaskColor().x ); cmd->In()->SetF( this->GetMaskColor().y ); cmd->In()->SetF( this->GetMaskColor().z ); cmd->In()->SetF( this->GetMaskColor().w ); ps->PutCmd( cmd ); // --- SetLabel cmd = ps->GetCmd(this, 'SLAB'); cmd->In()->SetS( this->GetLabel().Get() ); ps->PutCmd( cmd ); /// Set game material name if (!this->gameMaterialName.IsEmpty()) { ps->Put(this, 'BSGM', this->gameMaterialName.Get()); } return true; } return false; } //------------------------------------------------------------------------------ // EOF //------------------------------------------------------------------------------
[ "magarcias@c1fa4281-9647-0410-8f2c-f027dd5e0a91" ]
[ [ [ 1, 96 ] ] ]
598131b0a76401a2376938ae3496c6c5ab62b955
b14d5833a79518a40d302e5eb40ed5da193cf1b2
/cpp/extern/xercesc++/2.6.0/samples/SAXCount/SAXCountHandlers.cpp
da0e0850d268d9a2aa9ed12c1d2898caa32f3dd5
[ "Apache-2.0" ]
permissive
andyburke/bitflood
dcb3fb62dad7fa5e20cf9f1d58aaa94be30e82bf
fca6c0b635d07da4e6c7fbfa032921c827a981d6
refs/heads/master
2016-09-10T02:14:35.564530
2011-11-17T09:51:49
2011-11-17T09:51:49
2,794,411
1
0
null
null
null
null
UTF-8
C++
false
false
4,500
cpp
/* * Copyright 1999-2000,2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * $Log: SAXCountHandlers.cpp,v $ * Revision 1.7 2004/09/08 13:55:33 peiyongz * Apache License Version 2.0 * * Revision 1.6 2003/05/30 09:36:36 gareth * Use new macros for iostream.h and std:: issues. * * Revision 1.5 2002/02/01 22:41:07 peiyongz * sane_include * * Revision 1.4 2001/08/02 17:10:29 tng * Allow DOMCount/SAXCount/IDOMCount/SAX2Count to take a file that has a list of xml file as input. * * Revision 1.3 2000/03/02 19:53:47 roddey * This checkin includes many changes done while waiting for the * 1.1.0 code to be finished. I can't list them all here, but a list is * available elsewhere. * * Revision 1.2 2000/02/06 07:47:23 rahulj * Year 2K copyright swat. * * Revision 1.1.1.1 1999/11/09 01:09:31 twl * Initial checkin * * Revision 1.8 1999/11/08 20:43:40 rahul * Swat for adding in Product name and CVS comment log variable. * */ // --------------------------------------------------------------------------- // Includes // --------------------------------------------------------------------------- #include "SAXCount.hpp" #include <xercesc/sax/AttributeList.hpp> #include <xercesc/sax/SAXParseException.hpp> #include <xercesc/sax/SAXException.hpp> // --------------------------------------------------------------------------- // SAXCountHandlers: Constructors and Destructor // --------------------------------------------------------------------------- SAXCountHandlers::SAXCountHandlers() : fElementCount(0) , fAttrCount(0) , fCharacterCount(0) , fSpaceCount(0) , fSawErrors(false) { } SAXCountHandlers::~SAXCountHandlers() { } // --------------------------------------------------------------------------- // SAXCountHandlers: Implementation of the SAX DocumentHandler interface // --------------------------------------------------------------------------- void SAXCountHandlers::startElement(const XMLCh* const name , AttributeList& attributes) { fElementCount++; fAttrCount += attributes.getLength(); } void SAXCountHandlers::characters( const XMLCh* const chars , const unsigned int length) { fCharacterCount += length; } void SAXCountHandlers::ignorableWhitespace( const XMLCh* const chars , const unsigned int length) { fSpaceCount += length; } void SAXCountHandlers::resetDocument() { fAttrCount = 0; fCharacterCount = 0; fElementCount = 0; fSpaceCount = 0; } // --------------------------------------------------------------------------- // SAXCountHandlers: Overrides of the SAX ErrorHandler interface // --------------------------------------------------------------------------- void SAXCountHandlers::error(const SAXParseException& e) { fSawErrors = true; XERCES_STD_QUALIFIER cerr << "\nError at file " << StrX(e.getSystemId()) << ", line " << e.getLineNumber() << ", char " << e.getColumnNumber() << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl; } void SAXCountHandlers::fatalError(const SAXParseException& e) { fSawErrors = true; XERCES_STD_QUALIFIER cerr << "\nFatal Error at file " << StrX(e.getSystemId()) << ", line " << e.getLineNumber() << ", char " << e.getColumnNumber() << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl; } void SAXCountHandlers::warning(const SAXParseException& e) { XERCES_STD_QUALIFIER cerr << "\nWarning at file " << StrX(e.getSystemId()) << ", line " << e.getLineNumber() << ", char " << e.getColumnNumber() << "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl; } void SAXCountHandlers::resetErrors() { fSawErrors = false; }
[ [ [ 1, 138 ] ] ]
9dd62aadf1d41ea49678012e9f9ac6713eea5977
94e2f239425cfafa921eb686bf7697d92c7a8d74
/jni/baby-engine/AndcopterRenderer.cpp
e6ea697f30b07167413976ba216856d94f771fea
[]
no_license
parthmpandya/and-copter
f7814abf9942f0b0797b640fccfb2b183296a405
551be6c170f7a6562d0f2f093d431878078151bc
refs/heads/master
2020-05-31T13:27:38.418214
2011-07-20T18:50:07
2011-07-20T18:50:07
40,241,068
0
0
null
null
null
null
UTF-8
C++
false
false
964
cpp
#include "AndcopterRenderer.h" void AndcopterRenderer::onCreate() { glClearColor(0, 0, 0, 0.5f); glClearDepthf(1.0f); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); } void AndcopterRenderer::onSurfaceChange(int width, int height) { glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); float aspect = (float) width / height; gluPerspective(fov_y, aspect, 0.1f, 10.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); float gameHeight = (float)(-z_distance * (tan(fov_y * M_PI / 360))) * 2; float gameWidth = gameHeight * aspect; if (!game) { game = new Game(gameWidth, gameHeight); } else { game->onScreenSizeChanged(gameWidth, gameHeight); } } void AndcopterRenderer::onDraw() { glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); glTranslatef(0, 0, z_distance); if (game) { game->draw(); } glLoadIdentity(); }
[ [ [ 1, 38 ] ] ]
5020577bb4151e1f75af6944b8e2b4ada8b7bd78
1960e1ee431d2cfd2f8ed5715a1112f665b258e3
/inc/util/registryutil.h
5c2499df76681f0b354df9437354ab02db054c62
[]
no_license
BackupTheBerlios/bvr20983
c26a1379b0a62e1c09d1428525f3b4940d5bb1a7
b32e92c866c294637785862e0ff9c491705c62a5
refs/heads/master
2021-01-01T16:12:42.021350
2009-11-01T22:38:40
2009-11-01T22:38:40
39,518,214
0
0
null
null
null
null
UTF-8
C++
false
false
3,262
h
/* * $Id$ * * Copyright (C) 2008 Dorothea Wachmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see http://www.gnu.org/licenses/. */ #if !defined(REGISTRYUTIL_H) #define REGISTRYUTIL_H #include "os.h" #include "util/logstream.h" #include "util/registry.h" #include <iostream> #include <fstream> #include <stack> namespace bvr20983 { class RegistryUtil { public: enum COMRegistrationType { CLASSES_ROOT, PER_MACHINE, PER_USER, AUTO }; static void RegisterComObjectsInTypeLibrary(Registry& reg, LPCTSTR szModulePath, COMRegistrationType registrationType=CLASSES_ROOT ); static void RegisterCoClass(Registry& reg, TLIBATTR* pTypeLib,LPCTSTR typelibName, REFGUID typeGUID,LPCTSTR typeName,LPCTSTR typeDesc,WORD typeVersion, LPCTSTR modulePath, ITypeInfo2& rTypeInfo2, bool isControl=false, COMRegistrationType registrationType=CLASSES_ROOT, LPCTSTR threadingModel=_T("Apartment") ); static void RegisterInterface(Registry& reg, REFGUID typelibGUID, WORD majorVersion,WORD minorVersion, REFGUID typeGUID,LPCTSTR typeName,LPCTSTR typeDesc, COMRegistrationType registrationType=CLASSES_ROOT ); static void RegisterTypeLib(Registry& registry, LPCTSTR typelibDesc, REFGUID typelibGUID, LCID lcid,USHORT majorVersion,USHORT minorVersion, LPCTSTR modulePath,LPCTSTR helpPath, COMRegistrationType registrationType=CLASSES_ROOT ); static void GetKeyPrefix(COMRegistrationType registrationType,TString& keyPrefix); static void RegisterTypeLib(bool register4User,REFGUID typelibGUID,LCID lcid,USHORT majorVersion,USHORT minorVersion,LPCTSTR modulePath,LPCTSTR helpPath); }; // of class RegistryUtil } // of namespace bvr20983 #endif // REGISTRYUTIL_H //=================================END-OF-FILE==============================
[ "dwachmann@01137330-e44e-0410-aa50-acf51430b3d2" ]
[ [ [ 1, 77 ] ] ]
9a30da1e8f29f051e4992a11fb9fa48b510ee7fd
16d6176d43bf822ad8d86d4363c3fee863ac26f9
/hw4-predhru/submission_files/hw4-predhru1/Camera.h
c866140769a22126d753fd805fac8d79871239c3
[]
no_license
preethinarayan/cgraytracer
7a0a16e30ef53075644700494b2f8cf2a0693fbd
46a4a22771bd3f71785713c31730fdd8f3aebfc7
refs/heads/master
2016-09-06T19:28:04.282199
2008-12-10T00:02:32
2008-12-10T00:02:32
32,247,889
0
0
null
null
null
null
UTF-8
C++
false
false
637
h
#include "nv/nv_math.h" #include "nv/nv_algebra.h" #include <math.h> #pragma once #include "SceneObjs.h" #include <stdlib.h> //#define WIDTH 640 //#define HEIGHT 480 class CameraRay { private: vec3 u,v,w; float fov; public: vec3 eye; vec3 center; vec3 up; CameraRay(); CameraRay(vec3 eye, vec3 center, vec3 up, float _fov); vec3 calcRays(Scene *scene,int i,int j); vec3 getEye(){return eye;} Ray ray; void generateRays(Scene *scene); vec3 getRayIntersection(Ray *ray,int depth, bool secLargest,Scene *scene); bool Intersection(Ray *R, vec3 *pt, bool secLargest,Scene *scene); };
[ "[email protected]@074c0a88-b503-11dd-858c-a3a1ac847323", "dhrumins@074c0a88-b503-11dd-858c-a3a1ac847323" ]
[ [ [ 1, 9 ], [ 12, 27 ], [ 29, 35 ] ], [ [ 10, 11 ], [ 28, 28 ] ] ]
21e77635fd58ce010d94e2b7452a71efa3d4d99c
b73f27ba54ad98fa4314a79f2afbaee638cf13f0
/projects/MainUI/DlgImageRule.h
c1dc328686c1939d146fc0c0f3d314d6e55a2df6
[]
no_license
weimingtom/httpcontentparser
4d5ed678f2b38812e05328b01bc6b0c161690991
54554f163b16a7c56e8350a148b1bd29461300a0
refs/heads/master
2021-01-09T21:58:30.326476
2009-09-23T08:05:31
2009-09-23T08:05:31
48,733,304
3
0
null
null
null
null
GB18030
C++
false
false
1,726
h
#pragma once #include ".\basedlg.h" #include "afxwin.h" #include "afxcmn.h" // CDlgImageRule 对话框 class CDlgImageRule : public CBaseDlg { DECLARE_DYNAMIC(CDlgImageRule) public: CDlgImageRule(CWnd* pParent = NULL); // 标准构造函数 virtual ~CDlgImageRule(); virtual std::string getHelpLink() const; // 对话框数据 enum { IDD = IDD_DLG_IMAGERULES }; virtual INT_PTR OnApply(); virtual void OnShow(); protected: virtual void restoreSetting(); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 virtual BOOL OnInitDialog(); DECLARE_MESSAGE_MAP() protected: CButton m_chkJPEG; CButton m_chkGIF; CButton m_chkBMP; CButton m_chkPNG; CStatic m_staImageCheck; CStatic m_staImageSize; CStatic m_staImageType; CSliderCtrl m_sliderImageCheckDegree; CEdit m_editMin; CEdit m_editMax; CButton m_chkEnableScopeCheck; CSpinButtonCtrl m_spinBtnMin; CSpinButtonCtrl m_spinBtnMax; BOOL m_bCheckGIF; BOOL m_bCheckJPEG; BOOL m_bCheckBMP; BOOL m_bCheckPNG; long scope_min_; long scope_max_; public: afx_msg void OnBnClickedChkJpeg(); afx_msg void OnBnClickedChkGif(); afx_msg void OnBnClickedChkBmp(); afx_msg void OnBnClickedChkPng(); afx_msg void OnEnChangeEdit2(); afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnBnClickedChkEnableSizeCheck(); protected: // 使相关控件可用 void enableScopeCheck(bool enabled); void ApplyCOMService(); public: virtual BOOL PreTranslateMessage(MSG* pMsg); afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); };
[ "ynkhpp@1a8edc88-4151-0410-b40c-1915dda2b29b", "[email protected]" ]
[ [ [ 1, 3 ], [ 5, 15 ], [ 18, 20 ], [ 22, 22 ], [ 25, 26 ], [ 28, 29 ], [ 35, 35 ], [ 45, 45 ], [ 69, 69 ] ], [ [ 4, 4 ], [ 16, 17 ], [ 21, 21 ], [ 23, 24 ], [ 27, 27 ], [ 30, 34 ], [ 36, 44 ], [ 46, 68 ] ] ]
ce69400f286d856905f3cc6db75628ab402655da
4aadb120c23f44519fbd5254e56fc91c0eb3772c
/Source/mgf/common/KeyCodes.h
94353b89706e1dbb1f7e9ae85719951070e8ca48
[]
no_license
janfietz/edunetgames
d06cfb021d8f24cdcf3848a59cab694fbfd9c0ba
04d787b0afca7c99b0f4c0692002b4abb8eea410
refs/heads/master
2016-09-10T19:24:04.051842
2011-04-17T11:00:09
2011-04-17T11:00:09
33,568,741
0
0
null
null
null
null
UTF-8
C++
false
false
8,128
h
#ifndef __KEYCODES_H__ #define __KEYCODES_H__ //----------------------------------------------------------------------------- // Copyright (c) 2009, Jan Fietz, Cyrus Preuss // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of RockNet nor the names of its contributors // may be used to endorse or promote products derived from this software // without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //----------------------------------------------------------------------------- namespace mgf { enum EType { KEY_TYPE_KEYDOWN, KEY_TYPE_CHAR, KEY_TYPE_KEYUP }; enum EKey { KEY_ESCAPE =0x01, KEY_1 =0x02, KEY_2 =0x03, KEY_3 =0x04, KEY_4 =0x05, KEY_5 =0x06, KEY_6 =0x07, KEY_7 =0x08, KEY_8 =0x09, KEY_9 =0x0A, KEY_0 =0x0B, KEY_MINUS =0x0C, // - on main keyboard KEY_EQUALS =0x0D, KEY_BACKSPACE =0x0E, // Backspace KEY_TAB =0x0F, KEY_Q =0x10, KEY_W =0x11, KEY_E =0x12, KEY_R =0x13, KEY_T =0x14, KEY_Y =0x15, KEY_U =0x16, KEY_I =0x17, KEY_O =0x18, KEY_P =0x19, KEY_LBRACKET =0x1A, KEY_RBRACKET =0x1B, KEY_RETURN =0x1C, // Enter on main keyboard KEY_LCONTROL =0x1D, KEY_A =0x1E, KEY_S =0x1F, KEY_D =0x20, KEY_F =0x21, KEY_G =0x22, KEY_H =0x23, KEY_J =0x24, KEY_K =0x25, KEY_L =0x26, KEY_SEMICOLON =0x27, KEY_APOSTROPHE =0x28, KEY_GRAVE =0x29, // Accent Grave KEY_LSHIFT =0x2A, KEY_BACKSLASH =0x2B, KEY_Z =0x2C, KEY_X =0x2D, KEY_C =0x2E, KEY_V =0x2F, KEY_B =0x30, KEY_N =0x31, KEY_M =0x32, KEY_COMMA =0x33, KEY_PERIOD =0x34, // . on main keyboard KEY_SLASH =0x35, // / on main keyboard KEY_RSHIFT =0x36, KEY_MULTIPLY =0x37, // * on numeric keypad KEY_LMENU =0x38, // left Alt KEY_SPACE =0x39, KEY_CAPITAL =0x3A, KEY_F1 =0x3B, KEY_F2 =0x3C, KEY_F3 =0x3D, KEY_F4 =0x3E, KEY_F5 =0x3F, KEY_F6 =0x40, KEY_F7 =0x41, KEY_F8 =0x42, KEY_F9 =0x43, KEY_F10 =0x44, KEY_NUMLOCK =0x45, KEY_SCROLL =0x46, // Scroll Lock KEY_NUMPAD7 =0x47, KEY_NUMPAD8 =0x48, KEY_NUMPAD9 =0x49, KEY_SUBTRACT =0x4A, // - on numeric keypad KEY_NUMPAD4 =0x4B, KEY_NUMPAD5 =0x4C, KEY_NUMPAD6 =0x4D, KEY_ADD =0x4E, // + on numeric keypad KEY_NUMPAD1 =0x4F, KEY_NUMPAD2 =0x50, KEY_NUMPAD3 =0x51, KEY_NUMPAD0 =0x52, KEY_DECIMAL =0x53, // . on numeric keypad KEY_OEM_102 =0x56, // < > | on UK/Germany keyboards KEY_F11 =0x57, KEY_F12 =0x58, KEY_F13 =0x64, // (NEC PC98) KEY_F14 =0x65, // (NEC PC98) KEY_F15 =0x66, // (NEC PC98) KEY_KANA =0x70, // (Japanese keyboard) KEY_ABNT_C1 =0x73, // / ? on Portugese (Brazilian) keyboards KEY_CONVERT =0x79, // (Japanese keyboard) KEY_NOCONVERT =0x7B, // (Japanese keyboard) KEY_YEN =0x7D, // (Japanese keyboard) KEY_ABNT_C2 =0x7E, // Numpad . on Portugese (Brazilian) keyboards KEY_NUMPADEQUALS=0x8D, // = on numeric keypad (NEC PC98) KEY_PREVTRACK =0x90, // Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) KEY_AT =0x91, // (NEC PC98) KEY_COLON =0x92, // (NEC PC98) KEY_UNDERLINE =0x93, // (NEC PC98) KEY_KANJI =0x94, // (Japanese keyboard) KEY_STOP =0x95, // (NEC PC98) KEY_AX =0x96, // (Japan AX) KEY_UNLABELED =0x97, // (J3100) KEY_NEXTTRACK =0x99, // Next Track KEY_NUMPADENTER =0x9C, // Enter on numeric keypad KEY_RCONTROL =0x9D, KEY_MUTE =0xA0, // Mute KEY_CALCULATOR =0xA1, // Calculator KEY_PLAYPAUSE =0xA2, // Play / Pause KEY_MEDIASTOP =0xA4, // Media Stop KEY_VOLUMEDOWN =0xAE, // Volume - KEY_VOLUMEUP =0xB0, // Volume + KEY_WEBHOME =0xB2, // Web home KEY_NUMPADCOMMA =0xB3, // , on numeric keypad (NEC PC98) KEY_DIVIDE =0xB5, // / on numeric keypad KEY_SYSRQ =0xB7, KEY_RMENU =0xB8, // right Alt KEY_PAUSE =0xC5, // Pause KEY_HOME =0xC7, // Home on arrow keypad KEY_UP =0xC8, // UpArrow on arrow keypad KEY_PGUP =0xC9, // PgUp on arrow keypad KEY_LEFT =0xCB, // LeftArrow on arrow keypad KEY_RIGHT =0xCD, // RightArrow on arrow keypad KEY_END =0xCF, // End on arrow keypad KEY_DOWN =0xD0, // DownArrow on arrow keypad KEY_PGDN =0xD1, // PgDn on arrow keypad KEY_INSERT =0xD2, // Insert on arrow keypad KEY_DELETE =0xD3, // Delete on arrow keypad KEY_LWIN =0xDB, // Left Windows key KEY_RWIN =0xDC, // Right Windows key KEY_APPS =0xDD, // AppMenu key KEY_POWER =0xDE, // System Power KEY_SLEEP =0xDF, // System Sleep KEY_WAKE =0xE3, // System Wake KEY_WEBSEARCH =0xE5, // Web Search KEY_WEBFAVORITES=0xE6, // Web Favorites KEY_WEBREFRESH =0xE7, // Web Refresh KEY_WEBSTOP =0xE8, // Web Stop KEY_WEBFORWARD =0xE9, // Web Forward KEY_WEBBACK =0xEA, // Web Back KEY_MYCOMPUTER =0xEB, // My Computer KEY_MAIL =0xEC, // Mail KEY_MEDIASELECT =0xED, // Media Select }; } #endif // __KEYCODES_H__
[ "janfietz@localhost" ]
[ [ [ 1, 190 ] ] ]
455d4104cce37e1a58cb9c02cbd205b1269473ef
d76a67033e3abf492ff2f22d38fb80de804c4269
/src/sdlmixer/love_sdlmixer.h
f232dd2754ee75e2390dee14043c5fc8cd7e5da0
[ "Zlib" ]
permissive
truthwzl/lov8
869a6be317b7d963600f2f88edaefdf9b5996f2d
579163941593bae481212148041e0db78270c21d
refs/heads/master
2021-01-10T01:58:59.103256
2009-12-16T16:00:09
2009-12-16T16:00:09
36,340,451
0
0
null
null
null
null
UTF-8
C++
false
false
2,628
h
/* * LOVE: Totally Awesome 2D Gaming. * Website: http://love.sourceforge.net * Licence: ZLIB/libpng * Copyright (c) 2006-2008 LOVE Development Team * * An interface for loading and playback of music * and sound files by means of SDL_mixer. Very * limited at the moment. * * @author Michael Enger * @author Anders Ruud * @date 2008-03-16 */ #ifndef LOVE_MOD_SDLMIXER_H #define LOVE_MOD_SDLMIXER_H // LOVE #include <love/mod.h> #include <love/File.h> // Module files. #include "Sound.h" #include "Music.h" // Creating a separate namespace to avoid conflicts // with standard library functions. namespace love_sdlmixer { // Standard module functions. bool module_init(int argc, char ** argv, love::Core * core); bool module_quit(); bool module_open(void * vm); bool module_open_v8(void * vm); /** * Gets a Sound object. **/ pSound newSound(const char * filename); /** * Gets a Music object. **/ pMusic newMusic(const char * filename); /** * Checks if audio is playing or not. **/ bool isPlaying(); /** * Checks if audio is paused or not. **/ bool isPaused(); /** * Pauses all audio. (Sound and Music). **/ void pause(); /** * Stops all audio. (Sound and Music). **/ void stop(); /** * Resumes all paused audio. (Sound and Music). **/ void resume(); /** * Sets the number of channels for sound effect mixing. * @param channels The amount of channels. **/ void setChannels(int channels); /** * Sets the audio mode. Note: This will stop any playing sounds and any changes in frequency will cause already created sound/music * to be played faster or slower, relative to their difference in frequency. * @param frequency The frequency (in Hz, could be AUDIO_QUALITY_LOW, AUDIO_QUALITY_MEDIUM, AUDIO_QUALITY_HIGH or custom value). * @param mode The audio mode (AUDIO_MODE_MONO, AUDIO_MODE_STEREO). * @param buffersize The size of the buffer (bytes per output per sample). **/ void setMode(int frequency, int mode, int buffersize); /** * Sets global volume. * @param volume The volume from 0.0 - 1.0. **/ void setVolume(float volume); /** * Plays a Sound file. * @param loop The number of times to play. (0 = forever) * @param channel The channel to play the sound on. **/ void play(const pSound & sound, int loop = 1, int channel = -1); /** * Plays a Music file. * @param loop The number of times to play. (0 = forever) **/ void play(const pMusic & music, int loop = 1); } // love_sdlmixer #endif // LOVE_MOD_SDLMIXER_H
[ "m4rvin2005@8b5f54a0-8722-11de-9e21-49812d2d8162" ]
[ [ [ 1, 107 ] ] ]
4d18c0c80809c111af0a61b1dda67e233a1cd02e
f8b49ab7b1fd8252576a07d604338ae615a76cc4
/QSimSourceCode/QSimMaterialType.cpp
4545191a3d2b0e38c085bc418b297ec659e7b5f2
[]
no_license
ruisebastiao/qsim
8eb47c7c40a217f902d886526ceede651e80a14e
7933f8a44e145f18971062bdd8b3421e75f46657
refs/heads/master
2016-09-06T04:32:07.445284
2011-10-19T18:55:11
2011-10-19T18:55:11
35,518,359
0
0
null
null
null
null
UTF-8
C++
false
false
5,388
cpp
//----------------------------------------------------------------------------- // File: QSimMaterialType.cpp // Class: QSimMaterialType // Parents: QGLMaterial // Purpose: Standard material effects for QSim (e.g., metal, wood, china) /* ---------------------------------------------------------------------------- * * QSim was developed with support from Simbios (NIH Center for Physics-Based * * Simulation of Biological Structures at Stanford) under NIH Roadmap for * * Medical Research grant U54 GM072970 and NCSRR (National Center for Simulation * * in Rehabilitation Research) NIH research infrastructure grant R24 HD065690. * * * * To the extent possible under law, the author(s) and contributor(s) have * * dedicated all copyright and related and neighboring rights to this software * * to the public domain worldwide. This software is distributed without warranty.* * * * Authors: Paul Mitiguy (2011) * * Contributors: Ayman Habib, Michael Sherman * * * * Permission is granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the * * Software without restriction, including without limitation the rights to use, * * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * * the Software and to permit persons to whom the Software is furnished to do so.* * * * Include this sentence, the above public domain and permission notices, and the* * following disclaimer in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR * * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * ----------------------------------------------------------------------------- */ #include "QSimMaterialType.h" //------------------------------------------------------------------------------ namespace QSim { //------------------------------------------------------------------------------ const QSimMaterialType& QSimMaterialType::GetChinaMaterialStandard() { static QSimMaterialType material( QColor(192,150,128), QColor(192,150,128), QColor( 60, 60, 60), 128 ); return material; } const QSimMaterialType& QSimMaterialType::GetChinaMaterialHighlight() { static QSimMaterialType material( QColor(255,192, 0), QColor(255,192, 0), QColor( 60, 60, 0), 128 ); return material; } const QSimMaterialType& QSimMaterialType::GetMetalMaterialStandard() { static QSimMaterialType material( QColor(255,255,255), QColor(150,150,150), QColor(255,255,255), 128 ); return material; } const QSimMaterialType& QSimMaterialType::GetMetalMaterialHighlight() { static QSimMaterialType material( QColor(255,255, 96), QColor(150,150, 96), QColor(255,255,255), 128 ); return material; } //------------------------------------------------------------------------------ } // End of namespace QSim //********************************************************************************* //********************************************************************************* #if 0 china = new QGLMaterial(this); china->setAmbientColor(QColor(192, 150, 128)); china->setSpecularColor(QColor(60, 60, 60)); china->setShininess(128); chinaHighlight = new QGLMaterial(this); chinaHighlight->setAmbientColor(QColor(255, 192, 0)); chinaHighlight->setSpecularColor(QColor(60, 60, 0)); chinaHighlight->setShininess(128); metal = new QGLMaterial(this); metal->setAmbientColor(QColor(255, 255, 255)); metal->setDiffuseColor(QColor(150, 150, 150)); metal->setSpecularColor(QColor(255, 255, 255)); metal->setShininess(128); metalHighlight = new QGLMaterial(this); metalHighlight->setAmbientColor(QColor(255, 255, 96)); metalHighlight->setDiffuseColor(QColor(150, 150, 96)); metalHighlight->setSpecularColor(QColor(255, 255, 255)); metalHighlight->setShininess(128); // Purely cosmetic effects (skip this if you like all white). // Also, should probably using a palette here. QGLMaterial *china = new QGLMaterial(this); china->setAmbientColor( QColor(192, 150, 128) ); china->setSpecularColor( QColor(60, 60, 60) ); china->setShininess( 128 ); sceneNode->setMaterial(china); sceneNode->setEffect( QGL::LitMaterial ); #endif //********************************************************************************* //*********************************************************************************
[ "mitiguy@c7bcc468-049e-0410-a823-898a083b103d" ]
[ [ [ 1, 90 ] ] ]
6c98b60e3820c3b2721bf5c693927a7fcca4e49a
6dac9369d44799e368d866638433fbd17873dcf7
/src/branches/06112002/src/VirtualFS/VFSHandle_file.cpp
c3538b00cd211e3cc8692e16c6fd74833101d5c6
[]
no_license
christhomas/fusionengine
286b33f2c6a7df785398ffbe7eea1c367e512b8d
95422685027bb19986ba64c612049faa5899690e
refs/heads/master
2020-04-05T22:52:07.491706
2006-10-24T11:21:28
2006-10-24T11:21:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
13,060
cpp
#include <VirtualFS/VFSHandle_file.h> #include <fusion.h> #include <sys/stat.h> /** Creates a Transport object that is associated with reading files from the local disk * @ingroup VFSHandle_file_Group * * @returns A Transport object setup to read/write files from the local disk */ VFSTransport * CreateFileTransport(Fusion *f) { static int count = 0; if(count == 0){ count++; return new VFSTransport("file://",VFSTransport::LOCALFS,CreateFileHandle); } return NULL; } /** Creates a handle that can read files from the local disk * @ingroup VFSHandle_file_Group * * @returns A Filehandle for reading/writing to the file */ VFSHandle * CreateFileHandle(VFSTransport *t) { return new VFSHandle_file(t); } /** Local file system Constructor * * Resets all the handle data */ VFSHandle_file::VFSHandle_file(VFSTransport *t) { m_filename = NULL; m_length = 0; m_plugin = NULL; m_fileinfo = NULL; m_transport = t; } /** Local file system Deconstructor * * Calls VFSHandle_file::Close() to make sure the file is closed properly */ VFSHandle_file::~VFSHandle_file() { Close(); } //========================================================= //========================================================= // protected File Information methods //========================================================= //========================================================= /** Sets the name of the file to open * * @param filename The name of the file being opened */ void VFSHandle_file::SetFilename(char *filename) { delete[] m_filename; m_filename = NULL; if(filename != NULL){ if(strncmp("file://",filename,strlen("file://")) == 0) filename+=strlen("file://"); m_filename = new char[strlen(filename)+1]; strcpy(m_filename,filename); } } //========================================================= //========================================================= // protected File Actions methods //========================================================= //========================================================= /** Opens a file * * @param filename The name of the file to open * @param create Whether to create a non-existant file or return false * * @returns boolean true or false, depending on whether was able to open * * Operation: * -# The filename will be preceeded by "file://" so move the filename * pointer forward, past the vfs specific section of the file, and * to the actual filename itself e.g. file://image.jpg => image.jpg * -# Opens a filestream with read/write capabilities in binary mode * -# Sets the handles filename * -# Attempts to open the file * -# If successful, calculates the length of the file * -# returns whether the file was opened successfully * * @todo Add functionality to decide whether to create a new file, if the file requested does not exist */ bool VFSHandle_file::Open(char *filename, bool create) { SetFilename(filename); if(IsFile(m_filename) == false && create == true) Createfile(m_filename); if(IsFile(m_filename) == true){ m_stream.clear(); m_stream.open(m_filename, std::ios::in | std::ios::out | std::ios::binary); Length(); return (bool)m_stream.is_open(); } return false; } bool VFSHandle_file::OpenLocation(char *loc, bool create) { SetFilename(loc); if(IsDirectory(m_filename) == false && IsFile(m_filename) == false && create == true) CreateDir(m_filename); return IsDirectory(m_filename); } /** Closes a file * * @returns boolean true or false, depending on whether the file was closed successfully or not * * Deletes the memory allocated for the filename, closes the stream and returns whether the stream is open or not * This method will return true to notify the filestream was closed successfully and false otherwise */ bool VFSHandle_file::Close(void) { delete[] m_filename; m_filename = NULL; m_length = 0; m_stream.close(); m_stream.clear(); return (bool)!(m_stream.is_open()); } //========================================================= //========================================================= // public File Actions methods //========================================================= //========================================================= /** Reads the file * * @returns A FileInfo structure containing the data read from the file, along with any helpful information * * Operation: * -# Creates a bytestream to contain the filedata * -# Seeks to the start of the file and then reads it into the bytestream * -# Passes the bytestream to the plugin to decode * -# deletes the memory allocated in the original bytestream * -# Returns the FileInfo structure containing the decoded file data */ FileInfo * VFSHandle_file::Read(void) { unsigned char *buffer = Read(m_length); FileInfo *info = m_plugin->Read(buffer,m_length); if(info != NULL) info->filename = m_filename; delete[] buffer; return info; } /** Reads the raw data of a file * * @param length The length of the bytestream * * @returns a bytestream containing the file contents, unmanipulated by the vfs * * This method could be used by an application that may want the raw data * because it's an application specific data file, containing high scores, * user information, etc. */ unsigned char * VFSHandle_file::Read(unsigned int &length) { unsigned char *buffer = new unsigned char[m_length]; m_stream.seekg(0,std::ios::beg); m_stream.read((char *)buffer,m_length); length = m_length; return buffer; } /** Writes to the file * * @param data A FileInfo structure containing the data to write * * Operation: * -# Asks the plugin to encode the information * -# passes this encoded data to be written to the file * -# Delete the encoded file data (it's been written, so it's safe to do so) */ void VFSHandle_file::Write(FileInfo *data) { unsigned int length = 0; char *bs = m_plugin->Write(data,length); Write(bs,length); delete[] bs; } /** Writes raw data (or preformatted data) to the file * * @param data A Bytestream containing the file data to write * @param length The length of the bytestream * * Writes the raw data to the open filestream */ void VFSHandle_file::Write(char *data, unsigned int length) { m_stream.write(data,length); if(m_length == 0) m_length = length; } //========================================================= //========================================================= // public File Information methods //========================================================= //========================================================= /** Retrieves the name of the open file * * @returns A string containing the name of the file open */ char * VFSHandle_file::Filename(void) { return m_filename; } /** Retrieves the length of the file * * @returns A value indicating the length of the file */ unsigned int VFSHandle_file::Length(void) { int cur,l; if(m_stream.is_open() == true){ m_stream.seekg(0,std::ios::end); l = m_stream.tellg(); if(l == -1){ m_length = 0; cur = 0; }else{ m_length = l; } m_stream.seekg(0,std::ios::beg); } return m_length; } /** Sets this handles plugin * * @param plugin The plugin to use decoding the file when read/written */ void VFSHandle_file::SetPlugin(VFSPlugin *plugin) { m_plugin = plugin; } //========================================================= //========================================================= // public File/Directory manipulation methods //========================================================= //========================================================= #ifdef _WIN32 #include <io.h> #include <direct.h> #endif bool VFSHandle_file::IsFile(char *filename) { _finddata_t find; long Filehandle = _findfirst(filename,&find); if(Filehandle == -1){ if(errno == ENOENT){} if(errno == EINVAL){} _findclose(Filehandle); return false; } _findclose(Filehandle); return true; } bool VFSHandle_file::IsDirectory(char *directory) { if(strcmp(directory,"") != 0){ _finddata_t find; long Filehandle = _findfirst(directory,&find); if(Filehandle == -1){ if(errno == ENOENT){} if(errno == EINVAL){} _findclose(Filehandle); return false; } _findclose(Filehandle); } return true; } // dummy for the moment, since I dont actually need to extract this kind of information yet FileInfo * VFSHandle_file::GetFileInfo(char *filename) { struct stat s; if(stat(filename,&s) == -1){ if(errno == ENOENT){}; return NULL; } return NULL; } bool VFSHandle_file::Createfile(char *filename, bool recurse) { // TODO: make sure the file is created, make all the directories required too if(recurse==true) CreateDir(filename); m_stream.clear(); m_stream.open(filename, std::ios::out); bool r = (bool)m_stream.is_open(); m_stream.close(); return r; } bool VFSHandle_file::Deletefile(char *filename) { if(remove(filename) == -1){ if(errno == EACCES) return false; // read only file if(errno == ENOENT) return false; // file does not exist } return true; } bool VFSHandle_file::Copyfile(char *src, char *dest, bool createpath) { return false; } bool VFSHandle_file::Movefile(char *src, char *dest, bool createpath) { return false; } bool VFSHandle_file::CreateDir(char *directory) { char *dir = directory; for(int a=0;a<strlen(directory);a++) if(dir[a] == '\\') dir[a] = '/'; if(dir[0] == '/') dir++; char *token = dir; while(token != NULL){ token = strchr(token,'/'); if(token != NULL){ int bytes = token-directory; char *temp = new char[bytes+1]; memset(temp,0,bytes+1); strncpy(temp,directory,bytes); if(mkdir(temp) == -1) if(errno == ENOENT) return false; delete[] temp; token++; } } return true; } bool VFSHandle_file::DeleteDir(char *directory, bool recurse) { char path[256]; sprintf(path,"%s/*.*",directory); if(recurse==true){ _finddata_t find; long Filehandle = _findfirst(path,&find); if(Filehandle == -1){ if(errno == ENOENT){ _findclose(Filehandle); return DeleteDir(directory,false); } if(errno == EINVAL){ _findclose(Filehandle); return false; // should this happen ever with *.* ? I dont think so.... } }else{ do{ if(strcmp(find.name,".") != 0 && strcmp(find.name,"..") != 0){ memset(path,0,256); sprintf(path,"%s/%s",directory,find.name); Deletefile(path); } }while(_findnext(Filehandle,&find) == 0); _findclose(Filehandle); return DeleteDir(directory,false); } // have to delete all the files in the folder, then remove it, all the way back to the root directory requested to delete return false; } if(rmdir(directory) == -1){ if(errno == ENOTEMPTY) return false; if(errno == ENOENT) return false; } return true; } //========================================================= //========================================================= // public File Data Manipulation methods //========================================================= //========================================================= unsigned char VFSHandle_file::ReadChar(void) { unsigned char c; m_stream.read((char *)&c,sizeof(char)); return c; } unsigned short VFSHandle_file::ReadShort(void) { unsigned short s; m_stream.read((char *)&s,sizeof(short)); return s; } unsigned int VFSHandle_file::ReadInt(void) { int i; m_stream.read((char *)&i,sizeof(int)); return i; } float VFSHandle_file::ReadFloat(void) { float f; m_stream.read((char *)&f,sizeof(float)); return f; } unsigned char * VFSHandle_file::ReadRaw(unsigned int length) { unsigned char *string = new unsigned char[length]; memset(string,0,length); m_stream.read((char *)string,length); return string; } char * VFSHandle_file::ReadString(unsigned int length) { char *string = new char[length+1]; memset(string,0,length+1); if(length > 0) m_stream.read(string,length); return string; } void VFSHandle_file::WriteChar(unsigned char c) { m_stream.write((char *)&c,sizeof(char)); } void VFSHandle_file::WriteShort(unsigned short s) { m_stream.write((char *)&s,sizeof(short)); } void VFSHandle_file::WriteInt(unsigned int i) { m_stream.write((char *)&i,sizeof(int)); } void VFSHandle_file::WriteFloat(float f) { m_stream.write((char *)&f,sizeof(float)); } void VFSHandle_file::WriteRaw(unsigned char *s, unsigned int length) { m_stream.write((char *)s,length); } void VFSHandle_file::WriteString(char *s, unsigned int length) { WriteRaw((unsigned char *)s,length); }
[ "chris_a_thomas@1bf15c89-c11e-0410-aefd-b6ca7aeaabe7" ]
[ [ [ 1, 549 ] ] ]
e688066b1ec6f028147f483a072729e8d152930a
5b3221bdc6edd8123287b2ace0a971eb979d8e2d
/Fiew/Tool.cpp
f8f85c8661bf8d6803cffb4a0a4a379f5efa8dfe
[]
no_license
jackiejohn/fedit-image-editor
0a4b67b46b88362d45db6a2ba7fa94045ad301e2
fd6a87ed042e8adf4bf88ddbd13f2e3b475d985a
refs/heads/master
2021-05-29T23:32:39.749370
2009-02-25T21:01:11
2009-02-25T21:01:11
null
0
0
null
null
null
null
UTF-8
C++
false
false
7,181
cpp
/* Tool.cpp One of the major objects in Fedit. Tool class is the base class for all tools that can be choosed from the Tool Control Center and some that can be choosed from the application main menu. All of the definitions of Tools are defined in Tool.h - to make reading clearer all important info about different Tools methods are described there! */ #include "stdafx.h" #include "Core.h" Tool::Tool(FwCHAR *name, HCURSOR cursor, UINT id) { this->core = Core::self; this->chicore = NULL; this->name = name; this->cursor = cursor; this->cursorBackup = cursor; this->id = id; this->mouse.x = this->mouse.y = 0; this->hdocktool = CreateWindowEx( NULL, IDCL_TOOLW_DKTL, name->toWCHAR(), WS_CHILD, 0,0,0,0, this->core->getToolws()->getToolwDock()->getWindowHandle(), NULL,this->core->getInstance(),NULL ); this->submitDock(); } Tool::~Tool() { if( this->name != NULL ) delete this->name; } UINT Tool::getId() { return this->id; } FwCHAR *Tool::getName() { return this->name; } HCURSOR Tool::getCursor() { return this->cursor; } void Tool::activate(){ this->activateDock(); } void Tool::deactivate(){ } void Tool::notify(int id){ } void Tool::activateDock() { this->core->getToolws()->getToolwDock()->setChild(this->hdocktool); } void Tool::submitDock() { this->core->getToolws()->getToolwDock()->addChild(this->hdocktool,HWND_TOP,this); } void Tool::fillDock(){ } void Tool::updateDock(){ } void Tool::capKeyDown(WPARAM wParam, LPARAM lParam){ } void Tool::capKeyUp(WPARAM wParam, LPARAM lParam){ } void Tool::capMouseDblClk(WPARAM wParam, LPARAM lParam, int button){ } void Tool::capMouseClientDlbClk(WPARAM wParam, LPARAM lParam, int button){ } void Tool::capMouseDown(WPARAM wParam, LPARAM lParam, int button){ } void Tool::capMouseMove(WPARAM wParam, LPARAM lParam){ } void Tool::capMouseUp(WPARAM wParam, LPARAM lParam, int button){ } void Tool::capMouseWheel(WPARAM wParam, LPARAM lParam){ } LRESULT Tool::processMessages(Core *core, ChildCore *chicore, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, int area) { this->core = core; this->chicore = chicore; if( area == CLIENT ){ switch(message){ case WM_LBUTTONDBLCLK: case WM_LBUTTONDOWN: case WM_LBUTTONUP: case WM_MBUTTONDBLCLK: case WM_MBUTTONDOWN: case WM_MBUTTONUP: case WM_RBUTTONDBLCLK: case WM_RBUTTONDOWN: case WM_RBUTTONUP: case WM_MOUSEWHEEL: case WM_MOUSEMOVE: this->mouse = this->getMousePos(lParam); this->getKeyStatus(wParam); this->updateInterface(wParam,lParam); break; } } switch(message){ case WM_KEYDOWN: this->capKeyDown(wParam,lParam); break; case WM_KEYUP: this->capKeyUp(wParam,lParam); break; case WM_LBUTTONDBLCLK: if( area == CLIENT ) this->capMouseClientDlbClk(wParam,lParam,LEFT); else this->capMouseDblClk(wParam,lParam,LEFT); break; case WM_MBUTTONDBLCLK: if( area == CLIENT ) this->capMouseClientDlbClk(wParam,lParam,MID); else this->capMouseDblClk(wParam,lParam,MID); break; case WM_RBUTTONDBLCLK: if( area == CLIENT ) this->capMouseClientDlbClk(wParam,lParam,RIGHT); else this->capMouseDblClk(wParam,lParam,RIGHT); break; case WM_LBUTTONDOWN: this->capMouseDown(wParam,lParam,LEFT); break; case WM_LBUTTONUP: this->capMouseUp(wParam,lParam,LEFT); break; case WM_MBUTTONDOWN: this->capMouseDown(wParam,lParam,MID); break; case WM_MBUTTONUP: this->capMouseUp(wParam,lParam,MID); break; case WM_RBUTTONDOWN: this->capMouseDown(wParam,lParam,RIGHT); break; case WM_RBUTTONUP: this->capMouseUp(wParam,lParam,RIGHT); break; case WM_MOUSEWHEEL: this->capMouseWheel(wParam,lParam); break; case WM_MOUSEMOVE: this->capMouseMove(wParam,lParam); break; } return 0; } void Tool::updateInterface(WPARAM wParam, LPARAM lParam) { this->updateToolws(wParam,lParam); } void Tool::updateToolws(WPARAM wParam, LPARAM lParam) { POINT pw = Tool::getWorkspaceMousePos(this->chicore,lParam); this->core->getToolws()->getToolwBoxInfo()->loadPos(Point(pw.x,pw.y)); POINT ps = Core::makePoint(lParam); Color color; ((ToolSampleColor *)this->core->getToolws()->getToolwCC()->toolSampleColor)->getPixel( ps,this->chicore->getDrawer()->getBmpScene(),&color); this->core->getToolws()->getToolwBoxInfo()->loadColor(color); } POINT Tool::getMousePos(LPARAM lParam) { return Core::makePoint(lParam); } void Tool::getKeyStatus(WPARAM wParam) { SHORT state; state = GetKeyState(VK_SHIFT); this->isShift = ( state < 0 ); state = GetKeyState(VK_CONTROL); this->isCtrl = ( state < 0 ); state = GetKeyState(VK_MENU); this->isAlt = ( state < 0 ); } void Tool::setMouseCapture() { SetCapture(this->chicore->getWindowHandle()); } void Tool::setMouseRelease() { ReleaseCapture(); } POINT Tool::getWorkspaceMousePos(ChildCore *chicore, LPARAM lParam) { POINT mouse = Core::makePoint(lParam); Rect scene = chicore->getDrawer()->getRectScene(); double zoom = chicore->getDrawer()->getZoom(); mouse.x = (int)floor(mouse.x / zoom); mouse.y = (int)floor(mouse.y / zoom); scene.X /= zoom; scene.Y /= zoom; mouse.x -= scene.X; mouse.y -= scene.Y; return mouse; } HCURSOR Tool::createToolCursor(int hotXspot, int hotYspot, int toolId) { HCURSOR cursor = NULL; HBITMAP hbmp = NULL; HBITMAP hmsk = NULL; Bitmap *bmp = (Bitmap *)Core::getImageResource(toolId,RC_PNG); /* Bitmap *msk = bmp->Clone(0,0,bmp->GetWidth(),bmp->GetHeight(),bmp->GetPixelFormat()); Color color; Color pick(255,255,255); for( UINT i = 0; i < msk->GetWidth(); i++ ){ for( UINT j = 0; j < msk->GetHeight(); j++ ){ msk->GetPixel(i,j,&color); if( color.ToCOLORREF() == pick.ToCOLORREF() ) msk->SetPixel(i,j,NULL); } } msk->GetHBITMAP(NULL,&hmsk); */ bmp->GetHBITMAP(NULL,&hbmp); ICONINFO ii; ii.fIcon = FALSE; ii.hbmColor = hbmp; ii.hbmMask = hbmp; ii.xHotspot = hotXspot; ii.yHotspot = hotYspot; cursor = (HCURSOR)CreateIconIndirect(&ii); delete bmp; DeleteObject(hbmp); /* delete msk; DeleteObject(hmsk); */ if( cursor == NULL ) cursor = LoadCursor(NULL,IDC_ARROW); return cursor; } bool Tool::isLayerReady() { if( this->chicore->getWorkspace()->getSelectedLayer()->isFrameReady() == false || this->chicore->getWorkspace()->getSelectedLayer()->getType() == FRM_TEXT ) return false; return true; } bool Tool::loadCursor() { bool result = this->isLayerReady(); if( result == false ) this->cursor = LoadCursor(NULL,IDC_NO); else this->cursor = this->cursorBackup; return result; } /* Fake Tools to store names in the form acceptable by HistoryElements */ ToolMerge::ToolMerge() : Tool(new FwCHAR(TOOL_MERGE),NULL,NULL){ } ToolMerge::~ToolMerge(){ } ToolRaster::ToolRaster() : Tool(new FwCHAR(TOOL_RASTER),NULL,ICC_TEX){ } ToolRaster::~ToolRaster(){ }
[ [ [ 1, 301 ] ] ]
da5f35c320d2bad069cf621bb2f3e24db1305300
913f43ef4d03bd5d6b42b9e31b1048ae54493f59
/CraterRacer/CraterRacer/Source_Code/Entity_Files/Prop.h
5b98e30e76481269c0ff1141bf96656ef614d148
[]
no_license
GreenAdept/cpsc585
bfba6ea333c2857df0822dd7d00768df6a010a73
c66745e77be4c78e435da1a59ae94ac2a61228cf
refs/heads/master
2021-01-10T16:42:03.804213
2010-04-27T00:13:52
2010-04-27T00:13:52
48,024,449
0
0
null
null
null
null
UTF-8
C++
false
false
166
h
/* The prop class. */ #pragma once #ifndef PROP_H #define PROP_H #include "Entity.h" class Prop: public Entity { public: Prop (void) {} }; #endif
[ "wshnng@b92cab1e-0213-11df-804c-772d9fe11005", "tfalders@b92cab1e-0213-11df-804c-772d9fe11005", "[email protected]" ]
[ [ [ 1, 12 ], [ 14, 14 ] ], [ [ 13, 13 ] ], [ [ 15, 15 ] ] ]
6fe55c88f36d2ca2b07c41335afca48675a0d80f
d150600f56acd84df1c3226e691f48f100e6c734
/active_object/ActiveObject.h
9acab64773f1bb47ab324c91e931b199317a7314
[]
no_license
BackupTheBerlios/newsreader-svn
64d44ca7d17eff9174a0a5ea529e94be6a171a97
8fb6277101099b6c30ac41eac5e803d2628dfcb1
refs/heads/master
2016-09-05T14:44:52.642415
2007-10-28T19:21:10
2007-10-28T19:21:10
40,802,616
0
0
null
null
null
null
UTF-8
C++
false
false
106
h
#pragma once class ActiveObject { public: ActiveObject(void); public: ~ActiveObject(void); };
[ "peacebird@00473811-6f2b-0410-a651-d1448cebbc4e" ]
[ [ [ 1, 9 ] ] ]
45e4bbf3cc063a93d5019dd64a6791ef20cfa1a4
1d2705c9be9ee0f974c224eb794f2f8a9e9a3d50
/multi_people/FaceDetector.cpp
9bb5b6719fd470eabdb51950863cf9440b140c60
[]
no_license
llvllrbreeze/alcorapp
dfe2551f36d346d73d998f59d602c5de46ef60f7
3ad24edd52c19f0896228f55539aa8bbbb011aac
refs/heads/master
2021-01-10T07:36:01.058011
2008-12-16T12:51:50
2008-12-16T12:51:50
47,865,136
0
0
null
null
null
null
UTF-8
C++
false
false
3,136
cpp
#include "FaceDetector.h" #define ADD_SEARCH_BORDER 10 FaceDetector::FaceDetector() { storage_ = 0; faceCascade_ = 0; eyeCascade_ = 0; mouthCascade_ = 0; } FaceDetector::~FaceDetector() { cvReleaseImage( &gray_ ); } bool FaceDetector::init(CvSize imgSize) { gray_ = cvCreateImage( imgSize, 8, 1 ); storage_ = cvCreateMemStorage(0); faceCascade_ = (CvHaarClassifierCascade*)cvLoad("haarcascade_frontalface_alt2.xml", 0, 0, 0 ); if (!faceCascade_) { fprintf( stderr, "ERROR: Could not load face classifier cascade\n" ); exit(-1); } eyeCascade_ = (CvHaarClassifierCascade*)cvLoad("haarcascade_eye.xml", 0, 0, 0 ); if (!eyeCascade_) { fprintf( stderr, "ERROR: Could not load eye classifier cascade\n" ); exit(-1); } mouthCascade_ = (CvHaarClassifierCascade*)cvLoad("haarcascade_mouth_norm32x28.xml", 0, 0, 0 ); if (!mouthCascade_) { fprintf( stderr, "ERROR: Could not load mouth classifier cascade\n" ); exit(-1); } return true; } int FaceDetector::detect( IplImage* img, CvSize minFaceSize ) { //IplImage* gray = cvCreateImage( cvSize(img->width,img->height), 8, 1 ); /*IplImage* small_img = cvCreateImage( cvSize( cvRound (img->width/scale), cvRound (img->height/scale)), 8, 1 );*/ cvCvtColor( img, gray_, CV_BGR2GRAY ); /*cvResize( gray, small_img, CV_INTER_LINEAR );*/ cvEqualizeHist( gray_, gray_ ); cvClearMemStorage( storage_ ); // double t = (double)cvGetTickCount(); //CvSeq* faces = cvHaarDetectObjects( small_img, cascade_, storage_, // 1.1, 3, /*CV_HAAR_DO_CANNY_PRUNING*/ CV_HAAR_FIND_BIGGEST_OBJECT | CV_HAAR_DO_ROUGH_SEARCH , // cvSize(60,60) ); faces_ = cvHaarDetectObjects( gray_, faceCascade_, storage_, 1.1, 40, CV_HAAR_DO_CANNY_PRUNING, minFaceSize ); // t = (double)cvGetTickCount() - t; //printf( "detection time = %gms\n", t/((double)cvGetTickFrequency()*1000.) ); // cvReleaseImage( &gray_ ); // cvReleaseImage( &small_img ); return faces_->total; } CvSeq* FaceDetector::getFaces() { return faces_; } bool FaceDetector::detectFaceFeatures(IplImage* img, CvSize minFaceSize, CvRect * roi) { cvCvtColor( img, gray_, CV_BGR2GRAY ); cvEqualizeHist( gray_, gray_ ); cvClearMemStorage( storage_ ); cvResetImageROI(gray_); cvSetImageROI(gray_, *roi ); CvSize minFeatureSize; //minFeatureSize.width = minFaceSize.width / 5; //minFeatureSize.height = minFaceSize.height / 10; minFeatureSize.width = 5; minFeatureSize.height = 5; eyes_ = cvHaarDetectObjects( gray_, eyeCascade_, storage_, 1.1, 1, CV_HAAR_DO_CANNY_PRUNING, minFeatureSize ); if (eyes_->total >= 2) { cvClearMemStorage( storage_ ); mouths_ = cvHaarDetectObjects( gray_, mouthCascade_, storage_, 1.1, 1, CV_HAAR_DO_CANNY_PRUNING, minFeatureSize ); if (mouths_->total >= 1) { cvResetImageROI(gray_); return true; } } cvResetImageROI(gray_); return false; } CvSeq* FaceDetector::getEyes() { return eyes_; } CvSeq* FaceDetector::getMouths() { return mouths_; }
[ "matia.pizzoli@1ffd000b-a628-0410-9a29-793f135cad17" ]
[ [ [ 1, 119 ] ] ]
459e393c7fc542b20082606d3199258aa43d405f
58943f35c5f6659879f41317666416c1216dbc28
/Picture.h
643addfee61233e214b530951bc6968c1420cf92
[]
no_license
abzaremba/nauka_cpp
37c82a20acb98b62ae4bf01eb6f70c576b9aa3a4
1461647b3e4864bc219567e93134849029ff5cb5
refs/heads/master
2021-01-13T02:31:37.111733
2011-10-05T12:03:06
2011-10-05T12:03:06
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,938
h
#ifndef GUARD_Picture_h #define GUARD_Picture_h #include <vector> #include <string> #include "Ptr.h" #include <iostream> #include <algorithm> // forward declaration of Picture, so that we can include it inside operator << before actually defining it class Picture; class Pic_base { friend std::ostream& operator<<(std::ostream&, const Picture&); friend class Frame_Pic; friend class HCat_Pic; friend class VCat_Pic; friend class String_Pic; // no public interface except the destructor typedef std::vector<std::string>::size_type ht_sz; typedef std::string::size_type wd_sz; // this class is an abstract base class virtual wd_sz width() const = 0; virtual ht_sz height() const = 0; virtual void display(std::ostream&, ht_sz, bool)const = 0; public: virtual ~Pic_base() { }; protected: static void pad(std::ostream& os, wd_sz beg, wd_sz end) { while (beg != end) { os << " "; ++beg; } } }; class Picture { friend std::ostream& operator<<(std::ostream&, const Picture&); friend Picture frame(const Picture&); friend Picture hcat(const Picture&, const Picture&); friend Picture vcat(const Picture&, const Picture&); public: Picture(const std::vector<std::string>& = std::vector<std::string>()); private: Picture(Pic_base* ptr): p(ptr) { } Ptr<Pic_base> p; }; Picture frame(const Picture&); Picture hcat(const Picture&, const Picture&); Picture vcat(const Picture&, const Picture&); std::ostream& operator<<(std::ostream&, const Picture&); class String_Pic: public Pic_base { friend class Picture; std::vector<std::string> data; String_Pic(const std::vector<std::string>& v): data(v) { } ht_sz height() const { return data.size(); } wd_sz width() const; void display(std::ostream&, ht_sz, bool) const; }; class VCat_Pic: public Pic_base { friend Picture vcat(const Picture&, const Picture&); Ptr<Pic_base> top, bottom; VCat_Pic(const Ptr<Pic_base>& t, const Ptr<Pic_base>& b): top(t), bottom(b) { } wd_sz width() const { return std::max(top->width(), bottom->width()); } ht_sz height() const { return top->height() + bottom-> width(); } void display(std::ostream&, ht_sz, bool) const; }; class HCat_Pic: public Pic_base { friend Picture hcat(const Picture&, const Picture&); Ptr<Pic_base> left, right; HCat_Pic(const Ptr<Pic_base>& l, const Ptr<Pic_base>& r): left(l), right(r) {} wd_sz width() const { return left->width() + right->width(); } ht_sz height() const { return std::max(left->height(), right ->height()); } void display(std::ostream&, ht_sz, bool) const; }; class Frame_Pic: public Pic_base { friend Picture frame(const Picture&); Ptr<Pic_base> p; Frame_Pic(const Ptr<Pic_base>& pic): p(pic) { } wd_sz width() const {return p->width() + 4; } ht_sz height() const { return p->height() + 4; } void display(std::ostream&, ht_sz, bool) const; }; #endif
[ [ [ 1, 105 ] ] ]
b17f607a83ef778ce8319e69fd285ccd910506b2
e95784c83b6cec527f3292d2af4f2ee9b257a0b7
/UAV/Drivers/BaseActuator.h
8cf8f82ea4cab6c47ec5ce1d22e466a7f71f381c
[]
no_license
ehaskins/scoe-robotics-onboard-controller
5e6818cb469c512a4429aa6ccb96478b89c9ce6f
f44887f79cf89c9ff85963e515381199c9b2b2d7
refs/heads/master
2020-06-06T12:53:54.350781
2011-05-01T00:26:17
2011-05-01T00:26:17
32,115,864
0
0
null
null
null
null
UTF-8
C++
false
false
1,140
h
/* * BaseActuator.h * * Created on: Apr 5, 2011 * Author: Nick Iannone */ #ifndef BASEACTUATOR_H_ #define BASEACTUATOR_H_ #include "IDevice.h" class BaseActuator : public IDevice { private: int m_port; bool m_enabled; public: void init(int port); bool isActive() const; bool isEnabled() const; void setEnabled(bool enable, bool quick); int getPort() const; public: /** * Handles the initialization of the device. * @param port The control port for the device. */ virtual void onInit(int port) = 0; /** * Handles the enabling of the device. * @param quick If the device is to be re-enabled quickly; ie. in the event of a brown-out reset. */ virtual void onEnable(bool quick) = 0; /** * Handles the disabling of the device. * @param forced If the device is to be disabled by force; ie. in the event of an emergency stop. */ virtual void onDisable(bool forced) = 0; /** * Handles the changing of control values. Should perform the sending of information to the device. */ virtual void onValuesChanged() = 0; }; #endif /* BASEACTUATOR_H_ */
[ [ [ 1, 50 ] ] ]
7f7c3c9f4fa10ca884e0b6a82fc6efaa0d5f0c92
fbe2cbeb947664ba278ba30ce713810676a2c412
/iptv_root/iptv_kernel/src/test/KernelInstantiation.cpp
8f24bf099f8c19f0d015277fbf0fe935f2b0abde
[]
no_license
abhipr1/multitv
0b3b863bfb61b83c30053b15688b070d4149ca0b
6a93bf9122ddbcc1971dead3ab3be8faea5e53d8
refs/heads/master
2020-12-24T15:13:44.511555
2009-06-04T17:11:02
2009-06-04T17:11:02
41,107,043
0
0
null
null
null
null
UTF-8
C++
false
false
576
cpp
#include <iostream> #include "iptv_kernel/IPTVKernel.h" using namespace std; class KernelNotifyTest : public KernelNotify { bool OnKernelNotify(KernelParam& param); }; bool KernelNotifyTest::OnKernelNotify(KernelParam& param) { cout << "Kernel notification message: " << param.m_code << endl; return true; } int main() { cout << "*** BEGIN IPTV Kernel instantiation test ***" << endl; IPTVKernel kernel; KernelNotifyTest notify; kernel.SetNotify(&notify); cout << "*** END IPTV Kernel instantiation test ***" << endl; return 0; }
[ "heineck@c016ff2c-3db2-11de-a81c-fde7d73ceb89" ]
[ [ [ 1, 29 ] ] ]
74f72c4b5ba812c0bc27f813a5503e95fcf2cf73
e53e3f6fac0340ae0435c8e60d15d763704ef7ec
/WDL/lice/lice_line.cpp
5e4ce48d9f145d36e09cf62f1d886909f80e5166
[]
no_license
b-vesco/vfx-wdl
906a69f647938b60387d8966f232a03ce5b87e5f
ee644f752e2174be2fefe43275aec2979f0baaec
refs/heads/master
2020-05-30T21:37:06.356326
2011-01-04T08:54:45
2011-01-04T08:54:45
848,136
2
0
null
null
null
null
UTF-8
C++
false
false
46,895
cpp
#include "lice.h" #include "lice_combine.h" #include "lice_extended.h" #include <math.h> #include <stdio.h> //#include <assert.h> template <class T> inline void SWAP(T& a, T& b) { T tmp = a; a = b; b = tmp; } enum { eOK = 0, eXLo = 1, eXHi = 2, eYLo = 4, eYHi = 8 }; static int OffscreenTest(int x, int y, int nX, int nY) { int e = eOK; if (x < 0) e |= eXLo; else if (x >= nX) e |= eXHi; if (y < 0) e |= eYLo; else if (y >= nY) e |= eYHi; return e; } // Cohen-Sutherland. Returns false if the line is entirely offscreen. static bool ClipLine(int* pX1, int* pY1, int* pX2, int* pY2, int nX, int nY) { int x1 = *pX1, y1 = *pY1, x2 = *pX2, y2 = *pY2; int e1 = OffscreenTest(x1, y1, nX, nY); int e2 = OffscreenTest(x2, y2, nX, nY); bool accept = false, done = false; do { if (!(e1 | e2)) { accept = done = true; } else if (e1 & e2) { done = true; // Line is entirely offscreen. } else { int x, y; int eOut = e1 ? e1 : e2; if (eOut & eYHi) { x = x1 + (int) ((double) (x2 - x1) * (double) (nY - y1) / (double) (y2 - y1)); y = nY - 1; } else if (eOut & eYLo) { x = x1 + (int) ((double) (x2 - x1) * (double) -y1 / (double) (y2 - y1)); y = 0; } else if (eOut & eXHi) { y = y1 + (int) ((double) (y2 - y1) * (double) (nX - x1) / (double) (x2 - x1)); x = nX - 1; } else { y = y1 + (int) ((double) (y2 - y1) * (double) -x1 / (double) (x2 - x1)); x = 0; } if (eOut == e1) { x1 = x; y1 = y; e1 = OffscreenTest(x1, y1, nX, nY); } else { x2 = x; y2 = y; e2 = OffscreenTest(x2, y2, nX, nY); } } } while (!done); *pX1 = x1; *pY1 = y1; *pX2 = x2; *pY2 = y2; return accept; } static int OffscreenFTest(float x, float y, float w, float h) { int e = eOK; if (x < 0.0f) e |= eXLo; else if (x >= w) e |= eXHi; if (y < 0.0f) e |= eYLo; else if (y >= h) e |= eYHi; return e; } static bool ClipFLine(float* x1, float* y1, float* x2, float*y2, int w, int h) { float tx1 = *x1, ty1 = *y1, tx2 = *x2, ty2 = *y2; float tw = (float)(w-1), th = (float)(h-1); int e1 = OffscreenFTest(tx1, ty1, tw, th); int e2 = OffscreenFTest(tx2, ty2, tw, th); bool accept = false, done = false; do { if (!(e1|e2)) { accept = done = true; } else if (e1&e2) { done = true; // Line is entirely offscreen. } else { float x, y; int eOut = (e1 ? e1 : e2); if (eOut&eYHi) { x = tx1+(tx2-tx1)*(th-ty1)/(ty2-ty1); y = th-1.0f; } else if (eOut&eYLo) { x = tx1+(tx2-tx1)*ty1/(ty1-ty2); y = 0.0f; } else if (eOut&eXHi) { y = ty1+(ty2-ty1)*(tw-tx1)/(tx2-tx1); x = tw-1.0f; } else { y = ty1+(ty2-ty1)*tx1/(tx1-tx2); x = 0.0f; } if (eOut == e1) { tx1 = x; ty1 = y; e1 = OffscreenFTest(tx1, ty1, tw, th); } else { tx2 = x; ty2 = y; e2 = OffscreenFTest(tx2, ty2, tw, th); } } } while (!done); *x1 = tx1; *y1 = ty1; *x2 = tx2; *y2 = ty2; return accept; } inline static void LICE_DiagLineFAST(LICE_pixel *px, int span, int n, int xstep, int ystep, LICE_pixel color, bool aa) { int step = xstep+ystep; if (aa) { LICE_pixel color75 = ((color>>1)&0x7f7f7f7f)+((color>>2)&0x3f3f3f3f); LICE_pixel color25 = (color>>2)&0x3f3f3f3f; while (n--) { _LICE_CombinePixelsThreeQuarterMix2FAST::doPixFAST(px, color75); _LICE_CombinePixelsQuarterMix2FAST::doPixFAST(px+xstep, color25); _LICE_CombinePixelsQuarterMix2FAST::doPixFAST(px+ystep, color25); px += step; } _LICE_CombinePixelsThreeQuarterMix2FAST::doPixFAST(px, color75); } else { ++n; while (n--) { *px = color; px += step; } } } inline static void LICE_DottedVertLineFAST(LICE_IBitmap* dest, int x, int y1, int y2, LICE_pixel color) { int span = dest->getRowSpan(); LICE_pixel* px = dest->getBits()+y1*span+x; int h = dest->getHeight(); int n = (y2-y1+1)/2; while (n--) { *px = color; px += 2*span; } } // this is the white-color table, doing this properly requires correcting the destination color specifically #define DO_AA_GAMMA_CORRECT 0 static unsigned char AA_GAMMA_CORRECT[256] = { // 1.8 gamma 0,11,17,21,25,28,31,34,37,39,42,44,46,48,50,52,54,56,58,60,61,63,65,67,68,70,71,73,74,76,77,79,80,81,83,84,85,87,88,89,91,92,93,94,96,97,98,99,100,101,103,104,105,106,107,108,109,110,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,132,133,134,135,136,137,138,139,140,141,142,142,143,144,145,146,147,148,149,149,150,151,152,153,154,154,155,156,157,158,159,159,160,161,162,163,163,164,165,166,166,167,168,169,170,170,171,172,173,173,174,175,176,176,177,178,179,179,180,181,182,182,183,184,184,185,186,187,187,188,189,189,190,191,191,192,193,194,194,195,196,196,197,198,198,199,200,200,201,202,202,203,204,204,205,206,206,207,208,208,209,210,210,211,212,212,213,214,214,215,215,216,217,217,218,219,219,220,220,221,222,222,223,224,224,225,225,226,227,227,228,228,229,230,230,231,231,232,233,233,234,234,235,236,236,237,237,238,239,239,240,240,241,241,242,243,243,244,244,245,245,246,247,247,248,248,249,249,250,251,251,252,252,253,253,254,255 // 2.0 gamma //0,15,22,27,31,35,39,42,45,47,50,52,55,57,59,61,63,65,67,69,71,73,74,76,78,79,81,82,84,85,87,88,90,91,93,94,95,97,98,99,100,102,103,104,105,107,108,109,110,111,112,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,141,142,143,144,145,146,147,148,148,149,150,151,152,153,153,154,155,156,157,158,158,159,160,161,162,162,163,164,165,165,166,167,168,168,169,170,171,171,172,173,174,174,175,176,177,177,178,179,179,180,181,182,182,183,184,184,185,186,186,187,188,188,189,190,190,191,192,192,193,194,194,195,196,196,197,198,198,199,200,200,201,201,202,203,203,204,205,205,206,206,207,208,208,209,210,210,211,211,212,213,213,214,214,215,216,216,217,217,218,218,219,220,220,221,221,222,222,223,224,224,225,225,226,226,227,228,228,229,229,230,230,231,231,232,233,233,234,234,235,235,236,236,237,237,238,238,239,240,240,241,241,242,242,243,243,244,244,245,245,246,246,247,247,248,248,249,249,250,250,251,251,252,252,253,253,254,255 // 2.2 gamma //0,20,28,33,38,42,46,49,52,55,58,61,63,65,68,70,72,74,76,78,80,81,83,85,87,88,90,91,93,94,96,97,99,100,102,103,104,106,107,108,109,111,112,113,114,115,117,118,119,120,121,122,123,124,125,126,128,129,130,131,132,133,134,135,136,136,137,138,139,140,141,142,143,144,145,146,147,147,148,149,150,151,152,153,153,154,155,156,157,158,158,159,160,161,162,162,163,164,165,165,166,167,168,168,169,170,171,171,172,173,174,174,175,176,176,177,178,178,179,180,181,181,182,183,183,184,185,185,186,187,187,188,189,189,190,190,191,192,192,193,194,194,195,196,196,197,197,198,199,199,200,200,201,202,202,203,203,204,205,205,206,206,207,208,208,209,209,210,210,211,212,212,213,213,214,214,215,216,216,217,217,218,218,219,219,220,220,221,222,222,223,223,224,224,225,225,226,226,227,227,228,228,229,229,230,230,231,231,232,232,233,233,234,234,235,235,236,236,237,237,238,238,239,239,240,240,241,241,242,242,243,243,244,244,245,245,246,246,247,247,248,248,249,249,249,250,250,251,251,252,252,253,253,254,254,255 // 2.6 gamma //0,30,39,46,51,56,60,63,67,70,73,76,78,81,83,85,87,89,91,93,95,97,99,101,102,104,105,107,109,110,111,113,114,116,117,118,120,121,122,123,125,126,127,128,129,130,131,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,148,149,150,151,152,153,154,155,155,156,157,158,159,160,160,161,162,163,164,164,165,166,167,167,168,169,170,170,171,172,173,173,174,175,175,176,177,177,178,179,179,180,181,181,182,183,183,184,185,185,186,187,187,188,188,189,190,190,191,192,192,193,193,194,195,195,196,196,197,197,198,199,199,200,200,201,201,202,203,203,204,204,205,205,206,206,207,207,208,208,209,210,210,211,211,212,212,213,213,214,214,215,215,216,216,217,217,218,218,219,219,220,220,221,221,222,222,223,223,223,224,224,225,225,226,226,227,227,228,228,229,229,230,230,230,231,231,232,232,233,233,234,234,234,235,235,236,236,237,237,237,238,238,239,239,240,240,240,241,241,242,242,243,243,243,244,244,245,245,245,246,246,247,247,247,248,248,249,249,249,250,250,251,251,251,252,252,253,253,253,254,254,255 }; static void GetAAPxWeight(int err, int alpha, int* wt, int* iwt) { int i = err/256; int w = 255-i; #if DO_AA_GAMMA_CORRECT w = AA_GAMMA_CORRECT[w]; i = AA_GAMMA_CORRECT[i]; #endif w = alpha*w/256; i = alpha*i/256; *wt = w; *iwt = i; } static void GetAAPxWeightFAST(int err, int* wt, int* iwt) { int i = err/256; int w = 255-i; #if DO_AA_GAMMA_CORRECT w = AA_GAMMA_CORRECT[w]; i = AA_GAMMA_CORRECT[i]; #endif *wt = w; *iwt = i; } template <class COMBFUNC> class __LICE_LineClassSimple { public: static void LICE_VertLineFAST(LICE_pixel *px, int span, int len, LICE_pixel color) { while (len--) { COMBFUNC::doPixFAST(px, color); px+=span; } } static void LICE_HorizLineFAST(LICE_pixel *px, int n, LICE_pixel color) { while (n--) { COMBFUNC::doPixFAST(px, color); px++; } } static void LICE_VertLine(LICE_pixel *px, int span, int len, int color, int aw) { int r = LICE_GETR(color), g = LICE_GETG(color), b = LICE_GETB(color), a = LICE_GETA(color); while (len--) { COMBFUNC::doPix((LICE_pixel_chan*) px, r, g, b, a, aw); px+=span; } } static void LICE_HorizLine(LICE_pixel *px, int n, LICE_pixel color, int aw) { int r = LICE_GETR(color), g = LICE_GETG(color), b = LICE_GETB(color), a = LICE_GETA(color); while (n--) { COMBFUNC::doPix((LICE_pixel_chan*) px, r, g, b, a, aw); px++; } } static void LICE_DiagLine(LICE_pixel *px, int span, int n, int xstep, int ystep, LICE_pixel color, int aw) { int r = LICE_GETR(color), g = LICE_GETG(color), b = LICE_GETB(color), a = LICE_GETA(color); int step = xstep+ystep; for (int i = 0; i <= n; ++i, px += step) { COMBFUNC::doPix((LICE_pixel_chan*) px, r, g, b, a, aw); } } static void LICE_DiagLineAA(LICE_pixel *px, int span, int n, int xstep, int ystep, LICE_pixel color, int aw) { int r = LICE_GETR(color), g = LICE_GETG(color), b = LICE_GETB(color), a = LICE_GETA(color); int step = xstep+ystep; #if DO_AA_GAMMA_CORRECT int iw = aw*AA_GAMMA_CORRECT[256*3/4]/256; int dw = aw*AA_GAMMA_CORRECT[256/4]/256; #else int iw = aw*3/4; int dw = aw/4; #endif for (int i = 0; i < n; ++i, px += step) { COMBFUNC::doPix((LICE_pixel_chan*) px, r, g, b, a, iw); COMBFUNC::doPix((LICE_pixel_chan*) (px+xstep), r, g, b, a, dw); COMBFUNC::doPix((LICE_pixel_chan*) (px+ystep), r, g, b, a, dw); } COMBFUNC::doPix((LICE_pixel_chan*) px, r, g, b, a, iw); } }; #ifndef LICE_FAVOR_SIZE template<class COMBFUNC> #endif class __LICE_LineClass { public: #ifdef LICE_FAVOR_SIZE #define DOPIX(pout,r,g,b,a,ia) combFunc(pout,r,g,b,a,ia); #else #define DOPIX(pout,r,g,b,a,ia) COMBFUNC::doPix(pout,r,g,b,a,ia); #endif static void DashedLine(LICE_IBitmap* dest, int x1, int y1, int x2, int y2, int pxon, int pxoff, LICE_pixel color, int aw #ifdef LICE_FAVOR_SIZE , LICE_COMBINEFUNC combFunc #endif ) { int span = dest->getRowSpan(); LICE_pixel* px = dest->getBits()+y1*span+x1; int r = LICE_GETR(color), g = LICE_GETG(color), b = LICE_GETB(color), a = LICE_GETA(color); if (x1 == x2) { int i, y; for (y = y1; y < y2-pxon; y += pxon+pxoff) { for (i = 0; i < pxon; ++i, px += span) DOPIX((LICE_pixel_chan*) px, r, g, b, a, aw) px += pxoff*span; } for (i = 0; i < min(pxon, y2-y); px += span) DOPIX((LICE_pixel_chan*) px, r, g, b, a, aw) } else if (y1 == y2) { int i, x; for (x = x1; x < x2-pxon; x += pxon+pxoff) { for (i = 0; i < pxon; ++i, ++px) DOPIX((LICE_pixel_chan*) px, r, g, b, a, aw) px += pxoff; } for (i = 0; i < min(pxon, x2-x); ++px) DOPIX((LICE_pixel_chan*) px, r, g, b, a, aw) } } static void LICE_LineImpl(LICE_pixel *px, LICE_pixel *px2, int derr, int astep, int da, int bstep, LICE_pixel color, int aw, bool aa #ifdef LICE_FAVOR_SIZE , LICE_COMBINEFUNC combFunc #endif ) { int r = LICE_GETR(color), g = LICE_GETG(color), b = LICE_GETB(color), a = LICE_GETA(color); int err = 0; int i; int n = (da+1)/2; if (aa) { DOPIX((LICE_pixel_chan*) px, r, g, b, a, aw) DOPIX((LICE_pixel_chan*) px2, r, g, b, a, aw) px += astep; px2 -= astep; err = derr; if (aw == 256) { for (i = 1; i < n; ++i) { int wt, iwt; GetAAPxWeightFAST(err, &wt, &iwt); DOPIX((LICE_pixel_chan*)px, r, g, b, a, wt) DOPIX((LICE_pixel_chan*)(px+bstep), r, g, b, a, iwt) DOPIX((LICE_pixel_chan*)px2, r, g, b, a, wt) DOPIX((LICE_pixel_chan*)(px2-bstep), r, g, b, a, iwt) err += derr; if (err >= 65536) { px += bstep; px2 -= bstep; err -= 65536; } px += astep; px2 -= astep; } } else // alpha<256 { for (i = 1; i < n; ++i) { int wt, iwt; GetAAPxWeight(err, aw, &wt, &iwt); DOPIX((LICE_pixel_chan*)px, r, g, b, a, wt) DOPIX((LICE_pixel_chan*)(px+bstep), r, g, b, a, iwt) DOPIX((LICE_pixel_chan*)px2, r, g, b, a, wt) DOPIX((LICE_pixel_chan*)(px2-bstep), r, g, b, a, iwt) err += derr; if (err >= 65536) { px += bstep; px2 -= bstep; err -= 65536; } px += astep; px2 -= astep; } } if (!(da%2)) { int wt, iwt; if (aw == 256) GetAAPxWeightFAST(err, &wt, &iwt); else GetAAPxWeight(err, aw, &wt, &iwt); DOPIX((LICE_pixel_chan*)px, r, g, b, a, wt) DOPIX((LICE_pixel_chan*)(px+bstep), r, g, b, a, iwt) } } else // not aa { for (i = 0; i < n; ++i) { DOPIX((LICE_pixel_chan*)px, r, g, b, a, aw) DOPIX((LICE_pixel_chan*)px2, r, g, b, a, aw) err += derr; if (err >= 65536/2) { px += bstep; px2 -= bstep; err -= 65536; } px += astep; px2 -= astep; } if (!(da%2)) { DOPIX((LICE_pixel_chan*)px, r, g, b, a, aw) } } } static void LICE_FLineImpl(LICE_pixel *px, int n , int err, int derr, int astep, int bstep, LICE_pixel color, int aw #ifdef LICE_FAVOR_SIZE , LICE_COMBINEFUNC combFunc #endif ) // only does AA { int r = LICE_GETR(color), g = LICE_GETG(color), b = LICE_GETB(color), a = LICE_GETA(color); int wt, iwt; int i; if (aw == 256) { for (i = 0; i <= n; ++i) { GetAAPxWeightFAST(err, &wt, &iwt); DOPIX((LICE_pixel_chan*)px, r, g, b, a, wt) DOPIX((LICE_pixel_chan*)(px+bstep), r, g, b, a, iwt) err += derr; if (err >= 65536) { px += bstep; err -= 65536; } px += astep; } } else // alpha != 256 { for (i = 0; i <= n; ++i) { GetAAPxWeight(err, aw, &wt, &iwt); DOPIX((LICE_pixel_chan*)px, r, g, b, a, wt) DOPIX((LICE_pixel_chan*)(px+bstep), r, g, b, a, iwt) err += derr; if (err >= 65536) { px += bstep; err -= 65536; } px += astep; } } } #undef DOPIX }; void LICE_Line(LICE_IBitmap *dest, int x1, int y1, int x2, int y2, LICE_pixel color, float alpha, int mode, bool aa) { if (!dest) return; #ifndef DISABLE_LICE_EXTENSIONS if (dest->Extended(LICE_EXT_SUPPORTS_ID, (void*) LICE_EXT_LINE_ACCEL)) { LICE_Ext_Line_acceldata data(x1, y1, x2, y2, color, alpha, mode, aa); if (dest->Extended(LICE_EXT_LINE_ACCEL, &data)) return; } #endif int w = dest->getWidth(); int h = dest->getHeight(); if (dest->isFlipped()) { y1 = h-1-y1; y2 = h-1-y2; } if (ClipLine(&x1, &y1, &x2, &y2, w, h)) { int xdiff = x2-x1; if (y1 == y2) // horizontal line optimizations { if (x1 > x2) SWAP(x1, x2); int span = dest->getRowSpan(); LICE_pixel* px = dest->getBits()+y1*span+x1; int n=x2-x1+1; if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && alpha == 1.0f) { __LICE_LineClassSimple<_LICE_CombinePixelsClobberFAST>::LICE_HorizLineFAST(px, n, color); } else if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && alpha == 0.5f) { color = (color>>1)&0x7f7f7f7f; __LICE_LineClassSimple<_LICE_CombinePixelsHalfMix2FAST>::LICE_HorizLineFAST(px, n, color); } else if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && alpha == 0.25f) { color = (color>>2)&0x3f3f3f3f; __LICE_LineClassSimple<_LICE_CombinePixelsQuarterMix2FAST>::LICE_HorizLineFAST(px, n, color); } else if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && alpha == 0.75f) { color = ((color>>1)&0x7f7f7f7f)+((color>>2)&0x3f3f3f3f); __LICE_LineClassSimple<_LICE_CombinePixelsThreeQuarterMix2FAST>::LICE_HorizLineFAST(px, n, color); } else { int aw = (int)(256.0f*alpha); #define __LICE__ACTION(COMBFUNC) __LICE_LineClassSimple<COMBFUNC>::LICE_HorizLine(px, n, color, aw) __LICE_ACTION_CONSTANTALPHA(mode, aw, false); #undef __LICE__ACTION } } else if (!xdiff) // vertical line optimizations { if (y1 > y2) SWAP(y1, y2); int len=y2+1-y1; int span = dest->getRowSpan(); LICE_pixel* px = dest->getBits()+y1*span+x1; int aw = (int)(256.0f*alpha); if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && alpha == 1.0f) { __LICE_LineClassSimple<_LICE_CombinePixelsClobberFAST>::LICE_VertLineFAST(px, span, len, color); } else if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && alpha == 0.5f) { color = (color>>1)&0x7f7f7f7f; __LICE_LineClassSimple<_LICE_CombinePixelsHalfMix2FAST>::LICE_VertLineFAST(px, span, len, color); } else if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && alpha == 0.25f) { color = (color>>2)&0x3f3f3f3f; __LICE_LineClassSimple<_LICE_CombinePixelsQuarterMix2FAST>::LICE_VertLineFAST(px, span, len, color); } else if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && alpha == 0.75f) { color = ((color>>1)&0x7f7f7f7f)+((color>>2)&0x3f3f3f3f); __LICE_LineClassSimple<_LICE_CombinePixelsThreeQuarterMix2FAST>::LICE_VertLineFAST(px, span, len, color); } else { #define __LICE__ACTION(COMBFUNC) __LICE_LineClassSimple<COMBFUNC>::LICE_VertLine(px, span, len, color,aw) __LICE_ACTION_CONSTANTALPHA(mode, aw, false); #undef __LICE__ACTION } } else if ((xdiff=abs(xdiff)) == abs(y2-y1)) // diagonal line optimizations { int span = dest->getRowSpan(); LICE_pixel* px = dest->getBits()+y1*span+x1; int aw = (int)(256.0f*alpha); int xstep = (x2 > x1 ? 1 : -1); int ystep = (y2 > y1 ? span : -span); if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && alpha == 1.0f) { LICE_DiagLineFAST(px,span, xdiff, xstep, ystep, color, aa); } else { if (aa) { #define __LICE__ACTION(COMBFUNC) __LICE_LineClassSimple<COMBFUNC>::LICE_DiagLineAA(px,span, xdiff, xstep, ystep, color, aw) __LICE_ACTION_NOSRCALPHA(mode, aw, false); #undef __LICE__ACTION } else { #define __LICE__ACTION(COMBFUNC) __LICE_LineClassSimple<COMBFUNC>::LICE_DiagLine(px,span, xdiff, xstep, ystep, color, aw) __LICE_ACTION_CONSTANTALPHA(mode, aw, false); #undef __LICE__ACTION } } } else { // common set-up for normal line draws int span = dest->getRowSpan(); int aw = (int)(256.0f*alpha); LICE_pixel* px = dest->getBits()+y1*span+x1; LICE_pixel* px2 = dest->getBits()+y2*span+x2; int da, db; int astep, bstep; int dx = x2-x1; int dy = y2-y1; if (abs(dx) > abs(dy)) { da = dx; db = dy; astep = 1; bstep = span; } else { da = dy; db = dx; astep = span; bstep = 1; } if (da < 0) { da = -da; db = -db; SWAP(px, px2); } if (db < 0) { db = -db; bstep = -bstep; } double dbda = (double)db/(double)da; int derr = (int)(dbda*65536.0); #ifdef LICE_FAVOR_SIZE LICE_COMBINEFUNC blitfunc=NULL; #define __LICE__ACTION(comb) blitfunc=comb::doPix; #else #define __LICE__ACTION(COMBFUNC) __LICE_LineClass<COMBFUNC>::LICE_LineImpl(px,px2, derr, astep, da, bstep, color, aw, aa) #endif if (aa) { __LICE_ACTION_NOSRCALPHA(mode, aw, false); } else { __LICE_ACTION_CONSTANTALPHA(mode, aw, false); } #undef __LICE__ACTION #ifdef LICE_FAVOR_SIZE if (blitfunc) __LICE_LineClass::LICE_LineImpl(px,px2, derr, astep, da, bstep, color, aw, aa, blitfunc); #endif } } } void LICE_FLine(LICE_IBitmap* dest, float x1, float y1, float x2, float y2, LICE_pixel color, float alpha, int mode, bool aa) { if (!dest) return; if (!aa) { LICE_Line(dest,(int)x1,(int)y1,(int)x2,(int)y2,color,alpha,mode,false); return; } int w = dest->getWidth(); int h = dest->getHeight(); if (dest->isFlipped()) { y1 = (float)(h-1)-y1; y2 = (float)(h-1)-y2; } if (ClipFLine(&x1, &y1, &x2, &y2, w, h)) { if (x1 != x2 || y1 != y2) { int span = dest->getRowSpan(); int aw = (int)(256.0f*alpha); float a1, a2, b1, b2, da, db; int astep, bstep; float dx = x2-x1; float dy = y2-y1; if (fabs(dx) > fabs(dy)) { a1 = x1; a2 = x2; b1 = y1; b2 = y2; da = dx; db = dy; astep = 1; bstep = span; } else { a1 = y1; a2 = y2; b1 = x1; b2 = x2; da = dy; db = dx; astep = span; bstep = 1; } if (da < 0.0f) { da = -da; db = -db; SWAP(a1, a2); SWAP(b1, b2); } if (db < 0.0f) { bstep = -bstep; } int n = (int)(floor(a2)-ceil(a1)); float dbda = db/da; float ta = ceil(a1); float tb = b1+(ta-a1)*dbda; float bf = tb-floor(tb); int err = (int)(bf*65536.0f); if (bstep < 0) err = 65535-err; int derr = (int)(fabs(dbda)*65536.0f); LICE_pixel* px = dest->getBits()+(int)ta*astep+(int)tb*abs(bstep); if (bstep < 0) px -= bstep; #ifdef LICE_FAVOR_SIZE LICE_COMBINEFUNC blitfunc=NULL; #define __LICE__ACTION(comb) blitfunc=comb::doPix; #else #define __LICE__ACTION(COMBFUNC) __LICE_LineClass<COMBFUNC>::LICE_FLineImpl(px,n,err,derr,astep,bstep, color, aw) #endif __LICE_ACTION_NOSRCALPHA(mode, aw, false); #ifdef LICE_FAVOR_SIZE if (blitfunc) __LICE_LineClass::LICE_FLineImpl(px,n,err,derr,astep,bstep, color, aw, blitfunc); #endif #undef __LICE__ACTION } } } void LICE_DashedLine(LICE_IBitmap* dest, int x1, int y1, int x2, int y2, int pxon, int pxoff, LICE_pixel color, float alpha, int mode, bool aa) { if (!dest) return; #ifndef DISABLE_LICE_EXTENSIONS if (dest->Extended(LICE_EXT_SUPPORTS_ID, (void*) LICE_EXT_DASHEDLINE_ACCEL)) { LICE_Ext_DashedLine_acceldata data(x1, y1, x2, y2, pxon, pxoff, color, alpha, mode, aa); if (dest->Extended(LICE_EXT_DASHEDLINE_ACCEL, &data)) return; } #endif int w = dest->getWidth(); int h = dest->getHeight(); if (ClipLine(&x1, &y1, &x2, &y2, w, h)) { if (y1 > y2) SWAP(y1, y2); if (pxon == 1 && pxoff == 1 && x1 == x2 && (mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && alpha == 1.0f) { LICE_DottedVertLineFAST(dest, x1, y1, y2, color); } else { int aw = (int)(256.0f*alpha); if (x1 > x2) SWAP(x1, x2); #ifdef LICE_FAVOR_SIZE LICE_COMBINEFUNC blitfunc=NULL; #define __LICE__ACTION(comb) blitfunc=comb::doPix; #else #define __LICE__ACTION(COMBFUNC) __LICE_LineClass<COMBFUNC>::DashedLine(dest, x1, y1, x2, y2, pxon, pxoff, color, aw); #endif __LICE_ACTION_CONSTANTALPHA(mode, aw, false); #ifdef LICE_FAVOR_SIZE if (blitfunc) __LICE_LineClass::DashedLine(dest, x1, y1, x2, y2, pxon, pxoff, color, aw, blitfunc); #endif #undef __LICE__ACTION } } } bool LICE_ClipLine(int* pX1, int* pY1, int* pX2, int* pY2, int xLo, int yLo, int xHi, int yHi) { int x1 = *pX1-xLo; int y1 = *pY1-yLo; int x2 = *pX2-xLo; int y2 = *pY2-yLo; bool onscreen = ClipLine(&x1, &y1, &x2, &y2, xHi-xLo, yHi-yLo); *pX1 = x1+xLo; *pY1 = y1+yLo; *pX2 = x2+xLo; *pY2 = y2+yLo; return onscreen; } bool LICE_ClipFLine(float* px1, float* py1, float* px2, float* py2, float xlo, float ylo, float xhi, float yhi) { float x1 = *px1-xlo; float y1 = *py1-ylo; float x2 = *px2-xlo; float y2 = *py2-ylo; bool onscreen = ClipFLine(&x1, &y1, &x2, &y2, xhi-xlo, yhi-ylo); *px1 = x1+xlo; *py1 = y1+ylo; *px2 = x2+xlo; *py2 = y2+ylo; return onscreen; } #include "lice_bezier.h" static void DoBezierFillSegment(LICE_IBitmap* dest, int x1, int y1, int x2, int y2, int yfill, LICE_pixel color, float alpha, int mode) { if (x2 < x1) return; if (x2 == x1) { int ylo = min(y1,yfill); int yhi = max(y2,yfill); if (yhi != yfill) --yhi; LICE_Line(dest, x1, ylo, x1, yhi, color, alpha, mode, false); return; } if ((y1 < yfill) == (y2 < yfill)) { if (y1 < yfill) ++yfill; int x[4] = { x1, x1, x2, x2 }; int y[4] = { y1, yfill, y2, yfill }; LICE_FillConvexPolygon(dest, x, y, 4, color, alpha, mode); } else { int x = x1+(int)((double)(yfill-y1)*(double)(x2-x1)/(double)(y2-y1)); int yf = yfill; if (y1 < yfill) ++yf; LICE_FillTriangle(dest, x1, y1, x1, yf, x, yf, color, alpha, mode); yf = yfill; if (y2 < yfill) ++yf; LICE_FillTriangle(dest, x, yf, x2, yf, x2, y2, color, alpha, mode); } } static void DoBezierFillSegmentX(LICE_IBitmap* dest, int x1, int y1, int x2, int y2, int xfill, LICE_pixel color, float alpha, int mode) { if (y2 < y1) return; if (y2 == y1) { int xlo = min(x1,xfill); int xhi = max(x2,xfill); if (xhi != xfill) --xhi; LICE_Line(dest, xlo, y1, xhi, y1, color, alpha, mode, false); return; } if ((x1 < xfill) == (x2 < xfill)) { if (x1 < xfill) ++xfill; int x[4] = { x1, xfill, x2, xfill }; int y[4] = { y1, y1, y2+1, y2+1 }; LICE_FillConvexPolygon(dest, x, y, 4, color, alpha, mode); } else { int y = y1+(int)((double)(xfill-x1)*(double)(y2-y1)/(double)(x2-x1)); int xf = xfill; if (x1 < xfill) ++xf; LICE_FillTriangle(dest, x1, y1, xf, y1, xf, y, color, alpha, mode); xf = xfill; if (x2 < xfill) ++xf; LICE_FillTriangle(dest, xf, y, xf, y2, x2, y2, color, alpha, mode); } } // quadratic bezier ... NOT TESTED YET // attempt to draw segments no longer than tol px void LICE_DrawQBezier(LICE_IBitmap* dest, float xstart, float ystart, float xctl, float yctl, float xend, float yend, LICE_pixel color, float alpha, int mode, bool aa, float tol) { if (!dest) return; int w = dest->getWidth(); int h = dest->getHeight(); if (xstart > xend) { SWAP(xstart, xend); SWAP(ystart, yend); } double len = sqrt((xctl-xstart)*(xctl-xstart)+(yctl-ystart)*(yctl-ystart)); len += sqrt((xend-xctl)*(xend-xctl)+(yend-yctl)*(yend-yctl)); float xlo = xstart; float xhi = xend; float ylo = ystart; float yhi = yend; double tlo = 0.0; double thi = 1.0; if (xlo < 0.0f) { xlo = 0.0f; ylo = LICE_Bezier_GetY(xstart, xctl, xend, ystart, yctl, yend, xlo, &tlo); } if (xhi >= (float)w) { xhi = (float)(w-1); yhi = LICE_Bezier_GetY(xstart, xctl, xend, ystart, yctl, yend, xhi, &thi); } if (xlo > xhi) return; len *= (thi-tlo); if (tol <= 0.0f) tol = 1.0f; int nsteps = (int)(len/tol); if (nsteps <= 0) nsteps = 1; double dt = (thi-tlo)/(double)nsteps; double t = tlo+dt; float lastx = xlo; float lasty = ylo; float x, y; int i; for (i = 1; i < nsteps; ++i) { LICE_Bezier(xstart, xctl, xend, ystart, yctl, yend, t, &x, &y); LICE_FLine(dest, lastx, lasty, x, y, color, alpha, mode, aa); lastx = x; lasty = y; t += dt; } LICE_FLine(dest, lastx, lasty, xhi, yhi, color, alpha, mode, aa); } static int CBezPrep(LICE_IBitmap* dest, float xstart, float ystart, float xctl1, float yctl1, float xctl2, float yctl2, float xend, float yend, float tol, bool xbasis, double* ax, double* bx, double* cx, double* dx, double* ay, double* by, double* cy, double* dy, float* xlo, float* xhi, float* ylo, float* yhi, double* tlo, double* thi) { if (!dest) return 0; int w = dest->getWidth(); int h = dest->getHeight(); if ((xbasis && xstart > xend) || (!xbasis && ystart > yend)) { SWAP(xstart, xend); SWAP(xctl1, xctl2); SWAP(ystart, yend); SWAP(yctl1, yctl2); } double len = sqrt((xctl1-xstart)*(xctl1-xstart)+(yctl1-ystart)*(yctl1-ystart)); len += sqrt((xctl2-xctl1)*(xctl2-xctl1)+(yctl2-yctl1)*(yctl2-yctl1)); len += sqrt((xend-xctl2)*(xend-xctl2)+(yend-yctl2)*(yend-yctl2)); LICE_CBezier_GetCoeffs(xstart, xctl1, xctl2, xend, ystart, yctl1, yctl2, yend, ax, bx, cx, ay, by, cy); *dx = xstart; *dy = ystart; *xlo = xstart; *xhi = xend; *ylo = ystart; *yhi = yend; *tlo = 0.0; *thi = 1.0; if (*xlo < 0.0f) { *xlo = 0.0f; *ylo = LICE_CBezier_GetY(xstart, xctl1, xctl2, xend, ystart, yctl1, yctl2, yend, *xlo, (float*)0, (float*)0, (double*)0, tlo); } if (*xhi >= (float)w) { *xhi = (float)(w-1); *yhi = LICE_CBezier_GetY(xstart, xctl1, xctl2, xend, ystart, yctl1, yctl2, yend, *xhi, (float*)0, (float*)0, thi, (double*)0); } if ((xbasis && *xlo > *xhi) || (!xbasis && *ylo > *yhi)) { return 0; } len *= (*thi-*tlo); if (tol <= 0.0f) tol = 1.0f; int nsteps = (int)(len/tol); if (nsteps <= 0) nsteps = 1; return nsteps; } void LICE_DrawCBezier(LICE_IBitmap* dest, float xstart, float ystart, float xctl1, float yctl1, float xctl2, float yctl2, float xend, float yend, LICE_pixel color, float alpha, int mode, bool aa, float tol) { if (!dest) return; #ifndef DISABLE_LICE_EXTENSIONS if (dest->Extended(LICE_EXT_SUPPORTS_ID, (void*) LICE_EXT_DRAWCBEZIER_ACCEL)) { LICE_Ext_DrawCBezier_acceldata data(xstart, ystart, xctl1, yctl1, xctl2, yctl2, xend, yend, color, alpha, mode, aa); if (dest->Extended(LICE_EXT_DRAWCBEZIER_ACCEL, &data)) return; } #endif double ax, bx, cx, dx, ay, by, cy, dy; float xlo, xhi, ylo, yhi; double tlo, thi; int nsteps = CBezPrep(dest, xstart, ystart, xctl1, yctl1, xctl2, yctl2, xend, yend, tol, true, &ax, &bx, &cx, &dx, &ay, &by, &cy, &dy, &xlo, &xhi, &ylo, &yhi, &tlo, &thi); if (!nsteps) return; double dt = (thi-tlo)/(double)nsteps; double t = tlo+dt; float lastx = xlo; float lasty = ylo; float x, y; int i; for (i = 1; i < nsteps-1; ++i) { EVAL_CBEZXY(x, y, ax, bx, cx, dx, ay, by, cy, dy, t); LICE_FLine(dest, lastx, lasty, x, y, color, alpha, mode, aa); lastx = x; lasty = y; t += dt; } LICE_FLine(dest, lastx, lasty, xhi, yhi, color, alpha, mode, aa); } void LICE_FillCBezier(LICE_IBitmap* dest, float xstart, float ystart, float xctl1, float yctl1, float xctl2, float yctl2, float xend, float yend, int yfill, LICE_pixel color, float alpha, int mode, float tol) { if (!dest) return; double ax, bx, cx, dx, ay, by, cy, dy; float xlo, xhi, ylo, yhi; double tlo, thi; int nsteps = CBezPrep(dest, xstart, ystart, xctl1, yctl1, xctl2, yctl2, xend, yend, tol, true, &ax, &bx, &cx, &dx, &ay, &by, &cy, &dy, &xlo, &xhi, &ylo, &yhi, &tlo, &thi); if (!nsteps) return; double dt = (thi-tlo)/(double)nsteps; double t = tlo+dt; int lastfillx = (int)xlo; int lastfilly = (int)(ylo+0.5f); float x, y; int i; for (i = 1; i < nsteps-1; ++i) { EVAL_CBEZXY(x, y, ax, bx, cx, dx, ay, by, cy, dy, t); if ((int)x >= lastfillx) { int xi = (int)x; int yi = (int)(y+0.5f); DoBezierFillSegment(dest, lastfillx, lastfilly, xi, yi, yfill, color, alpha, mode); lastfillx = xi+1; lastfilly = yi; } t += dt; } if ((int)(xhi-1.0f) >= lastfillx) { DoBezierFillSegment(dest, lastfillx, lastfilly, (int)(xhi-1.0f),(int)(yhi+0.5f), yfill, color, alpha, mode); } } void LICE_FillCBezierX(LICE_IBitmap* dest, float xstart, float ystart, float xctl1, float yctl1, float xctl2, float yctl2, float xend, float yend, int xfill, LICE_pixel color, float alpha, int mode, float tol) { if (!dest) return; double ax, bx, cx, dx, ay, by, cy, dy; float xlo, xhi, ylo, yhi; double tlo, thi; int nsteps = CBezPrep(dest, xstart, ystart, xctl1, yctl1, xctl2, yctl2, xend, yend, tol, false, &ax, &bx, &cx, &dx, &ay, &by, &cy, &dy, &xlo, &xhi, &ylo, &yhi, &tlo, &thi); if (!nsteps) return; double dt = (thi-tlo)/(double)nsteps; double t = tlo+dt; int lastfillx = (int)(xlo+0.5f); int lastfilly = (int)ylo; float x, y; int i; for (i = 1; i < nsteps-1; ++i) { EVAL_CBEZXY(x, y, ax, bx, cx, dx, ay, by, cy, dy, t); if ((int)y >= lastfilly) { int xi = (int)(x+0.5f); int yi = (int)y; DoBezierFillSegmentX(dest, lastfillx, lastfilly, xi, yi, xfill, color, alpha, mode); lastfillx = xi; lastfilly = yi+1; } t += dt; } if ((int)(yhi-1.0f) >= lastfilly) { DoBezierFillSegmentX(dest, lastfillx, lastfilly, (int)(xhi+0.5),(int)(yhi-1.0f), xfill, color, alpha, mode); } } void LICE_DrawRect(LICE_IBitmap *dest, int x, int y, int w, int h, LICE_pixel color, float alpha, int mode) { LICE_Line(dest, x, y, x+w, y, color, alpha, mode, false); LICE_Line(dest, x+w, y, x+w, y+h, color, alpha, mode, false); LICE_Line(dest, x+w, y+h, x, y+h, color, alpha, mode, false); LICE_Line(dest, x, y+h, x, y, color, alpha, mode, false); } void LICE_BorderedRect(LICE_IBitmap *dest, int x, int y, int w, int h, LICE_pixel bgcolor, LICE_pixel fgcolor, float alpha, int mode) { LICE_FillRect(dest, x+1, y+1, w-1, h-1, bgcolor, alpha, mode); LICE_DrawRect(dest, x, y, w, h, fgcolor, alpha, mode); } #ifndef LICE_FAVOR_SIZE_EXTREME template<class COMBFUNC> #endif class _LICE_Fill { #ifdef LICE_FAVOR_SIZE_EXTREME #define DOPIX(pout,r,g,b,a,ia) combFunc(pout,r,g,b,a,ia); #else #define DOPIX(pout,r,g,b,a,ia) COMBFUNC::doPix(pout,r,g,b,a,ia); #endif public: // da, db are [0..65536] static void FillClippedTrapezoid(LICE_IBitmap* dest, int xa, int xb, int da, int db, int y1, int y2, LICE_pixel color, int aw #ifdef LICE_FAVOR_SIZE_EXTREME , LICE_COMBINEFUNC combFunc #endif ) { int span = dest->getRowSpan(); LICE_pixel* px = dest->getBits()+y1*span+(int)xa; int cr = LICE_GETR(color), cg = LICE_GETG(color), cb = LICE_GETB(color), ca = LICE_GETA(color); int ny = y2-y1; int nx = (int)xb-(int)xa; int y, x; if (!da && !db) { for (y = 0; y < ny; ++y) { LICE_pixel* xpx = px; for (x = 0; x <= nx; ++x) { DOPIX((LICE_pixel_chan*)xpx, cr, cg, cb, ca, aw) ++xpx; } px += span; } return; } int a = 0; int b = 0; int astep = 1; int bstep = 1; if (da < 0) { da = -da; astep = -1; } if (db < 0) { db = -db; bstep = -1; } for (y = 0; y < ny; ++y) { LICE_pixel* xpx = px; for (x = 0; x <= nx; ++x) { DOPIX((LICE_pixel_chan*)xpx, cr, cg, cb, ca, aw) ++xpx; } a += da; b += db; if (a >= 65536) { int na = astep*a/65536; px += na; nx -= na; a %= 65536; } if (b >= 65536) { nx += bstep*b/65536; b %= 65536; } px += span; } } }; template <class COMBFUNC> class _LICE_FillFast { public: // da, db are [0..65536] static void FillClippedTrapezoidFAST(LICE_IBitmap* dest, int xa, int xb, int da, int db, int y1, int y2, LICE_pixel color) { int span = dest->getRowSpan(); LICE_pixel* px = dest->getBits()+y1*span+(int)xa; int ny = y2-y1; int nx = (int)xb-(int)xa; int y, x; if (!da && !db) { for (y = 0; y < ny; ++y) { LICE_pixel* xpx = px; for (x = 0; x <= nx; ++x) { COMBFUNC::doPixFAST(xpx, color); ++xpx; } px += span; } return; } int a = 0; int b = 0; int astep = 1; int bstep = 1; if (da < 0) { da = -da; astep = -1; } if (db < 0) { db = -db; bstep = -1; } for (y = 0; y < ny; ++y) { LICE_pixel* xpx = px; for (x = 0; x <= nx; ++x) { //assert(xpx >= dest->getBits() && xpx < dest->getBits()+dest->getHeight()*span); COMBFUNC::doPixFAST(xpx, color); ++xpx; } a += da; b += db; if (a >= 65536) { int na = astep*a/65536; px += na; nx -= na; a %= 65536; } if (b >= 65536) { nx += bstep*b/65536; b %= 65536; } px += span; } } }; static int FindXOnSegment(int x1, int y1, int x2, int y2, int ty) { if (y1 > y2) { SWAP(x1, x2); SWAP(y1, y2); } if (ty <= y1) return x1; if (ty >= y2) return x2; float dxdy = (float)(x2-x1)/(float)(y2-y1); return x1+(int)((float)(ty-y1)*dxdy); } static int FindYOnSegment(int x1, int y1, int x2, int y2, int tx) { if (x1 > x2) { SWAP(x1, x2); SWAP(y1, y2); } if (tx <= x1) return y1; if (tx >= x2) return y2; float dydx = (float)(y2-y1)/(float)(x2-x1); return y1+(int)((float)(tx-x1)*dydx); } void LICE_FillTrapezoid(LICE_IBitmap* dest, int x1a, int x1b, int y1, int x2a, int x2b, int y2, LICE_pixel color, float alpha, int mode) { if (!dest) return; if (y1 == y2) return; if (y1 > y2) { SWAP(y1, y2); SWAP(x1a, x2a); SWAP(x1b, x2b); } if (x1a > x1b) SWAP(x1a, x1b); if (x2a > x2b) SWAP(x2a, x2b); int w = dest->getWidth(); int h = dest->getHeight(); if (x1b <= 0 && x2b <= 0) return; if (x1a >= w && x2a >= w) return; if (x1a <= 0 && x2a <= 0) x1a = x2a = 0; if (x1b >= w-1 && x2b >= w-1) x1b = x2b = w-1; if (y1 < 0) { if (y2 <= 0) return; x1a = FindXOnSegment(x1a, y1, x2a, y2, 0); x1b = FindXOnSegment(x1b, y1, x2b, y2, 0); y1 = 0; } if (x1b < 0 || x2b < 0) // some scanlines are entirely offscreen left { int y = FindYOnSegment(x1b, y1, x2b, y2, 0); int xa = FindXOnSegment(x1a, y1, x2a, y2, y); if (x2b < 0) { x2a = xa; x2b = 0; y2 = y; } else { x1a = xa; x1b = 0; y1 = y; } } if (x1a >= w || x2a >= w) // some scanlines are entirely offscreen right { int y = FindYOnSegment(x1a, y1, x2a, y2, w); int xb = FindXOnSegment(x1b, y1, x2b, y2, y); if (x2a >= w) { x2a = w; x2b = xb; y2 = y; } else { x1a = w; x1b = xb; y1 = y; } } if (x1a < 0 || x2a < 0) // clip left { int y = FindYOnSegment(x1a, y1, x2a, y2, 0); int xb = FindXOnSegment(x1b, y1, x2b, y2, y); LICE_FillTrapezoid(dest, x1a, x1b, y1, 0, xb, y, color, alpha, mode); LICE_FillTrapezoid(dest, 0, xb, y, x2a, x2b, y2, color, alpha, mode); return; } if (x1b >= w || x2b >= w) // clip right { int y = FindYOnSegment(x1b, y1, x2b, y2, w-1); int xa = FindXOnSegment(x1a, y1, x2a, y2, y); LICE_FillTrapezoid(dest, x1a, x1b, y1, xa, w-1, y, color, alpha, mode); LICE_FillTrapezoid(dest, xa, w-1, y, x2a, x2b, y2, color, alpha, mode); return; } if (y1 == y2) return; float dy = (float)(y2-y1); int dxady = (int)((float)(x2a-x1a)/dy*65536.0f); int dxbdy = (int)((float)(x2b-x1b)/dy*65536.0f); if (y2 > h) y2 = h; int aw = (int)(alpha*256.0f); if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && aw==256) { _LICE_FillFast<_LICE_CombinePixelsClobberFAST>::FillClippedTrapezoidFAST(dest, x1a, x1b, dxady, dxbdy, y1, y2, color); } else if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && aw==128) { color = (color>>1)&0x7f7f7f7f; _LICE_FillFast<_LICE_CombinePixelsHalfMix2FAST>::FillClippedTrapezoidFAST(dest, x1a, x1b, dxady, dxbdy, y1, y2, color); } else if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && aw==64) { color = (color>>2)&0x3f3f3f3f; _LICE_FillFast<_LICE_CombinePixelsQuarterMix2FAST>::FillClippedTrapezoidFAST(dest, x1a, x1b, dxady, dxbdy, y1, y2, color); } else if ((mode&LICE_BLIT_MODE_MASK) == LICE_BLIT_MODE_COPY && aw==192) { color = ((color>>1)&0x7f7f7f7f)+((color>>2)&0x3f3f3f3f); _LICE_FillFast<_LICE_CombinePixelsThreeQuarterMix2FAST>::FillClippedTrapezoidFAST(dest, x1a, x1b, dxady, dxbdy, y1, y2, color); } else { #ifdef LICE_FAVOR_SIZE_EXTREME LICE_COMBINEFUNC blitfunc=NULL; #define __LICE__ACTION(comb) blitfunc=comb::doPix; #else #define __LICE__ACTION(COMBFUNC) _LICE_Fill<COMBFUNC>::FillClippedTrapezoid(dest, x1a, x1b, dxady, dxbdy, y1, y2, color, aw); #endif __LICE_ACTION_CONSTANTALPHA(mode, aw, false); #ifdef LICE_FAVOR_SIZE_EXTREME if (blitfunc) _LICE_Fill::FillClippedTrapezoid(dest, x1a, x1b, dxady, dxbdy, y1, y2, color, aw, blitfunc); #endif #undef __LICE__ACTION } } int _ysort(const void* a, const void* b) { int* xya = (int*)a; int* xyb = (int*)b; if (xya[1] < xyb[1]) return -1; if (xya[1] > xyb[1]) return 1; if (xya[0] < xyb[0]) return -1; if (xya[0] > xyb[0]) return 1; return 0; } #define _X(i) xy[2*(i)] #define _Y(i) xy[2*(i)+1] static int FindNextEdgeVertex(int* xy, int a, int n, int dir) { bool init = false; float dxdy_best; int i, ilo = a; for (i = a+1; i < n; ++i) { if (_Y(i) == _Y(a)) continue; float dxdy = (float)(_X(i)-_X(a))/(float)(_Y(i)-_Y(a)); if (!init || dxdy == dxdy_best || (dir < 0 && dxdy < dxdy_best) || (dir > 0 && dxdy > dxdy_best)) { init = true; ilo = i; dxdy_best = dxdy; } } return ilo; } void LICE_FillConvexPolygon(LICE_IBitmap* dest, const int* x, const int* y, int npoints, LICE_pixel color, float alpha, int mode) { if (!dest) return; if (npoints < 3) return; int* xy = 0; int xyt[1024]; // use stack space if small bool usestack = (npoints <= sizeof(xyt)/sizeof(int)/2); if (usestack) xy = xyt; else xy = (int*)malloc(npoints*sizeof(int)*2); int i; for (i = 0; i < npoints; ++i) { _X(i) = x[i]; _Y(i) = y[i]; if (dest->isFlipped()) _Y(i) = dest->getHeight()-_Y(i)-1; } qsort(xy, npoints, 2*sizeof(int), _ysort); // sorts by y, at same y sorts by x int a1, b1; // index of previous vertex L and R int a2, b2; // index of next vertex L and R int y1; // top and bottom of current trapezoid a1 = b1 = 0; y1 = _Y(0); for (i = 1; i < npoints && _Y(i) == y1; ++i) { if (_X(i) == _X(0)) a1 = i; b1 = i; } a2 = FindNextEdgeVertex(xy, a1, npoints, -1); b2 = FindNextEdgeVertex(xy, b1, npoints, 1); while (a1 != a1 || b1 != b2) { int y_a2 = _Y(a2); int y_b2 = _Y(b2); int y2 = min(y_a2, y_b2); int x1a = FindXOnSegment(_X(a1), _Y(a1), _X(a2), y_a2, y1); int x1b = FindXOnSegment(_X(b1), _Y(b1), _X(b2), y_b2, y1); int x2a = FindXOnSegment(_X(a1), _Y(a1), _X(a2), y_a2, y2); int x2b = FindXOnSegment(_X(b1), _Y(b1), _X(b2), y_b2, y2); LICE_FillTrapezoid(dest, x1a, x1b, y1, x2a, x2b, y2, color, alpha, mode); y1 = y2; if (y_a2 == y1) { a1 = a2; a2 = FindNextEdgeVertex(xy, a2, npoints, -1); } if (y_b2 == y1) { b1 = b2; b2 = FindNextEdgeVertex(xy, b2, npoints, 1); } } if (!usestack) free(xy); } #undef _X #undef _Y void LICE_FillTriangle(LICE_IBitmap *dest, int x1, int y1, int x2, int y2, int x3, int y3, LICE_pixel color, float alpha, int mode) { int x[3] = { x1, x2, x3 }; int y[3] = { y1, y2, y3 }; LICE_FillConvexPolygon(dest, x, y, 3, color, alpha, mode); }
[ [ [ 1, 914 ], [ 947, 1009 ], [ 1011, 1018 ], [ 1020, 1025 ], [ 1027, 1051 ], [ 1056, 1079 ], [ 1081, 1109 ], [ 1111, 1133 ], [ 1135, 1139 ], [ 1178, 1617 ] ], [ [ 915, 946 ], [ 1010, 1010 ], [ 1019, 1019 ], [ 1026, 1026 ], [ 1052, 1055 ], [ 1080, 1080 ], [ 1110, 1110 ], [ 1134, 1134 ], [ 1140, 1177 ] ] ]
e43a9c10c4a5e857e2b378091e4670642fa36932
974a20e0f85d6ac74c6d7e16be463565c637d135
/trunk/packages/dCompilerKit/dLittleScriptLanguage/dDAGExpressionNodeVariable.h
8b9220fcff553f2f4c32508440e7c24fb88cb369
[]
no_license
Naddiseo/Newton-Dynamics-fork
cb0b8429943b9faca9a83126280aa4f2e6944f7f
91ac59c9687258c3e653f592c32a57b61dc62fb6
refs/heads/master
2021-01-15T13:45:04.651163
2011-11-12T04:02:33
2011-11-12T04:02:33
2,759,246
0
0
null
null
null
null
UTF-8
C++
false
false
994
h
/* Copyright (c) <2009> <Newton Game Dynamics> * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely */ #ifndef __dDAGExpressionNodeVariable_H__ #define __dDAGExpressionNodeVariable_H__ #include "dDAG.h" #include "dDAGExpressionNode.h" class dDAGDimensionNode; class dDAGExpressionNodeVariable: public dDAGExpressionNode { public: dDAGExpressionNodeVariable (dList<dDAG*>& allNodes, const char* const identifier, dDAGDimensionNode* const expressionDimIndex); ~dDAGExpressionNodeVariable(void); virtual void CompileCIL(dCIL& cil); virtual void ConnectParent(dDAG* const parent); dList<dDAGDimensionNode*> m_dimExpressions; dAddRtti(dDAGExpressionNode); }; #endif
[ "[email protected]@b7a2f1d6-d59d-a8fe-1e9e-8d4888b32692" ]
[ [ [ 1, 34 ] ] ]
74c0553618582fbfdfe861d0bb87067b9f41b2d3
e7c45d18fa1e4285e5227e5984e07c47f8867d1d
/Application/SysCAD/FLWDOC/ENGSTATE.H
0e8258abc881d2777a3bd5e552232aa86acce7c0
[]
no_license
abcweizhuo/Test3
0f3379e528a543c0d43aad09489b2444a2e0f86d
128a4edcf9a93d36a45e5585b70dee75e4502db4
refs/heads/master
2021-01-17T01:59:39.357645
2008-08-20T00:00:29
2008-08-20T00:00:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,501
h
//================== SysCAD - Copyright Kenwalt (Pty) Ltd =================== // $Nokeywords: $ //=========================================================================== #ifndef __ENGSTATE_H #define __ENGSTATE_H //=========================================================================== #define WITHSFEWND 0 #if WITHSFEWND //=========================================================================== #ifndef __EXECUTIV_H #include "executiv.h" #endif #ifndef __FE_CONST_H #include "..\flwlib\fe_const.h" #endif #define NWorstLines (BadListMax) typedef char WorstLine[128]; _FWDDEF(EngStateWnd) class EngStateWnd : public FxdEdtView, CExecObj { Strng sFlwLibTag; DECLARE_DYNCREATE(EngStateWnd) protected: EngStateWnd(); // protected constructor used by dynamic creation public: virtual void Initialise(); void SetFlwLibName(char *FlwLibTag) { sFlwLibTag=FlwLibTag; }; protected: virtual ~EngStateWnd(); virtual void OnActivateView( BOOL bActivate, CView* pActivateView, CView* pDeactiveView ); virtual void StartBuild(); virtual void Build(int NRows=0, int NCols=0, int ColIndent=0, pvoid BuildData=NULL); virtual void Load(FxdEdtInfo &EI, Strng & Str); virtual long Parse(FxdEdtInfo &EI, Strng & Str); // virtual flag Changed(FxdEdtInfo &EI); // virtual void ClearChanged(FxdEdtInfo &EI); virtual void OnDrawBack(rGDIBlk GB,int PgNo, CRgn &ClipRgn); virtual void OnDrawLine(rGDIBlk GB,int PgNo, int RowNo); // Generated message map functions protected: //{{AFX_MSG(EngStateWnd) //}}AFX_MSG DECLARE_MESSAGE_MAP() public: flag Chnged; Strng CnvTxt[10+NWorstLines]; CCnvIndex iCnv[10+NWorstLines]; pFxdEdtFld TimeFld; pFxdEdtFld TargFld; pFxdEdtFld StopFld; pFxdEdtFld dTimeFld; pFxdEdtFld MultOFld; pFxdEdtFld MultIFld; pFxdEdtFld LoadOFld; pFxdEdtFld LoadIFld; pFxdEdtFld IterGFld; pFxdEdtFld IterBFld; pFxdEdtFld WorstFld[NWorstLines]; pFxdEdtFld pFld[NWorstLines+50]; //rSFELibrary SFE() { return Doc->SFE; }; //void LoadEngStateData(Strng &Data); // CExecObj Overrides virtual flag EO_QueryTime(CXM_TimeControl &CB, CTimeValue &TimeRqd, CTimeValue &dTimeRqd); virtual flag EO_Start(CXM_TimeControl &CB); virtual void EO_QuerySubsReqd(CXMsgLst &XM); virtual void EO_QuerySubsAvail(CXMsgLst &XM, CXMsgLst &XMRet); virtual flag EO_ReadSubsData(CXMsgLst &XM); virtual flag EO_WriteSubsData(CXMsgLst &XM, flag FirstBlock, flag LastBlock); virtual flag EO_Execute(CXM_TimeControl &CB, CEOExecReturn &EORet); virtual flag EO_Stop(CXM_TimeControl &CB); }; //=========================================================================== class CEngStateFrm : public CMDIChildWnd { DECLARE_DYNCREATE(CEngStateFrm) // cnm protected: CEngStateFrm(); // protected constructor used by dynamic creation public: //{{AFX_VIRTUAL(CEngStateFrm) //}}AFX_VIRTUAL protected: virtual ~CEngStateFrm(); //{{AFX_MSG(CEngStateFrm) afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); afx_msg void OnClose(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //=========================================================================== #endif //=========================================================================== #endif
[ [ [ 1, 77 ], [ 80, 83 ], [ 86, 116 ] ], [ [ 78, 79 ], [ 84, 85 ] ] ]
87d75f65cb6bd215b1ed4a18eb28efe0fc9fb64a
478570cde911b8e8e39046de62d3b5966b850384
/apicompatanamdw/bcdrivers/mw/classicui/uifw/apps/S60_SDK3.0/bctestquery/src/bctestqueryvalue.cpp
7ce0fa6b199d8deb9113dfab1a946fc3826dab01
[]
no_license
SymbianSource/oss.FCL.sftools.ana.compatanamdw
a6a8abf9ef7ad71021d43b7f2b2076b504d4445e
1169475bbf82ebb763de36686d144336fcf9d93b
refs/heads/master
2020-12-24T12:29:44.646072
2010-11-11T14:03:20
2010-11-11T14:03:20
72,994,432
0
0
null
null
null
null
UTF-8
C++
false
false
25,128
cpp
/* * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. * * Contributors: * * Description: test case for query value classes * */ #include <w32std.h> #include <eikenv.h> #include <aknqueryvaluedate.h> #include <aknqueryvalueduration.h> #include <aknqueryvaluenumber.h> #include <aknqueryvaluephone.h> #include <aknqueryvaluetext.h> #include <aknqueryvaluetime.h> #include "bctestqueryvalue.h" #include "bctestquerycontainer.h" #include "bctestquery.hrh" #include <bctestquery.rsg> const TInt KTextLength = 64; _LIT( KValueDateTest1, "CAknQueryValueDateArray::NewL" ); _LIT( KValueDateTest2, "CAknQueryValueDateArray::SetArray" ); _LIT( KValueDateTest3, "CAknQueryValueDateArray::FormatString" ); _LIT( KValueDateTest4, "CAknQueryValueDateArray::FormattedStringSize" ); _LIT( KValueDateTest5, "CAknQueryValueDateArray::MdcaCount" ); _LIT( KValueDateTest6, "CAknQueryValueDateArray::MdcaPoint" ); _LIT( KValueDateTest7, "CAknQueryValueDate::NewL" ); _LIT( KValueDateTest8, "CAknQueryValueDate::SetQueryCaption" ); _LIT( KValueDateTest9, "CAknQueryValueDate::SetArrayL" ); _LIT( KValueDateTest10, "CAknQueryValueDate::MdcArray" ); _LIT( KValueDateTest11, "CAknQueryValueDate::SetCurrentValueIndex" ); _LIT( KValueDateTest12, "CAknQueryValueDate::CurrentValueIndex" ); _LIT( KValueDateTest13, "CAknQueryValueDate::Value" ); _LIT( KValueDateTest14, "CAknQueryValueDate::CurrentValueTextLC" ); _LIT( KValueDateTest15, "CAknQueryValueDate::CreateEditorL" ); _LIT( KValueDateTest16, "CAknQueryValue::AppendValueIfNewL" ); _LIT( KValueDateTest17, "CAknQueryValue::SetQueryMode" ); _LIT( KValueDateTest18, "CAknQueryValue::SetSettingPageResourceIds" ); _LIT( KValueDateTest19, "CAknQueryValueDate::SetAutoAppend" ); _LIT( KValueDurationTest1, "CAknQueryValueDurationArray::NewL" ); _LIT( KValueDurationTest2, "CAknQueryValueDurationArray::SetArray" ); _LIT( KValueDurationTest3, "CAknQueryValueDurationArray::FormatString" ); _LIT( KValueDurationTest4, "CAknQueryValueDurationArray::FormattedStringSize" ); _LIT( KValueDurationTest16, "CAknQueryValueDurationArray::FormatDuration" ); _LIT( KValueDurationTest5, "CAknQueryValueDurationArray::MdcaCount" ); _LIT( KValueDurationTest6, "CAknQueryValueDurationArray::MdcaPoint" ); _LIT( KValueDurationTest7, "CAknQueryValueDuration::NewL" ); _LIT( KValueDurationTest8, "CAknQueryValueDuration::SetQueryCaption" ); _LIT( KValueDurationTest9, "CAknQueryValueDuration::SetArrayL" ); _LIT( KValueDurationTest10, "CAknQueryValueDuration::MdcArray" ); _LIT( KValueDurationTest11, "CAknQueryValueDuration::SetCurrentValueIndex" ); _LIT( KValueDurationTest12, "CAknQueryValueDuration::CurrentValueIndex" ); _LIT( KValueDurationTest13, "CAknQueryValueDuration::Value" ); _LIT( KValueDurationTest14, "CAknQueryValueDuration::CurrentValueTextLC" ); _LIT( KValueDurationTest15, "CAknQueryValueDuration::CreateEditorL" ); _LIT( KValueNumberTest1, "CAknQueryValueNumberArray::NewL" ); _LIT( KValueNumberTest2, "CAknQueryValueNumberArray::SetArray" ); _LIT( KValueNumberTest3, "CAknQueryValueNumberArray::FormatString" ); _LIT( KValueNumberTest4, "CAknQueryValueNumberArray::FormattedStringSize" ); _LIT( KValueNumberTest5, "CAknQueryValueNumberArray::MdcaCount" ); _LIT( KValueNumberTest6, "CAknQueryValueNumberArray::MdcaPoint" ); _LIT( KValueNumberTest7, "CAknQueryValueNumber::NewL" ); _LIT( KValueNumberTest8, "CAknQueryValueNumber::SetQueryCaption" ); _LIT( KValueNumberTest9, "CAknQueryValueNumber::SetArrayL" ); _LIT( KValueNumberTest10, "CAknQueryValueNumber::MdcArray" ); _LIT( KValueNumberTest11, "CAknQueryValueNumber::SetCurrentValueIndex" ); _LIT( KValueNumberTest12, "CAknQueryValueNumber::CurrentValueIndex" ); _LIT( KValueNumberTest13, "CAknQueryValueNumber::Value" ); _LIT( KValueNumberTest14, "CAknQueryValueNumber::CurrentValueTextLC" ); _LIT( KValueNumberTest15, "CAknQueryValueNumber::CreateEditorL" ); _LIT( KValuePhoneTest1, "CAknQueryValuePhoneArray::NewL" ); _LIT( KValuePhoneTest2, "CAknQueryValuePhoneArray::SetArray" ); _LIT( KValuePhoneTest4, "CAknQueryValuePhoneArray::FormattedStringSize" ); _LIT( KValuePhoneTest5, "CAknQueryValuePhoneArray::MdcaCount" ); _LIT( KValuePhoneTest6, "CAknQueryValuePhoneArray::MdcaPoint" ); _LIT( KValuePhoneTest7, "CAknQueryValuePhone::NewL" ); _LIT( KValuePhoneTest8, "CAknQueryValuePhone::SetQueryCaption" ); _LIT( KValuePhoneTest9, "CAknQueryValuePhone::SetArrayL" ); _LIT( KValuePhoneTest10, "CAknQueryValuePhone::MdcArray" ); _LIT( KValuePhoneTest11, "CAknQueryValuePhone::SetCurrentValueIndex" ); _LIT( KValuePhoneTest12, "CAknQueryValuePhone::CurrentValueIndex" ); _LIT( KValuePhoneTest13, "CAknQueryValuePhone::Value" ); _LIT( KValuePhoneTest14, "CAknQueryValuePhone::CurrentValueTextLC" ); _LIT( KValuePhoneTest15, "CAknQueryValuePhone::CreateEditorL" ); _LIT( KValueTextTest1, "CAknQueryValueTextArray::NewL" ); _LIT( KValueTextTest2, "CAknQueryValueTextArray::SetArray" ); _LIT( KValueTextTest4, "CAknQueryValueTextArray::FormattedStringSize" ); _LIT( KValueTextTest5, "CAknQueryValueTextArray::MdcaCount" ); _LIT( KValueTextTest6, "CAknQueryValueTextArray::MdcaPoint" ); _LIT( KValueTextTest7, "CAknQueryValueText::NewL" ); _LIT( KValueTextTest8, "CAknQueryValueText::SetQueryCaption" ); _LIT( KValueTextTest9, "CAknQueryValueText::SetArrayL" ); _LIT( KValueTextTest10, "CAknQueryValueText::MdcArray" ); _LIT( KValueTextTest11, "CAknQueryValueText::SetCurrentValueIndex" ); _LIT( KValueTextTest12, "CAknQueryValueText::CurrentValueIndex" ); _LIT( KValueTextTest13, "CAknQueryValueText::Value" ); _LIT( KValueTextTest14, "CAknQueryValueText::CurrentValueTextLC" ); _LIT( KValueTextTest15, "CAknQueryValueText::CreateEditorL" ); // ======== MEMBER FUNCTIONS ======== // --------------------------------------------------------------------------- // Symbian 2nd static Constructor // --------------------------------------------------------------------------- // CBCTestQueryValue* CBCTestQueryValue::NewL( CBCTestQueryContainer* aContainer, CEikonEnv* aEnv ) { CBCTestQueryValue* self = new( ELeave ) CBCTestQueryValue( aContainer, aEnv ); CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop( self ); return self; } // --------------------------------------------------------------------------- // C++ default constructor // --------------------------------------------------------------------------- // CBCTestQueryValue::CBCTestQueryValue( CBCTestQueryContainer* aContainer, CEikonEnv* aEnv ): iContainer( aContainer ), iEnv( aEnv ) { } // --------------------------------------------------------------------------- // Destructor // --------------------------------------------------------------------------- // CBCTestQueryValue::~CBCTestQueryValue() { } // --------------------------------------------------------------------------- // Symbian 2nd Constructor // --------------------------------------------------------------------------- // void CBCTestQueryValue::ConstructL() { BuildScriptL(); } // --------------------------------------------------------------------------- // CBCTestQueryValue::BuildScriptL // --------------------------------------------------------------------------- // void CBCTestQueryValue::BuildScriptL() { for ( TInt i = 0; i <= EBCTestCmdOutline19 - EBCTestCmdOutline14; i++ ) { AddTestL( LeftCBA, REP( Down, 2 ), KeyOK, TEND ); AddTestL( REP( Down, i ), KeyOK, LeftCBA, TEND ); // for outline15 if ( i == EBCTestCmdOutline15 - EBCTestCmdOutline14 ) { AddTestL( LeftCBA, TEND ); } } } // --------------------------------------------------------------------------- // CBCTestQueryValue::RunL // --------------------------------------------------------------------------- // void CBCTestQueryValue::RunL( TInt aCmd ) { if ( aCmd < EBCTestCmdOutline14 || aCmd > EBCTestCmdOutline19 ) { return; } switch ( aCmd ) { case EBCTestCmdOutline14: TestQueryValueDateL(); break; case EBCTestCmdOutline15: TestQueryValueDurationL(); break; case EBCTestCmdOutline16: TestQueryValueNumberL(); break; case EBCTestCmdOutline17: TestQueryValuePhoneL(); break; case EBCTestCmdOutline18: TestQueryValueTextL(); break; case EBCTestCmdOutline19: TestQueryValueTimeL(); break; default: break; } } // --------------------------------------------------------------------------- // Test CAknQueryValueDate // --------------------------------------------------------------------------- // void CBCTestQueryValue::TestQueryValueDateL() { CAknQueryValueDateArray* dateArray = CAknQueryValueDateArray::NewL( R_BCTESTQUERY_DATE_FORMAT ); CleanupStack::PushL( dateArray ); AssertNotNullL( dateArray, KValueDateTest1 ); CArrayFix<TTime>* timeArray = new( ELeave ) CArrayFixFlat<TTime>( 4 ); CleanupStack::PushL( timeArray ); TTime time1; time1.HomeTime(); TTime time2; time2 = time1 + TTimeIntervalDays( 3 ); timeArray->AppendL( time1 ); timeArray->AppendL( time2 ); dateArray->SetArray( *timeArray ); AssertTrueL( ETrue, KValueDateTest2 ); const HBufC* buf = dateArray->FormatString(); AssertTrueL( ETrue, KValueDateTest3 ); const TInt size = dateArray->FormattedStringSize(); AssertTrueL( ETrue, KValueDateTest4 ); TInt mdcaCount = dateArray->MdcaCount(); AssertTrueL( ETrue, KValueDateTest5 ); for ( TInt i = 0; i < mdcaCount; i++ ) { TPtrC text = dateArray->MdcaPoint( i ); } AssertTrueL( ETrue, KValueDateTest6 ); CAknQueryValueDate* date = CAknQueryValueDate::NewL(); CleanupStack::PushL( date ); AssertNotNullL( date, KValueDateTest7 ); date->CAknQueryValue::AppendValueIfNewL(); AssertTrueL( ETrue, KValueDateTest16 ); date->SetQueryMode( MAknQueryValue::ESettingPageMode ); date->SetQueryMode( MAknQueryValue::EQueryMode ); AssertTrueL( ETrue, KValueDateTest17 ); date->SetSettingPageResourceIds( 0, 0 ); AssertTrueL( ETrue, KValueDateTest18 ); date->SetQueryCaption( R_BCTESTQUERY_CAPTION ); AssertTrueL( ETrue, KValueDateTest8 ); date->SetArrayL( dateArray ); AssertTrueL( ETrue, KValueDateTest9 ); const MDesCArray* mdescArray = date->MdcArray(); AssertTrueL( ETrue, KValueDateTest10 ); date->SetCurrentValueIndex( 0 ); AssertTrueL( ETrue, KValueDateTest11 ); TInt index = date->CurrentValueIndex(); AssertTrueL( ETrue, KValueDateTest12 ); TTime dateTime = date->Value(); AssertTrueL( ETrue, KValueDateTest13 ); HBufC* text = date->CurrentValueTextLC(); AssertTrueL( ETrue, KValueDateTest14 ); TBool create = date->CreateEditorL(); AssertTrueL( ETrue, KValueDateTest15 ); date->SetAutoAppend( ETrue ); date->SetAutoAppend( EFalse ); AssertTrueL( ETrue, KValueDateTest19 ); CleanupStack::PopAndDestroy( text ); CleanupStack::PopAndDestroy( date ); CleanupStack::PopAndDestroy( timeArray ); CleanupStack::PopAndDestroy( dateArray ); } // --------------------------------------------------------------------------- // Test CAknQueryValueDuration // --------------------------------------------------------------------------- // void CBCTestQueryValue::TestQueryValueDurationL() { CArrayFix<TTimeIntervalSeconds>* durationArray = new( ELeave ) CArrayFixFlat<TTimeIntervalSeconds>( 2 ); CleanupStack::PushL( durationArray ); TTimeIntervalSeconds dura1( 200 ); TTimeIntervalSeconds dura2( 7800 ); durationArray->AppendL( dura1 ); durationArray->AppendL( dura2 ); CAknQueryValueDurationArray* array = CAknQueryValueDurationArray::NewL( R_BCTESTQUERY_TIME_FORMAT ); CleanupStack::PushL( array ); AssertNotNullL( array, KValueDurationTest1 ); array->SetArray( *durationArray ); AssertTrueL( ETrue, KValueDurationTest2 ); const HBufC* buf = array->FormatString(); AssertTrueL( ETrue, KValueDurationTest3 ); const TInt size = array->FormattedStringSize(); AssertTrueL( ETrue, KValueDurationTest4 ); TBufC<KTextLength> formatText; TPtr ptr( formatText.Des() ); TTimeIntervalSeconds dura( 10000 ); array->FormatDuration( ptr, dura ); AssertTrueL( ETrue, KValueDurationTest16 ); TInt mdcaCount = array->MdcaCount(); AssertTrueL( ETrue, KValueDurationTest5 ); for ( TInt i = 0; i < mdcaCount; i++ ) { TPtrC text = array->MdcaPoint( i ); } AssertTrueL( ETrue, KValueDurationTest6 ); CAknQueryValueDuration* duration = CAknQueryValueDuration::NewL(); CleanupStack::PushL( duration ); AssertNotNullL( duration, KValueDurationTest7 ); duration->SetQueryCaption( R_BCTESTQUERY_CAPTION ); AssertNotNullL( duration, KValueDurationTest8 ); duration->SetArrayL( array ); AssertNotNullL( duration, KValueDurationTest9 ); const MDesCArray* mdescArray = duration->MdcArray(); AssertNotNullL( duration, KValueDurationTest10 ); duration->SetCurrentValueIndex( 1 ); AssertNotNullL( duration, KValueDurationTest11 ); TInt index = duration->CurrentValueIndex(); AssertNotNullL( duration, KValueDurationTest12 ); HBufC* text = duration->CurrentValueTextLC(); AssertNotNullL( duration, KValueDurationTest13 ); TTimeIntervalSeconds secondValue = duration->Value(); AssertNotNullL( duration, KValueDurationTest14 ); duration->CreateEditorL(); AssertNotNullL( duration, KValueDurationTest15 ); CleanupStack::PopAndDestroy( text ); CleanupStack::PopAndDestroy( duration ); CleanupStack::PopAndDestroy( array ); CleanupStack::PopAndDestroy( durationArray ); } // --------------------------------------------------------------------------- // Test CAknQueryValueNumber // --------------------------------------------------------------------------- // void CBCTestQueryValue::TestQueryValueNumberL() { CArrayFix<TInt>* numberArray = new( ELeave ) CArrayFixFlat<TInt>( 2 ); CleanupStack::PushL( numberArray ); numberArray->AppendL( 134567 ); numberArray->AppendL( 25890 ); CAknQueryValueNumberArray* array = CAknQueryValueNumberArray::NewL( R_BCTESTQUERY_NUMBER_FORMAT ); CleanupStack::PushL( array ); AssertNotNullL( array, KValueNumberTest1 ); array->SetArray( *numberArray ); AssertTrueL( ETrue, KValueNumberTest2 ); const HBufC* buf = array->FormatString(); AssertTrueL( ETrue, KValueNumberTest3 ); const TInt stringSize = array->FormattedStringSize(); AssertTrueL( ETrue, KValueNumberTest4 ); TInt mdcaCount = array->MdcaCount(); AssertTrueL( ETrue, KValueNumberTest5 ); for ( TInt i = 0; i < mdcaCount; i++ ) { TPtrC text = array->MdcaPoint( i ); } AssertTrueL( ETrue, KValueNumberTest6 ); CAknQueryValueNumber* number = CAknQueryValueNumber::NewL(); CleanupStack::PushL( number ); AssertNotNullL( number, KValueNumberTest7 ); number->SetQueryCaption( R_BCTESTQUERY_CAPTION ); AssertTrueL( ETrue, KValueNumberTest8 ); number->SetArrayL( array ); AssertTrueL( ETrue, KValueNumberTest9 ); const MDesCArray* mdcArray = number->MdcArray(); AssertTrueL( ETrue, KValueNumberTest10 ); number->SetCurrentValueIndex( 0 ); AssertTrueL( ETrue, KValueNumberTest11 ); TInt index = number->CurrentValueIndex(); AssertTrueL( ETrue, KValueNumberTest12 ); TInt numberValue = number->Value(); AssertTrueL( ETrue, KValueNumberTest13 ); HBufC* text = number->CurrentValueTextLC(); AssertTrueL( ETrue, KValueNumberTest14 ); number->CreateEditorL(); AssertTrueL( ETrue, KValueNumberTest15 ); CleanupStack::PopAndDestroy( text ); CleanupStack::PopAndDestroy( number ); CleanupStack::PopAndDestroy( array ); CleanupStack::PopAndDestroy( numberArray ); } // --------------------------------------------------------------------------- // Test CAknQueryValuePhone // --------------------------------------------------------------------------- // void CBCTestQueryValue::TestQueryValuePhoneL() { CDesCArray* textArray = new( ELeave ) CDesCArrayFlat( 2 ); CleanupStack::PushL( textArray ); _LIT( KPhoneValue1, "010-12345678" ); _LIT( KPhoneValue2, "13512345678" ); textArray->AppendL( KPhoneValue1 ); textArray->AppendL( KPhoneValue2 ); CAknQueryValuePhoneArray* array = CAknQueryValuePhoneArray::NewL(); CleanupStack::PushL( array ); AssertNotNullL( array, KValuePhoneTest1 ); array->SetArray( *textArray ); AssertTrueL( ETrue, KValuePhoneTest2 ); const TInt stringSize = array->FormattedStringSize(); AssertTrueL( ETrue, KValuePhoneTest4 ); TInt mdcaCount = array->MdcaCount(); AssertTrueL( ETrue, KValuePhoneTest5 ); for ( TInt i = 0; i < mdcaCount; i++ ) { TPtrC text = array->MdcaPoint( i ); } AssertTrueL( ETrue, KValuePhoneTest6 ); CAknQueryValuePhone* phone = CAknQueryValuePhone::NewL(); CleanupStack::PushL( phone ); AssertNotNullL( phone, KValuePhoneTest7 ); phone->SetQueryCaption( R_BCTESTQUERY_CAPTION ); AssertTrueL( ETrue, KValuePhoneTest8 ); phone->SetArrayL( array ); AssertTrueL( ETrue, KValuePhoneTest9 ); const MDesCArray* mdcArray = phone->MdcArray(); AssertTrueL( ETrue, KValuePhoneTest10 ); phone->SetCurrentValueIndex( 0 ); AssertTrueL( ETrue, KValuePhoneTest11 ); TInt index = phone->CurrentValueIndex(); AssertTrueL( ETrue, KValuePhoneTest12 ); HBufC* phoneValue = phone->Value(); AssertTrueL( ETrue, KValuePhoneTest13 ); HBufC* text = phone->CurrentValueTextLC(); AssertTrueL( ETrue, KValuePhoneTest14 ); phone->CreateEditorL(); AssertTrueL( ETrue, KValuePhoneTest15 ); CleanupStack::PopAndDestroy( text ); CleanupStack::PopAndDestroy( phone ); CleanupStack::PopAndDestroy( array ); CleanupStack::PopAndDestroy( textArray ); } // --------------------------------------------------------------------------- // Test CAknQueryValueText // --------------------------------------------------------------------------- // void CBCTestQueryValue::TestQueryValueTextL() { CDesCArray* textArray = new( ELeave ) CDesCArrayFlat( 2 ); CleanupStack::PushL( textArray ); _LIT( KTextValue1, "Text Value 1" ); _LIT( KTextValue2, "Text Value 2" ); textArray->AppendL( KTextValue1 ); textArray->AppendL( KTextValue2 ); CAknQueryValueTextArray* array = CAknQueryValueTextArray::NewL(); CleanupStack::PushL( array ); AssertNotNullL( array, KValueTextTest1 ); array->SetArray( *textArray ); AssertTrueL( ETrue, KValueTextTest2 ); const TInt stringSize = array->FormattedStringSize(); AssertTrueL( ETrue, KValueTextTest4 ); TInt mdcaCount = array->MdcaCount(); AssertTrueL( ETrue, KValueTextTest5 ); for ( TInt i = 0; i < mdcaCount; i++ ) { TPtrC text = array->MdcaPoint( i ); } AssertTrueL( ETrue, KValueTextTest6 ); CAknQueryValueText* queryText = CAknQueryValueText::NewL(); CleanupStack::PushL( queryText ); AssertNotNullL( queryText, KValueTextTest7 ); queryText->SetQueryCaption( R_BCTESTQUERY_CAPTION ); AssertTrueL( ETrue, KValueTextTest8 ); queryText->SetArrayL( array ); AssertTrueL( ETrue, KValueTextTest9 ); const MDesCArray* mdcArray = queryText->MdcArray(); AssertTrueL( ETrue, KValueTextTest10 ); queryText->SetCurrentValueIndex( 0 ); AssertTrueL( ETrue, KValueTextTest11 ); TInt index = queryText->CurrentValueIndex(); AssertTrueL( ETrue, KValueTextTest12 ); HBufC* textValue = queryText->Value(); AssertTrueL( ETrue, KValueTextTest13 ); HBufC* text = queryText->CurrentValueTextLC(); AssertTrueL( ETrue, KValueTextTest14 ); queryText->CreateEditorL(); AssertTrueL( ETrue, KValueTextTest15 ); CleanupStack::PopAndDestroy( text ); CleanupStack::PopAndDestroy( queryText ); CleanupStack::PopAndDestroy( array ); CleanupStack::PopAndDestroy( textArray ); } // --------------------------------------------------------------------------- // Test CAknQueryValueTime // --------------------------------------------------------------------------- // void CBCTestQueryValue::TestQueryValueTimeL() { _LIT( KValueTimeTest1, "CAknQueryValueTimeArray::NewL" ); _LIT( KValueTimeTest2, "CAknQueryValueTimeArray::SetArray" ); _LIT( KValueTimeTest3, "CAknQueryValueTimeArray::FormatString" ); _LIT( KValueTimeTest4, "CAknQueryValueTimeArray::FormattedStringSize" ); _LIT( KValueTimeTest5, "CAknQueryValueTimeArray::MdcaCount" ); _LIT( KValueTimeTest6, "CAknQueryValueTimeArray::MdcaPoint" ); _LIT( KValueTimeTest7, "CAknQueryValueTime::NewL" ); _LIT( KValueTimeTest8, "CAknQueryValueTime::SetQueryCaption" ); _LIT( KValueTimeTest9, "CAknQueryValueTime::SetArrayL" ); _LIT( KValueTimeTest10, "CAknQueryValueTime::MdcArray" ); _LIT( KValueTimeTest11, "CAknQueryValueTime::SetCurrentValueIndex" ); _LIT( KValueTimeTest12, "CAknQueryValueTime::CurrentValueIndex" ); _LIT( KValueTimeTest13, "CAknQueryValueTime::Value" ); _LIT( KValueTimeTest14, "CAknQueryValueTime::CurrentValueTextLC" ); _LIT( KValueTimeTest15, "CAknQueryValueTime::CreateEditorL" ); CArrayFix<TTime>* timeArray = new( ELeave ) CArrayFixFlat<TTime>( 4 ); CleanupStack::PushL( timeArray ); TTime time1; time1.HomeTime(); TTime time2; time2 = time1 + TTimeIntervalDays( 3 ); timeArray->AppendL( time1 ); timeArray->AppendL( time2 ); CAknQueryValueTimeArray* array = CAknQueryValueTimeArray::NewL( R_BCTESTQUERY_TIME_FORMAT ); CleanupStack::PushL( array ); AssertNotNullL( array, KValueTimeTest1 ); array->SetArray( *timeArray ); AssertTrueL( ETrue, KValueTimeTest2 ); const HBufC* formatString = array->FormatString(); AssertTrueL( ETrue, KValueTimeTest3 ); const TInt stringSize = array->FormattedStringSize(); AssertTrueL( ETrue, KValueTimeTest4 ); TInt mdcaCount = array->MdcaCount(); AssertTrueL( ETrue, KValueTimeTest5 ); for ( TInt i = 0; i < mdcaCount; i++ ) { TPtrC text = array->MdcaPoint( i ); } AssertTrueL( ETrue, KValueTimeTest6 ); CAknQueryValueTime* queryTime = CAknQueryValueTime::NewL(); CleanupStack::PushL( queryTime ); AssertNotNullL( queryTime, KValueTimeTest7 ); queryTime->SetQueryCaption( R_BCTESTQUERY_CAPTION ); AssertTrueL( ETrue, KValueTimeTest8 ); queryTime->SetArrayL( array ); AssertTrueL( ETrue, KValueTimeTest9 ); const MDesCArray* mdcArray = queryTime->MdcArray(); AssertTrueL( ETrue, KValueTimeTest10 ); queryTime->SetCurrentValueIndex( 0 ); AssertTrueL( ETrue, KValueTimeTest11 ); TInt index = queryTime->CurrentValueIndex(); AssertTrueL( ETrue, KValueTimeTest12 ); TTime timeValue = queryTime->Value(); AssertTrueL( ETrue, KValueTimeTest13 ); HBufC* text = queryTime->CurrentValueTextLC(); AssertTrueL( ETrue, KValueTimeTest14 ); queryTime->CreateEditorL(); AssertTrueL( ETrue, KValueTimeTest15 ); CleanupStack::PopAndDestroy( text ); CleanupStack::PopAndDestroy( queryTime ); CleanupStack::PopAndDestroy( array ); CleanupStack::PopAndDestroy( timeArray ); }
[ "none@none" ]
[ [ [ 1, 657 ] ] ]
0fbd17a4b95a5762a9f96fa14912a58322b031df
9310fd7bac6871c98b216a2e081b19e9232c14ed
/lib/agr/samples/prototype/include/Accelerometer.h
c448a3e7b34d5bf9f1cd7fed15b8f7482b2f7bfa
[]
no_license
baloo/wiidrums
1345525c759a2325274ddbfe182a9549c6c4e325
ed3832d4f91cd9932bfeb321b8aa57340a502d48
refs/heads/master
2016-09-09T18:19:06.403352
2009-05-21T02:04:09
2009-05-21T02:04:09
179,309
2
0
null
null
null
null
UTF-8
C++
false
false
748
h
/** * \file cAccelerometer.h * \brief Declaration for the accelerometer class * \date 15/11/07 */ #ifndef _ACCELEROMETER_H_ #define _ACCELEROMETER_H_ /** * \struct vec3u8_t * \brief Unsigned x,y,z byte vector. */ typedef struct vec3u8_t { unsigned char x, y, z; } vec3u8_t; /** * \class cAccelerometer * \brief Interface for the accelerometers */ class cAccelerometer { public: enum eDevice { InputNone = 0, InputWiimote, InputSixaxis, InputUnknown, }; virtual ~cAccelerometer() {} virtual eDevice getType()=0; virtual bool update()=0; virtual bool release()=0; vec3u8_t m_rawAcceleration; protected: }; // class cAccelerometer #endif // _ACCELEROMETER_H_
[ [ [ 1, 50 ] ] ]
f964d92be99afc80d4cb1cfd921f557f46bb0a51
353bd39ba7ae46ed521936753176ed17ea8546b5
/src/layer1_system/randomizer/src/axrd_mt_randomizer.cpp
fa882a6be41ab1c7f510f589cc59eda5ddd36a26
[]
no_license
d0n3val/axe-engine
1a13e8eee0da667ac40ac4d92b6a084ab8a910e8
320b08df3a1a5254b776c81775b28fa7004861dc
refs/heads/master
2021-01-01T19:46:39.641648
2007-12-10T18:26:22
2007-12-10T18:26:22
32,251,179
1
0
null
null
null
null
UTF-8
C++
false
false
2,639
cpp
/** * @file * A random file generator usign Marsenne Twister * @author Ricard Pillosu <d0n3val\@gmail.com> * @date 18 Apr 2004 */ #include "axrd_mt_randomizer.h" #include <limits.h> /** * Constructor */ mt_rand::mt_rand() : seed( _seed ) { _seed = 5489UL; mti = N + 1; } /** * Destructor */ mt_rand::~mt_rand() { } /** * Init from seed */ void mt_rand::init( const unsigned long randomizer_seed ) { // save the seed _seed = randomizer_seed; mt[0] = _seed & 0xffffffffUL; for( mti = 1; mti < N; mti++ ) { mt[mti] = ( 1812433253UL * (mt[mti - 1] ^ (mt[mti - 1] >> 30)) + mti ); /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ /* In the previous versions, MSBs of the seed affect */ /* only MSBs of the array mt[]. */ /* 2002/01/09 modified by Makoto Matsumoto */ mt[mti] &= 0xffffffffUL; /* for >32 bit machines */ } } /** * generates a random number on [0,0xffffffff]-interval */ unsigned long mt_rand::get_ulong() { unsigned long y; static unsigned long mag01[2]; mag01[0] = 0x0UL; mag01[1] = MATRIX_A; /* mag01[x] = x * MATRIX_A for x=0,1 */ if( mti >= N ) { /* generate N words at one time */ int kk; if( mti == N + 1 ) { /* if init_genrand() has not been called, */ init( _seed ); /* a default initial seed is used */ } for( kk = 0; kk < N - M; kk++ ) { y = ( mt[kk] & UPPER_MASK ) | ( mt[kk + 1] & LOWER_MASK ); mt[kk] = mt[kk + M] ^ ( y >> 1 ) ^ mag01[y & 0x1UL]; } for( ; kk < N - 1; kk++ ) { y = ( mt[kk] & UPPER_MASK ) | ( mt[kk + 1] & LOWER_MASK ); mt[kk] = mt[kk + ( M - N )] ^ ( y >> 1 ) ^ mag01[y & 0x1UL]; } y = ( mt[N - 1] & UPPER_MASK ) | ( mt[0] & LOWER_MASK ); mt[N - 1] = mt[M - 1] ^ ( y >> 1 ) ^ mag01[y & 0x1UL]; mti = 0; } y = mt[mti++]; /* Tempering */ y ^= ( y >> 11 ); y ^= ( y << 7 ) & 0x9d2c5680UL; y ^= ( y << 15 ) & 0xefc60000UL; y ^= ( y >> 18 ); return( y ); } /** * generates a random number on [0,0xffffffff]-interval */ long mt_rand::get_long() { return (long) ( get_ulong() >> 1 ); } /** * generates a random number on [0,1]-real-interval */ double mt_rand::get_double() { return( get_ulong() * (1.0 / 4294967295.0) ); // divided by 2^32-1 } /** * Copy operator */ mt_rand &mt_rand::operator=( const mt_rand& randomizer ) { init( randomizer.seed ); return( *this ); } /* $Id: axrd_mt_randomizer.cpp,v 1.1 2004/05/02 16:32:32 doneval Exp $ */
[ "d0n3val@2cff7946-3f3c-0410-b79f-f9b517ddbf54" ]
[ [ [ 1, 116 ] ] ]
421917676c75019ea4bf0eb033cd3c3570b0cc7e
f9351a01f0e2dec478e5b60c6ec6445dcd1421ec
/itl/example/party/party.cpp
bd5f8a4b07a3a4afe61c3d47f2d72b80025c278c
[ "BSL-1.0" ]
permissive
WolfgangSt/itl
e43ed68933f554c952ddfadefef0e466612f542c
6609324171a96565cabcf755154ed81943f07d36
refs/heads/master
2016-09-05T20:35:36.628316
2008-11-04T11:44:44
2008-11-04T11:44:44
327,076
0
1
null
null
null
null
UTF-8
C++
false
false
4,458
cpp
/*----------------------------------------------------------------------------+ Interval Template Library Author: Joachim Faulhaber Copyright (c) 2007-2008: Joachim Faulhaber Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin +-----------------------------------------------------------------------------+ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENCE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +----------------------------------------------------------------------------*/ #include <stdio.h> #include <iostream> #include <itl/itl_value.hpp> #include <itl/string_set.hpp> #include <itl/split_interval_map.hpp> #include "../toytime.h" using namespace std; using namespace itl; /** Example party.cpp \file Party.cpp Party.cpp demonstrates the possibilities of a split interval map (split_interval_map). A split_interval_map maps intervals to a given content. In this case the content is a set of party guests represented by their name strings. As time goes by, groups of people join the party and leave later in the evening. So we add a time interval and a name set to the split_interval_map for the attendance of each group of people, that come together and leave together. On every overlap of intervals, the corresponding name sets are accumulated. At the points of overlap the intervals are split. The accumulation of content on overlap of intervals is always done via an operator += that has to be implemented for the content parameter of the split_interval_map. Finally the split_interval_map contains the history of attendance and all points in time, where the group of party guests changed. Party.cpp demonstrates a principle that we call <b><em>aggregate on overlap (aggovering;)</em></b>: On insertion a value associated to the interval is aggregated (added) to those values in the split_interval_map that overlap with the inserted value. There are two behavioral aspects to <b>aggovering</b>: a <em>decompositional behavior</em> and a <em>accumulative behavior</em>. The <em>decompositional behavior</em> splits up intervals on the time dimension of the split_interval_map so that the intervals change whenever associated values change. The <em>accumulative behavior</em> accumulates associated values on every overlap of an insertion for the associated values. \include party/party.cpp */ // Type itl::set<string> collects the names of party guests. Therefore it needs to // implement operator += that performs a set union on overlap of intervals. typedef itl::set<string> GuestSetT; // Time is the domain type the the split_interval_map. It's key values are therefore // time intervals: interval<Time>. The content is the set of names: GuestSetT. typedef split_interval_map<Time, GuestSetT> PartyAttendenceHistoryT; void party() { GuestSetT mary_harry; mary_harry.insert("Mary"); mary_harry.insert("Harry"); GuestSetT diana_susan; diana_susan.insert("Diana"); diana_susan.insert("Susan"); GuestSetT peter; peter.insert("Peter"); PartyAttendenceHistoryT party; party += make_pair( rightopen_interval<Time>(Time(19,30), Time(23,00)), mary_harry); party += make_pair( rightopen_interval<Time>(Time(20,10), Time(monday,0,0)), diana_susan); party += make_pair( rightopen_interval<Time>(Time(22,15), Time(monday,0,30)), peter); PartyAttendenceHistoryT::iterator it = party.begin(); while(it != party.end()) { interval<Time> when = (*it).first; // Who is at the party within the time interval 'when' ? GuestSetT who = (*it++).second; cout << when.as_string() << ": " << who.as_string() << endl; } } int main() { cout << ">> Interval Template Library: Sample party.cpp <<\n"; cout << "-------------------------------------------------------\n"; party(); return 0; } // Program output: // >> Interval Template Library: Sample party.cpp << // ------------------------------------------------- // [sun:19:30,sun:20:10): Harry Mary // [sun:20:10,sun:22:15): Diana Harry Mary Susan // [sun:22:15,sun:23:00): Diana Harry Mary Peter Susan // [sun:23:00,mon:00:00): Diana Peter Susan // [mon:00:00,mon:00:30): Peter
[ "jofaber@6b8beb3d-354a-0410-8f2b-82c74c7fef9a" ]
[ [ [ 1, 111 ] ] ]
13b344c90d3f4fe09f077bfb35c11de6a23fa66b
854ee643a4e4d0b7a202fce237ee76b6930315ec
/arcemu_svn/src/sun/src/QuestScripts/FirstAid.cpp
59a85b38fe0835a2082b748b718539da4a10c3f4
[]
no_license
miklasiak/projekt
df37fa82cf2d4a91c2073f41609bec8b2f23cf66
064402da950555bf88609e98b7256d4dc0af248a
refs/heads/master
2021-01-01T19:29:49.778109
2008-11-10T17:14:14
2008-11-10T17:14:14
34,016,391
2
0
null
null
null
null
UTF-8
C++
false
false
4,344
cpp
/* * WEmu Scripts for WEmu MMORPG Server * Copyright (C) 2008 WEmu Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "StdAfx.h" #include "Setup.h" #include "EAS/EasyFunctions.h" #define SAY_DOC1 "I'm saved! Thank you, doctor!" #define SAY_DOC2 "HOORAY! I AM SAVED!" #define SAY_DOC3 "Sweet, sweet embrace... take me..." struct Location { float x, y, z, o; }; static Location AllianceCoords[]= { {-3742.2626, -4536.9624, 14.2759, 3.6178}, // Far Left Bed, Behind {-3750.0925, -4540.1699, 14.2712, 3.5404}, // Far Left Bed {-3754.2653, -4539.0634, 14.1620, 5.1827}, // Left Bed {-3757.5134, -4532.7343, 14.1667, 5.1497}, // Right Bed {-3755.9040, -4529.0385, 14.0517, 0.4200}, // Far Right Bed {-3749.5649, -4526.9609, 14.0764, 5.1297} // Far Right Bed, Behind }; static Location HordeCoords[]= { {-1013.75, -3492.59, 62.62, 4.34}, // Left, Behind {-1017.72, -3490.92, 62.62, 4.34}, // Right, Behind {-1015.77, -3497.15, 62.82, 4.34}, // Left, Mid {-1019.51, -3495.49, 62.82, 4.34}, // Right, Mid {-1017.25, -3500.85, 62.98, 4.34}, // Left, front {-1020.95, -3499.21, 62.98, 4.34} // Right, Front }; #define A_RUNTOX -3742.96 #define A_RUNTOY -4531.52 #define A_RUNTOZ 11.91 #define H_RUNTOX -1016.44 #define H_RUNTOY -3508.48 #define H_RUNTOZ 62.96 const uint32 allianceSoldierId[3] = { 12938, // 12938 Injured Alliance Soldier 12936, // 12936 Badly injured Alliance Soldier 12937 // 12937 Critically injured Alliance Soldier }; const uint32 hordeSoldierId[3] = { 12923, //12923 Injured Soldier 12924, //12924 Badly injured Soldier 12925 //12925 Critically injured Soldier }; class InjuredSoldier : public CreatureAIScript { public: ADD_CREATURE_FACTORY_FUNCTION(InjuredSoldier); InjuredSoldier(Creature* pCreature) : CreatureAIScript(pCreature) {} void OnLoad() { _unit->SetUInt32Value(UNIT_FIELD_BYTES_0, 16777472); _unit->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); _unit->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_COMBAT); _unit->SetUInt32Value(UNIT_FIELD_BYTES_1,7); uint32 sid = _unit->GetEntry(); switch(sid) { case 12923: case 12938: _unit->SetHealthPct(75); break; case 12924: case 12936: _unit->SetHealthPct(50); break; case 12925: case 12937: _unit->SetHealthPct(25); break; } } }; bool Triage(uint32 i, Spell *pSpell) { // Unit* target = pSpell->GetUnitTarget(); // if(!pSpell->p_caster || !target || target->GetTypeId() != TYPEID_UNIT) return true; if(!pSpell->p_caster || pSpell->GetUnitTarget() == NULL) return true; pSpell->p_caster->CastSpell(pSpell->GetUnitTarget(), dbcSpell.LookupEntry(746), true); QuestLogEntry *en = pSpell->p_caster->GetQuestLogForEntry(6624); if(en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0]) { uint32 newcount = en->GetMobCount(0) + 1; en->SetMobCount(0, newcount); en->SendUpdateAddKill(0); en->UpdatePlayerFields(); } // Creature* c_target = (Creature*)target; // if(!c_target) return true; // uint32 creatureID = c_target->GetEntry(); // if(creatureID == 12937) // sQuestMgr.OnPlayerKill(pSpell->p_caster, c_target); return true; } void SetupFirstAid(ScriptMgr * mgr) { mgr->register_creature_script(12923, &InjuredSoldier::Create); mgr->register_creature_script(12924, &InjuredSoldier::Create); mgr->register_creature_script(12925, &InjuredSoldier::Create); mgr->register_creature_script(12936, &InjuredSoldier::Create); mgr->register_creature_script(12937, &InjuredSoldier::Create); mgr->register_creature_script(12938, &InjuredSoldier::Create); mgr->register_dummy_spell(20804, &Triage); }
[ "[email protected]@3074cc92-8d2b-11dd-8ab4-67102e0efeef" ]
[ [ [ 1, 147 ] ] ]
4e14a4bdab79d04bdda78e4d6d8aedf6e716fb44
478570cde911b8e8e39046de62d3b5966b850384
/apicompatanamdw/bcdrivers/os/ossrv/stdlibs/apps/libc/testsocket/inc/tsocket.h
bbe017db0a71b91e595370e8934a82e24ef4342d
[]
no_license
SymbianSource/oss.FCL.sftools.ana.compatanamdw
a6a8abf9ef7ad71021d43b7f2b2076b504d4445e
1169475bbf82ebb763de36686d144336fcf9d93b
refs/heads/master
2020-12-24T12:29:44.646072
2010-11-11T14:03:20
2010-11-11T14:03:20
72,994,432
0
0
null
null
null
null
UTF-8
C++
false
false
7,479
h
/* * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. * * Contributors: * * Description: * */ /* * ============================================================================== * Name : tsocket.h * Part of : testsocket * * Description : ?Description * Version: 0.5 * */ #ifndef __TESTSOCKET_H__ #define __TESTSOCKET_H__ #include <test/TestExecuteStepBase.h> // INCLUDE FILES #include <unistd.h> #include <errno.h> #include <stdio.h> #include <e32std.h> #include <stdlib.h> #include <string.h> #include <e32svr.h> #include <e32def.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <e32std.h> #include <sys/unistd.h> #include <fcntl.h> #include <sys/socket.h> #include <netdb.h> #include <stdio.h> #include <pthread.h> #include <net/if.h> #include <sys/sockio.h> #include <sys/stat.h> #include <sys/select.h> _LIT(KExampleL, "ExampleL"); _LIT(KUDP, "UDP"); _LIT(KTCP, "TCP"); _LIT(KSocketTest, "SocketTest"); _LIT(KGetSocketNameUsingInvalidSocketDescriptor, "GetSocketNameUsingInvalidSocketDescriptor"); _LIT(KGetSocketNameUsingFileDescriptor, "GetSocketNameUsingFileDescriptor"); _LIT(KGetSocketName, "GetSocketName"); _LIT(KGetSocketNameInvalidLength, "GetSocketNameInvalidLength"); _LIT(KGetSocketNameInvalidSocketBuffer, "GetSocketNameInvalidSocketBuffer"); _LIT(KGetPeerSocketName, "GetPeerSocketName"); _LIT(KGetPeerSocketNameUsingFileDescriptor, "GetPeerSocketNameUsingFileDescriptor"); _LIT(KGetPeerSocketNameUsingInvalidSocketDescriptor, "GetPeerSocketNameUsingInvalidSocketDescriptor"); _LIT(KGetPeerSocketNameforUnconnectedSocket, "GetPeerSocketNameforUnconnectedSocket"); _LIT(KGetPeerSocketNameInvalidLengthSockAddr, "GetPeerSocketNameInvalidLengthSockAddr"); _LIT(KBindTest, "BindTest"); _LIT(KMultipleBindOnSameSocket, "MultipleBindOnSameSocket"); _LIT(KBindInvalidAddress, "BindInvalidAddress"); _LIT(KBindUsingInvalidSocketDescriptor, "BindUsingInvalidSocketDescriptor"); _LIT(KBindUsingFileDescriptor, "BindUsingFileDescriptor"); _LIT(KBindFailCases, "BindFailCases"); _LIT(KShutdownTest, "ShutdownTest"); _LIT(KShutDownTestWithInvalidShutdownOption, "ShutDownTestWithInvalidShutdownOption"); _LIT(KShutdownUsingFileDescriptor, "ShutdownUsingFileDescriptor"); _LIT(KShutdownUsingInvalidSocketDescriptor, "ShutdownUsingInvalidSocketDescriptor"); _LIT(KShutdownDisconnectedSocket, "ShutdownDisconnectedSocket"); _LIT(KListenUdp, "ListenUdp"); _LIT(KListenTest, "ListenTest"); _LIT(KListenUsingFileDescriptor, "ListenUsingFileDescriptor"); _LIT(KListenUsingInvalidSocketDescriptor, "ListenUsingInvalidSocketDescriptor"); _LIT(KAcceptTest, "AcceptTest"); _LIT(KUDPAccept, "UDPAccept"); _LIT(KAcceptUsingFileDescriptor, "AcceptUsingFileDescriptor"); _LIT(KAcceptUsingInvalidSocketDescriptor, "AcceptUsingInvalidSocketDescriptor"); _LIT(KAcceptFailCases, "AcceptFailCases"); _LIT(KConnectTestFailCases, "ConnectTestFailCases"); _LIT(KConnectUsingFileDescriptor, "ConnectUsingFileDescriptor"); _LIT(KConnectUsingInvalidSocketDescriptor, "ConnectUsingInvalidSocketDescriptor"); _LIT(KRecvUsingFileDescriptor, "RecvUsingFileDescriptor"); _LIT(KRecvUsingInvalidSocketDescriptor, "RecvUsingInvalidSocketDescriptor"); _LIT(KRecvTestFailCases, "RecvTestFailCases"); _LIT(KSendTestFailCases, "SendTestFailCases"); _LIT(KSendUsingFileDescriptor, "SendUsingFileDescriptor"); _LIT(KSendUsingInvalidSocketDescriptor, "SendUsingInvalidSocketDescriptor"); _LIT(KSocketOptions, "SocketOptions"); _LIT(KGetSockOptFailCases, "GetSockOptFailCases"); _LIT(KSetSockOptFailCases, "SetSockOptFailCases"); _LIT(KSendToTestFailCases, "SendToTestFailCases"); _LIT(KSendToUsingFileDescriptor, "SendToUsingFileDescriptor"); _LIT(KSendToUsingInvalidSocketDescriptor, "SendToUsingInvalidSocketDescriptor"); _LIT(KRecvFromTestFailCases, "RecvFromTestFailCases"); _LIT(KSockAtMark, "SockAtMark"); _LIT(KBindResvPort, "BindResvPort"); _LIT(KBindResvPortFailCases, "BindResvPortFailCases"); _LIT(KHErrNoLocation, "HErrNoLocation"); _LIT(KSendMsgRecvMsg, "SendMsgRecvMsg"); _LIT(KGetHostName, "GetHostName"); _LIT(KGetHostNameNull, "GetHostNameNull"); _LIT(KGetHostNameZero, "GetHostNameZero"); _LIT(KTestRecv, "TestRecv"); _LIT(KTestReadStream, "TestReadStream"); _LIT(KTestReadDatagram, "TestReadDatagram"); _LIT(KTestSktlseek, "TestSktlseek"); _LIT(KTestSockAfLocal, "TestSockAfLocal"); _LIT(KTestSktfstat, "TestSktfstat"); _LIT(KTestSktfsync, "TestSktfsync"); _LIT(KTestGreaterThan16kReadWrite, "TestGreaterThan16kReadWrite"); class CTestSocket : public CTestStep { public: ~CTestSocket(); CTestSocket(const TDesC& aStepName); TVerdict doTestStepL(); TVerdict doTestStepPreambleL(); TVerdict doTestStepPostambleL(); private: void GetParameters(char aParamets[10][256]); TInt ExampleL(); TInt UDP( ); TInt TCP( ); TInt GetSocketName( ); TInt GetSocketNameUsingFileDescriptor( ); TInt GetSocketNameUsingInvalidSocketDescriptor( ); TInt GetSocketNameInvalidLength( ); TInt GetSocketNameInvalidSocketBuffer( ); TInt GetPeerSocketName( ); TInt GetPeerSocketNameUsingFileDescriptor( ); TInt GetPeerSocketNameUsingInvalidSocketDescriptor( ); TInt GetPeerSocketNameforUnconnectedSocket( ); TInt GetPeerSocketNameInvalidLengthSockAddr( ); TInt BindTest( ); TInt MultipleBindOnSameSocket( ); TInt BindInvalidAddress( ); TInt BindUsingInvalidSocketDescriptor( ); TInt BindUsingFileDescriptor( ); TInt ShutdownTest( ); TInt ShutDownTestWithInvalidShutdownOption( ); TInt ShutdownUsingFileDescriptor( ); TInt ShutdownUsingInvalidSocketDescriptor( ); TInt ShutdownDisconnectedSocket( ); TInt SocketTest(); TInt ListenTest(); TInt ListenUsingFileDescriptor(); TInt ListenUsingInvalidSocketDescriptor(); TInt AcceptTest(); TInt UDPAccept(); TInt AcceptUsingFileDescriptor(); TInt AcceptUsingInvalidSocketDescriptor(); TInt ConnectTestFailCases(); TInt ConnectUsingFileDescriptor(); TInt ConnectUsingInvalidSocketDescriptor(); TInt RecvTestFailCases(); TInt RecvUsingInvalidSocketDescriptor(); TInt RecvUsingFileDescriptor(); TInt SendTestFailCases(); TInt SendUsingFileDescriptor(); TInt SendUsingInvalidSocketDescriptor(); TInt SocketOptions(); TInt GetSockOptFailCases(); TInt SetSockOptFailCases(); TInt SendToTestFailCases(); TInt SendToUsingFileDescriptor(); TInt SendToUsingInvalidSocketDescriptor(); TInt RecvFromTestFailCases(); TInt SockAtMark(); TInt BindResvPort(); TInt BindResvPortFailCases(); TInt HErrNoLocation(); TInt SendMsgRecvMsg(); TInt TestRecv(); TInt TestReadStream(); TInt TestReadDatagram(); TInt BindFailCases(); TInt AcceptFailCases(); TInt ListenUdp(); TInt GetHostName(); TInt GetHostNameNull(); TInt GetHostNameZero(); TInt TestSktlseek(); TInt TestSockAfLocal(); TInt TestSktfstat(); TInt TestSktfsync(); TInt TestGreaterThan16kReadWrite(); }; #endif
[ "none@none" ]
[ [ [ 1, 206 ] ] ]
f6e54d2891c5f7658a5b9ba2600df62765ab361a
fbc3438654b8f87ea452a88922cb8510a4330946
/ bsplgin-kinnect/Kinnect/KinectDevice/KinectDev.cpp
52a1ffaa00bd6edf0f53a06c94e8cae13f73a31b
[]
no_license
m17design/bsplgin-kinnect
444910413a4f3355fca547cc7c73872228e422e7
55fc16e20def07c192dfe12e4251afe3f05ab062
refs/heads/master
2020-12-24T14:52:57.912679
2011-11-21T01:39:37
2011-11-21T01:39:37
35,226,304
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
2,209
cpp
// KinectDev.cpp : CKinectDev µÄʵÏÖ #include "stdafx.h" #include "ControlKinect.h" #include "QueryNode.h" #include "KinectDev.h" #include "blaxxunVRML.h" #include <iostream> CKinectDev::CKinectDev(): m_user_com(NULL), m_status(NULL), m_skeletonNode(NULL), m_floorNode(NULL), m_handsTrack(NULL) { } CKinectDev::~CKinectDev(){ Close_Kinect(); } STDMETHODIMP CKinectDev::InterfaceSupportsErrorInfo(REFIID riid) { static const IID* arr[] = { &IID_IbxxHID }; for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++) { if (InlineIsEqualGUID(*arr[i],riid)) return S_OK; } return S_FALSE; } HRESULT STDMETHODCALLTYPE CKinectDev::Init(BSTR Device, int DeviceNo, Browser *pBrowser, int *pDeviceNoUsed) { DeviceNo=1; *pDeviceNoUsed= 1; return S_OK; } HRESULT STDMETHODCALLTYPE CKinectDev::AddDeviceSensor(BSTR eventType, Node *pEventNode, EventInSFBool *pIsActive, BOOL Enabled, int ID, int *pRetVal) { if(Enabled){ Node *skltn,*hnz,*flr; QuerySFNode(pEventNode,L"skeleton",IID_EventOutSFNode,&m_skeletonNode,&skltn); QuerySFNode(pEventNode,L"handsTrack",IID_EventOutSFNode,&m_handsTrack,&hnz); QuerySFNode(pEventNode,L"floor",IID_EventOutSFNode,&m_floorNode,&flr); QuerySFNode(skltn,L"enabled",IID_EventOutSFBool,&m_enabledSkltn); QuerySFNode(hnz,L"enabled",IID_EventOutSFBool,&m_enabledHnz); skltn->Release(); hnz->Release(); flr->Release(); skltn=hnz=flr=NULL; if (Init_Kinect(m_skeletonNode,m_handsTrack,m_floorNode)!=XN_STATUS_OK) { Close_Kinect(); return E_FAIL; } } *pRetVal=1; return S_OK; } HRESULT STDMETHODCALLTYPE CKinectDev::RemoveDeviceSensor(int ID){ return S_OK; } HRESULT STDMETHODCALLTYPE CKinectDev::Tick(double SimTime, double FrameRate){ VARIANT_BOOL vlu,vlu1; m_enabledSkltn->getValue(&vlu); m_enabledHnz->getValue(&vlu1); updateKinect(vlu,vlu1); return S_OK; } HRESULT STDMETHODCALLTYPE CKinectDev::EnabledChanged(int ID, BOOL Enabled, BOOL *pSetIsActive){ *pSetIsActive=true; return S_OK; } HRESULT STDMETHODCALLTYPE CKinectDev::FocusChanged(BOOL HasFocusNow, BOOL *pNeedTickCalls){ *pNeedTickCalls=true; return S_OK; }
[ "[email protected]@de213022-5fe8-a698-7246-ddc94966b96f" ]
[ [ [ 1, 89 ] ] ]
c8355802e94ae078b5504b91c11645b5b54526c9
a0bc9908be9d42d58af7a1a8f8398c2f7dcfa561
/SlonEngine/extensions/PythonBindings/scene/src/PyMatrixTransform.cpp
d523b964f4a5c6e3f92b946ef1d9e57c4a6e06f1
[]
no_license
BackupTheBerlios/slon
e0ca1137a84e8415798b5323bc7fd8f71fe1a9c6
dc10b00c8499b5b3966492e3d2260fa658fee2f3
refs/heads/master
2016-08-05T09:45:23.467442
2011-10-28T16:19:31
2011-10-28T16:19:31
39,895,039
0
0
null
null
null
null
UTF-8
C++
false
false
1,244
cpp
#include "stdafx.h" #include "PyMatrixTransform.h" #include "Scene/MatrixTransform.h" #include <boost/python.hpp> using namespace boost::python; using namespace slon::scene; // wrappers matrix_transform_ptr MatrixTransformCreate1(const std::string& name) { return matrix_transform_ptr( new MatrixTransform(name) ); } matrix_transform_ptr MatrixTransformCreate2(const math::Matrix4f& matrix) { return matrix_transform_ptr( new MatrixTransform(matrix) ); } matrix_transform_ptr MatrixTransformCreate3(const std::string& name, const math::Matrix4f& matrix) { return matrix_transform_ptr( new MatrixTransform(name, matrix) ); } void exportMatrixTransform() { class_<MatrixTransform, bases<Group>, boost::intrusive_ptr<MatrixTransform>, boost::noncopyable>("MatrixTransform", init<>()) .def("__init__", make_constructor(MatrixTransformCreate1)) .def("__init__", make_constructor(MatrixTransformCreate2)) .def("__init__", make_constructor(MatrixTransformCreate3)); implicitly_convertible< boost::intrusive_ptr<MatrixTransform>, boost::intrusive_ptr<Group> >(); implicitly_convertible< boost::intrusive_ptr<MatrixTransform>, boost::intrusive_ptr<Node> >(); }
[ "devnull@localhost" ]
[ [ [ 1, 34 ] ] ]
921e3c424fd379ccc41c1b83992e7053e263e5ab
cd07acbe92f87b59260478f62a6f8d7d1e218ba9
/src/CSampleGrabberCB_np.cpp
ff2c03ed7915dc82633d5634e03864258c427601
[]
no_license
niepp/sperm-x
3a071783e573d0c4bae67c2a7f0fe9959516060d
e8f578c640347ca186248527acf82262adb5d327
refs/heads/master
2021-01-10T06:27:15.004646
2011-09-24T03:33:21
2011-09-24T03:33:21
46,690,957
1
1
null
null
null
null
GB18030
C++
false
false
2,386
cpp
#include "StdAfx.h" #include "CSampleGrabberCB_np.h" #include "SpermView.h" #include "View3.h" #include "ImageProcess.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif extern CSpermView* theView1; extern CView3* theView3; STDMETHODIMP CSampleGrabberCB_np::BufferCB( double SampleTime, BYTE * pBuffer, long BufferLen ) { int &nFrameNum = theView3->m_pwndLiveDetectDlg->m_nFrameNum; int &nFrameCount = theView3->m_pwndLiveDetectDlg->m_nFrmCount; if( theView3->m_pwndLiveDetectDlg->m_bCanCap && (nFrameNum--) % (theView3->m_pwndLiveDetectDlg->m_nIntrv) == 0) { BITMAPINFOHEADER bi; //信息头 memset(&bi, 0, sizeof(BITMAPINFOHEADER)); bi.biSize = sizeof(BITMAPINFOHEADER); bi.biWidth = Width; bi.biHeight = Height; bi.biPlanes = 1; bi.biBitCount = 32; bi.biSizeImage = BufferLen; // 先释放原来的空间 if(theView1->m_lpBMIH[FRAME_NUM - nFrameCount] != NULL) { delete []theView1->m_lpBMIH[FRAME_NUM - nFrameCount]; theView1->m_lpBMIH[FRAME_NUM - nFrameCount] = NULL; } if( theView1->m_lpImage[FRAME_NUM - nFrameCount] != NULL ) { delete []theView1->m_lpImage[FRAME_NUM - nFrameCount]; theView1->m_lpImage[FRAME_NUM - nFrameCount] = NULL; } if( theView1->m_lpBMIH[FRAME_NUM - nFrameCount] == NULL ) theView1->m_lpBMIH[FRAME_NUM - nFrameCount] = new BITMAPINFOHEADER; memcpy(theView1->m_lpBMIH[FRAME_NUM - nFrameCount], &bi, sizeof(BITMAPINFOHEADER)); if( theView1->m_lpImage[FRAME_NUM - nFrameCount] == NULL ) theView1->m_lpImage[FRAME_NUM - nFrameCount] = new unsigned char[BufferLen]; memcpy(theView1->m_lpImage[FRAME_NUM - nFrameCount], pBuffer, BufferLen); LPBITMAPINFOHEADER& head = theView1->m_lpBMIH[FRAME_NUM - nFrameCount]; LPBYTE& data = theView1->m_lpImage[FRAME_NUM - nFrameCount]; nFrameCount --; CString strInfo; if( nFrameCount == 0 ) strInfo.Format("视频捕获完毕!"); else strInfo.Format("正在捕获视频第(%d/%d)帧", FRAME_NUM - nFrameCount, FRAME_NUM ); ::SendMessage(theView3->m_pwndLiveDetectDlg->m_hWnd,USER_MESSAGE_SHOW_CAPTURE_PROGRESS,(WPARAM)&strInfo,0); if (nFrameCount == 0) { theView3->m_pwndLiveDetectDlg->m_bCanCap = false; theView1->PostMessage(USER_MM_CAP_FRM_HAS_BEEN_FINISHED); } } return 0; }
[ "harithchen@e030fd90-5f31-5877-223c-63bd88aa7192" ]
[ [ [ 1, 71 ] ] ]
9fa3f601b61d957b992dbf47412baa739c927f8f
845083c2ab45d9f913bba4aed7d76944acbe0eee
/Source/SADStepProgram/TestTimer.cpp
d129d7fed96b590b9b6422ebf404d2a5516068bb
[]
no_license
smaudet/sadstep
8fdb51229b6415fab06528e0063c6a821141b137
7854693083f6cd31f6a26c738d0c054d9af5161e
refs/heads/master
2020-06-04T21:22:12.444714
2010-11-06T20:26:21
2010-11-06T20:26:21
32,900,819
0
0
null
null
null
null
UTF-8
C++
false
false
994
cpp
#include "TestTimer.h" #include "MediaPlayer.h" #include "SongCatalogue.h" #include "FileIOServer.h" #include <QtDebug> TestTimer::TestTimer() { canvas = new GameCanvas(4,this,45); this->startTimer(7000); this->startTimer(3000); MediaPlayer* p = new MediaPlayer; FileIOServer* fio = new FileIOServer(); const SongCatalogue* sc = fio->getSongCatalogue(); QString loc = sc->getFileName(0); qDebug() << fio->getSongReader(loc)->getSongFile(); canvas->start(); qDebug() << canvas->getDistance(); spawnNum=0; } void TestTimer::timerEvent(QTimerEvent* e){ qDebug() << e->timerId() << "timer"; switch(spawnNum) { case 0: { spawnNum++; canvas->spawnArrow(200,1); this->killTimer(e->timerId()); break; } case 1: { spawnNum++; canvas->spawnHoldArrow(400,600,2); this->killTimer(e->timerId()); break; } default: { } } }
[ "smaudet2@da972e84-c3cd-11de-84d4-09c59dc0309f" ]
[ [ [ 1, 39 ] ] ]
beaadccb8492834b194efe7888ca878fb67e675b
1cc5720e245ca0d8083b0f12806a5c8b13b5cf98
/archive/2254/c.cpp
6e31082d823dee710df1d996e898fee2b4ad78a1
[]
no_license
Emerson21/uva-problems
399d82d93b563e3018921eaff12ca545415fd782
3079bdd1cd17087cf54b08c60e2d52dbd0118556
refs/heads/master
2021-01-18T09:12:23.069387
2010-12-15T00:38:34
2010-12-15T00:38:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
167
cpp
#include <iostream> using namespace std; int main() { int n; char p1[200],p2[200]; while((cin >> n) && n) { cin >> p1; } return 0; }
[ [ [ 1, 17 ] ] ]
012c065b867a4bb4c22203750e2007197303db6d
10bac563fc7e174d8f7c79c8777e4eb8460bc49e
/splam/splam_data.cpp
0abafda062fd64fba6e1bb2e17dd306108dd234d
[]
no_license
chenbk85/alcordev
41154355a837ebd15db02ecaeaca6726e722892a
bdb9d0928c80315d24299000ca6d8c492808f1d5
refs/heads/master
2021-01-10T13:36:29.338077
2008-10-22T15:57:50
2008-10-22T15:57:50
44,953,286
0
1
null
null
null
null
ISO-8859-13
C++
false
false
5,766
cpp
#include <fstream> #include "splam_data.h" #include "detail/value_iteration.h" #include "alcor/core/iniwrapper.h" //----------------------------------------------------------------------------------------------- using namespace all::util; //----------------------------------------------------------------------------------------------- namespace all{ namespace splam{ splam_data::splam_data(const char* name) { iniWrapper ini(name); og_row_ = ini.GetInt("mappa:larghezza",0); og_col_ = ini.GetInt("mappa:altezza",0); og_resolution_ = ini.GetDouble("mappa:dim_cella",0.0); } void splam_data::save_og_pgm(const char* filename) const { std::ofstream file(filename,std::ios::binary); //FILE *file; //file = fopen(filename, "w+"); //fprintf(file, "P5 %d %d 255\n", og_row_, og_col_); file << "P5 "<<og_row_<<" "<<og_col_<<" 255\n"; for (int i = 0; i < og_col_*og_row_; i++) { unsigned char d = static_cast<unsigned char>( 127 - og_cells_.at(i)); //fwrite(&d, 1, 1, file); file<<d; } //fclose(file); } void splam_data::save_sg_pgm(const char* filename) const { std::ofstream file(filename,std::ios::binary); file << "P5 "<<og_row_<<" "<<og_col_<<" 255\n"; for (int i = 0; i < og_col_*og_row_; i++) { unsigned char d = static_cast<unsigned char>( 127 - og_cells_.at(i)); file<<d; } } void splam_data::metric_goal_finding() { //// STEP 1: STRUCTURE INITIALIZATION //std::cout<< "splam_data::metric_goal_finding() ....... FASE 1"<<std::endl; // variables definitions and initializations static value_iteration vi(og_row_, og_col_, static_cast<int>(og_resolution_*100.0)); size2d curr_coord = get_current_coord(); size2d sizee = vi.get_size(); size_t i,j; int temp; //std::cout<< "splam_data::metric_goal_finding() ....... FASE 2"<<std::endl; // primo passaggio, serve per porre a zero le zone unknown for(i=0;i<sizee.row_;++i) { for(j=0;j<sizee.col_;++j) { temp = og_cells_[i*sizee.col_+j]; if(temp == 0) vi.set_row_col(i,j,0,0); else vi.set_row_col(i,j,100000000,(temp+128)); } } //std::cout<< "splam_data::metric_goal_finding() ....... FASE 3"<<std::endl; // secondo passaggio, serve per porre a infinito i muri e le zone troppo vicine ai muri for(i=0;i<sizee.row_;++i) for(j=0;j<sizee.col_;++j) if(og_cells_[i*sizee.col_+j]>0) vi.set_untouch_area(i,j,static_cast<int>(0.30/og_resolution_)); //std::cout<< "splam_data::metric_goal_finding() ....... FASE 4"<<std::endl; // ultima condizione: il robot non puņ trovarsi in aree inaccessibili for(i=curr_coord.row_-1;i<=curr_coord.row_+1;++i) for(j=curr_coord.col_-1;j<=curr_coord.col_+1;++j) if(in_map(i,j)) vi.set_searchable(i,j,(static_cast<int>(og_cells_[i*sizee.col_+j])+128)); //// STEP 2: LOOP //std::cout<< "splam_data::metric_goal_finding() ....... FASE 5"<<std::endl; // loop value_iteration_info info=vi.loop(); //// STEP 3: CALCULATE UNEXPLORED PATH //std::cout<< "splam_data::metric_goal_finding() ....... FASE 6"<<std::endl; // structures setting sizes2d path; goal_.reset(); if(!vi.get_path(curr_coord,path)) { if(!path_.empty()) goal_.goal_far_ = path_.back(); goal_.path_.push_back(goal_.goal_far_.getP()); }else{ for(sizes2d_it it=path.begin(); it!=path.end();++it) goal_.path_.push_back(get_position_of(*it)); if(!goal_.path_.empty()) { goal_.goal_far_ = pose2d(goal_.path_.back(),angle(0.0,rad_tag)); }else{ goal_.goal_far_ = get_current_position(); goal_.path_.push_back(goal_.goal_far_.getP()); } } //std::cout<< "splam_data::metric_goal_finding() ....... FASE 7"<<std::endl; size_t sizzo = static_cast<size_t>(1.0/og_resolution_); if(goal_.path_.size()<sizzo) goal_.goal_near_ = goal_.goal_far_; else goal_.goal_near_ = pose2d(goal_.path_.at(sizzo-1),angle(0.0,deg_tag)); goal_.is_valid_=true; goal_.recognition_ = false; goal_.head_direction_ = (goal_.goal_near_.getP()-get_current_position().getP()).orientation(); goal_.relative_head_direction_ = goal_.head_direction_ - get_current_position().getTh(); #if 0 //std::cout<< "splam_data::metric_goal_finding() ....... FASE 8"<<std::endl; //// STEP 4: LOG DATA ON FILE std::ostringstream namefile; namefile << "metric_goal_find" << path_.size() << ".txt"; std::ofstream filelog(namefile.str().c_str(), std::ios::out); filelog << "goal near: "<< goal_.goal_near_ << std::endl; filelog << "goal near coord: "<< get_coord_of(goal_.goal_near_.getP()) << std::endl; filelog << "goal far: "<< goal_.goal_far_ << std::endl; filelog << "goal far coord: "<< get_coord_of(goal_.goal_far_.getP()) << std::endl<< std::endl; filelog << "current position: "<< get_current_position() << std::endl; filelog << "current coord: "<< get_current_coord() << " - Value: "<< vi.get_row_col(get_current_coord()).value<< std::endl<< std::endl; filelog << "vi path size: "<< path.size() << std::endl; filelog << "vi path: " << std::endl; for(i=0;i<path.size();i++) filelog << i << " - Coord: "<<path[i]<<" - Position: "<< get_position_of(path[i]) << " - Value: "<< vi.get_row_col(path[i]).value<< std::endl; filelog << std::endl <<"path size: "<< path_.size() << std::endl; filelog << "path: "<< std::endl; i=0; for(poses2d_it it =path_.begin(); it!= path_.end(); ++it) filelog << i++ << " - Coord: "<< *it << std::endl; //// log Value data //for(i=0;i<sizee.row_;++i) //{ // for(j=0;j<sizee.col_;++j) // filelog << vi.get_row_col(i,j).value << " "; // filelog << std::endl; //} //std::cout<< "splam_data::metric_goal_finding() ....... FASE 9"<<std::endl; #endif } }//namespace splam }//namespace all
[ "giorgio.ugazio@1c7d64d3-9b28-0410-bae3-039769c3cb81", "andrea.carbone@1c7d64d3-9b28-0410-bae3-039769c3cb81" ]
[ [ [ 1, 22 ], [ 37, 41 ], [ 48, 169 ] ], [ [ 23, 36 ], [ 42, 47 ] ] ]
2e42a6b3e790f789c36dc4fbb7226546283f3595
dba70d101eb0e52373a825372e4413ed7600d84d
/RendererComplement/include/RenderTarget.h
a67e747dd6a42a8b6e7f5bab93ee581afc3b6eec
[]
no_license
nustxujun/simplerenderer
2aa269199f3bab5dc56069caa8162258e71f0f96
466a43a1e4f6e36e7d03722d0d5355395872ad86
refs/heads/master
2021-03-12T22:38:06.759909
2010-10-02T03:30:26
2010-10-02T03:30:26
32,198,944
0
0
null
null
null
null
UTF-8
C++
false
false
569
h
#ifndef _RenderTarget_H_ #define _RenderTarget_H_ #include "Prerequisites.h" #include "MemoryBuffer.h" namespace RCP { class RenderTarget: public MemoryBuffer { public : RenderTarget(unsigned int width, unsigned int height, unsigned int colourDepth); virtual ~RenderTarget(); unsigned int getWidth()const; unsigned int getHeight()const; unsigned int getColourDepth()const; void swap(RenderTarget& rt); private: unsigned int mWidth; unsigned int mHeight; unsigned int mColourDepth; }; } #endif//_RenderTarget_H_
[ "[email protected]@c2606ca0-2ebb-fda8-717c-293879e69bc3" ]
[ [ [ 1, 27 ] ] ]
c502b9294f4ab1ed274e1a811716a1cea22c4c4e
073dfce42b384c9438734daa8ee2b575ff100cc9
/RCF/include/RCF/Amd.hpp
d056b8d65324697012ca58e202f2a7c4ba816623
[]
no_license
r0ssar00/iTunesSpeechBridge
a489426bbe30ac9bf9c7ca09a0b1acd624c1d9bf
71a27a52e66f90ade339b2b8a7572b53577e2aaf
refs/heads/master
2020-12-24T17:45:17.838301
2009-08-24T22:04:48
2009-08-24T22:04:48
285,393
1
0
null
null
null
null
UTF-8
C++
false
false
2,705
hpp
//****************************************************************************** // RCF - Remote Call Framework // Copyright (c) 2005 - 2009, Jarl Lindrud. All rights reserved. // Consult your license for conditions of use. // Version: 1.1 // Contact: jarl.lindrud <at> gmail.com //****************************************************************************** #ifndef INCLUDE_RCF_AMD_HPP #define INCLUDE_RCF_AMD_HPP #include <boost/any.hpp> #include <RCF/Export.hpp> #include <RCF/RcfSession.hpp> #include <RCF/ThreadLocalData.hpp> // Temporary hack for now #include <RCF/TcpIocpServerTransport.hpp> namespace RCF { class I_Parameters; class RCF_EXPORT AmdImpl { public: AmdImpl() { mRcfSessionPtr = RCF::getCurrentRcfSessionPtr(); mRcfSessionPtr->mAutoSend = false; mpParametersUntyped = mRcfSessionPtr->mpParameters; IocpSessionState & sessionState = dynamic_cast<IocpSessionState &>( mRcfSessionPtr->getProactor()); mSessionStatePtr = sessionState.shared_from_this(); } void commit() { mRcfSessionPtr->sendResponse(); mpParametersUntyped = NULL; mRcfSessionPtr.reset(); mSentry = boost::any(); mSessionStatePtr.reset(); } void commit(const std::exception &e) { mRcfSessionPtr->sendResponse(e); mpParametersUntyped = NULL; mRcfSessionPtr.reset(); mSentry = boost::any(); mSessionStatePtr.reset(); } private: boost::any mSentry; RcfSessionPtr mRcfSessionPtr; // Temporary hack to keep the session state alive... IocpSessionStatePtr mSessionStatePtr; protected: I_Parameters * mpParametersUntyped; }; template< typename R, typename A1 = Void, typename A2 = Void, typename A3 = Void, typename A4 = Void, typename A5 = Void, typename A6 = Void, typename A7 = Void, typename A8 = Void> class Amd : public AmdImpl { public: typedef ServerParameters<R, A1, A2, A3, A4, A5, A6, A7, A8> ParametersT; Amd() { RCF_ASSERT( dynamic_cast<ParametersT *>(mpParametersUntyped) ); } ParametersT &parameters() { return * static_cast<ParametersT *>(mpParametersUntyped);; } }; } // namespace RCF #endif // ! INCLUDE_RCF_AMD_HPP
[ [ [ 1, 107 ] ] ]
b66298ee1b15362109e6e1f96abe8204bdbd7fa1
6e563096253fe45a51956dde69e96c73c5ed3c18
/dhnetsdk/netsdk/NetPlayBack/NetPlayBackBuffer.h
59bc22e1b3172cf5cf3488ddaf705d84a717cede
[]
no_license
15831944/phoebemail
0931b76a5c52324669f902176c8477e3bd69f9b1
e10140c36153aa00d0251f94bde576c16cab61bd
refs/heads/master
2023-03-16T00:47:40.484758
2010-10-11T02:31:02
2010-10-11T02:31:02
null
0
0
null
null
null
null
GB18030
C++
false
false
1,519
h
#if !defined NETPLAYBACKBUFFER_H_ #define NETPLAYBACKBUFFER_H_ #include "../StdAfx.h" typedef bool (__stdcall *NetPlayBackBufferPause) (bool bPause, void *userdata); /*下面这个枚举描述的是不同的原因在暂停标志中所占的位*/ enum PauseResumeID { BUFFER_SHORT = 0, //因为缓冲区不够而暂停 BUFFER_RESET, //因为缓冲区要清空而暂停 BUFFER_OTHER, //其它 }; class CNetPlayBackBuffer { public: CNetPlayBackBuffer(); ~CNetPlayBackBuffer(); public: bool init(int nTotalSize, int nMaxWriteSize, int nMinWriteSize, NetPlayBackBufferPause pPauseFunc, void *userdata); bool IsInited(); bool AddData(unsigned char *data, int datalen); int GetData(unsigned char *data, int datalen); void DecDataLength(int datalen); void Reset(); void IsRePause(); void Pause(enum PauseResumeID id); void Resume(enum PauseResumeID id); int GetSize() { return m_nWritePos - m_nReadPos;} protected: DEVMutex m_csBuf; int m_nTotalSize; int m_nMaxWriteSize; int m_nMinWriteSize; unsigned char *m_pData; int m_nReadPos; int m_nWritePos; int m_bWriteFlag; int m_iPauseFlag; NetPlayBackBufferPause m_pPauseFunc; void *m_userdata; protected: int OutputState(); private: BOOL IsPaused(enum PauseResumeID id); }; #endif
[ "guoqiao@a83c37f4-16cc-5f24-7598-dca3a346d5dd" ]
[ [ [ 1, 64 ] ] ]
3463981a83f5d962596521f9eadaedee1c979b16
74e7667ad65cbdaa869c6e384fdd8dc7e94aca34
/MicroFrameworkPK_v4_1/BuildOutput/public/debug/Client/stubs/corlib_native_System_Random_mshl.cpp
f9c81e9f8a21965f86182458e7258a9e334ea5e8
[ "BSD-3-Clause", "OpenSSL", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
gezidan/NETMF-LPC
5093ab223eb9d7f42396344ea316cbe50a2f784b
db1880a03108db6c7f611e6de6dbc45ce9b9adce
refs/heads/master
2021-01-18T10:59:42.467549
2011-06-28T08:11:24
2011-06-28T08:11:24
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,181
cpp
//----------------------------------------------------------------------------- // // ** DO NOT EDIT THIS FILE! ** // This file was generated by a tool // re-running the tool will overwrite this file. // //----------------------------------------------------------------------------- #include "corlib_native.h" #include "corlib_native_System_Random.h" using namespace System; HRESULT Library_corlib_native_System_Random::Next___I4( CLR_RT_StackFrame& stack ) { TINYCLR_HEADER(); hr = S_OK; { CLR_RT_HeapBlock* pMngObj = Interop_Marshal_RetrieveManagedObject( stack ); FAULT_ON_NULL(pMngObj); INT32 retVal = Random::Next( pMngObj, hr ); TINYCLR_CHECK_HRESULT( hr ); SetResult_INT32( stack, retVal ); } TINYCLR_NOCLEANUP(); } HRESULT Library_corlib_native_System_Random::Next___I4__I4( CLR_RT_StackFrame& stack ) { TINYCLR_HEADER(); hr = S_OK; { CLR_RT_HeapBlock* pMngObj = Interop_Marshal_RetrieveManagedObject( stack ); FAULT_ON_NULL(pMngObj); INT32 param0; TINYCLR_CHECK_HRESULT( Interop_Marshal_INT32( stack, 1, param0 ) ); INT32 retVal = Random::Next( pMngObj, param0, hr ); TINYCLR_CHECK_HRESULT( hr ); SetResult_INT32( stack, retVal ); } TINYCLR_NOCLEANUP(); } HRESULT Library_corlib_native_System_Random::NextDouble___R8( CLR_RT_StackFrame& stack ) { TINYCLR_HEADER(); hr = S_OK; { CLR_RT_HeapBlock* pMngObj = Interop_Marshal_RetrieveManagedObject( stack ); FAULT_ON_NULL(pMngObj); double retVal = Random::NextDouble( pMngObj, hr ); TINYCLR_CHECK_HRESULT( hr ); SetResult_double( stack, retVal ); } TINYCLR_NOCLEANUP(); } HRESULT Library_corlib_native_System_Random::NextBytes___VOID__SZARRAY_U1( CLR_RT_StackFrame& stack ) { TINYCLR_HEADER(); hr = S_OK; { CLR_RT_HeapBlock* pMngObj = Interop_Marshal_RetrieveManagedObject( stack ); FAULT_ON_NULL(pMngObj); CLR_RT_TypedArray_UINT8 param0; TINYCLR_CHECK_HRESULT( Interop_Marshal_UINT8_ARRAY( stack, 1, param0 ) ); Random::NextBytes( pMngObj, param0, hr ); TINYCLR_CHECK_HRESULT( hr ); } TINYCLR_NOCLEANUP(); } HRESULT Library_corlib_native_System_Random::_ctor___VOID( CLR_RT_StackFrame& stack ) { TINYCLR_HEADER(); hr = S_OK; { CLR_RT_HeapBlock* pMngObj = Interop_Marshal_RetrieveManagedObject( stack ); FAULT_ON_NULL(pMngObj); Random::_ctor( pMngObj, hr ); TINYCLR_CHECK_HRESULT( hr ); } TINYCLR_NOCLEANUP(); } HRESULT Library_corlib_native_System_Random::_ctor___VOID__I4( CLR_RT_StackFrame& stack ) { TINYCLR_HEADER(); hr = S_OK; { CLR_RT_HeapBlock* pMngObj = Interop_Marshal_RetrieveManagedObject( stack ); FAULT_ON_NULL(pMngObj); INT32 param0; TINYCLR_CHECK_HRESULT( Interop_Marshal_INT32( stack, 1, param0 ) ); Random::_ctor( pMngObj, param0, hr ); TINYCLR_CHECK_HRESULT( hr ); } TINYCLR_NOCLEANUP(); }
[ [ [ 1, 113 ] ] ]
8aa01344ad5161fe896d9a2cf51b0650ae1ed1a8
a5de93e77bb09813c1fd20f0120bdb0a22dcbedd
/src/downloadmaid_app.cpp
941518f61940be8700c0204bdaa6188d74fd0a87
[]
no_license
RangelReale/downloadmaid
2ba00048914ad9656ba724fe161b1f34d32393b6
9dd3ae1f9a58ce58429fd25f60a930244475967c
refs/heads/master
2023-09-03T01:59:53.001892
2009-12-10T17:01:53
2009-12-10T17:01:53
37,156,317
0
0
null
null
null
null
UTF-8
C++
false
false
188
cpp
#include "downloadmaid.h" #include <QtGui/QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); DownloadMaid w; w.showMaximized(); return a.exec(); }
[ "hitnrun@b7624517-a67e-4ab1-8c24-78beb50344db" ]
[ [ [ 1, 10 ] ] ]
1f0d3a098afbb49bcfd94704c2ec532fe88cbd73
c2abb873c8b352d0ec47757031e4a18b9190556e
/src/vortex-server/Server.h
3d1047f9ff22cb8f0867a8187c45b926437c6564
[]
no_license
twktheainur/vortex-ee
70b89ec097cd1c74cde2b75f556448965d0d345d
8b8aef42396cbb4c9ce063dd1ab2f44d95e994c6
refs/heads/master
2021-01-10T02:26:21.913972
2009-01-30T12:53:21
2009-01-30T12:53:21
44,046,528
0
0
null
null
null
null
UTF-8
C++
false
false
1,477
h
/*"The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.*/ /*CLASS Server: Spawns all the threads of the application and starts the TCPServer*/ #ifndef SERVER_H_ #define SERVER_H_ extern "C" { #include <pthread.h> } #include "TCPServer.h" #include "WorldManager.h" #include "../common/Event.h" #include "ClientManagerIn.h" #include "ClientManagerOut.h" #include <vector> class ConnectionManager; class TCPServer; typedef struct cthreads { ClientManagerIn * in; ClientManagerOut * out; }cthreads_t; class Server { private: //Thread Classes ConnectionManager * connectionManagerThread; WorldManager * worldManagerThread; //Clients will be registered in here by the TCPServer through the ConnectionManager vector<cthreads_t> clients; TCPServer * server; public: inline vector<cthreads_t>* getClients(){return &clients;} inline void setServer(TCPServer * serv){server=serv;} inline TCPServer * getServer(){return server;} //Here event has to point to a global scope variable sharable by threads Server(); ~Server(); }; #endif /*SERVER_H_*/
[ "twk.theainur@37e2baaa-b253-11dd-9381-bf584fb1fa83" ]
[ [ [ 1, 51 ] ] ]
636c2c4e3c78b09a4e2717dc150a14776ef5a715
3bfe835203f793ee00bdf261c26992b1efea69ed
/fall08/cs460/project/cs460_1/Macros.h
427d02ef8597eaa3c22305c1a7c2b529a5902841
[]
no_license
yxrkt/DigiPen
0bdc1ed3ee06e308b4942a0cf9de70831c65a3d3
e1bb773d15f63c88ab60798f74b2e424bcc80981
refs/heads/master
2020-06-04T20:16:05.727685
2009-11-18T00:26:56
2009-11-18T00:26:56
814,145
1
3
null
null
null
null
UTF-8
C++
false
false
813
h
///////////////////////////////////////////////// // // File: "Macros.h" // // Author: Jason Jurecka // // Creation Date: June 9, 2003 // // Purpose: made this file to store all the macros ///////////////////////////////////////////////// #ifndef _MACROS_H_ #define _MACROS_H_ #include <algorithm> //Delete an Array safely #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } } //Delete an object pointer #define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } } //Release an object pointer #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } } #ifdef max #undef max #endif #ifdef min #undef min #endif template < typename T> static inline T clamp( const T &n, const T &lo, const T &hi ) { return std::min( std::max( lo, n ), hi ); } #endif
[ [ [ 1, 40 ] ] ]
bba48ac86ee0b7f51decbe3009026db70341b697
7ba7440b6a7b6068c900d561ad03c3ff86439c09
/GalDemo/GalDemo/VideoEffect.h
98c49d56b2a4b1c10f8956b5b3d9e871068025b8
[]
no_license
weimingtom/gal-demo
96dc06f8f02b4c767412aac7fcf050e241b40c04
f2b028591a195516af3ce33d084b7b29cbea84aa
refs/heads/master
2021-01-20T11:47:07.598476
2011-08-10T23:48:43
2011-08-10T23:48:43
42,379,726
2
0
null
null
null
null
UTF-8
C++
false
false
287
h
#pragma once #include "renderableobject.h" class CVideoEffect : public CRenderableObject { public: CVideoEffect(float delay, int id); virtual ~CVideoEffect(void); virtual int Update(float dt); protected: float m_delay; float m_timer; float m_progress; };
[ [ [ 1, 17 ] ] ]
ec5a3d2f00b27b410b3025e9009229ec79c4b606
07e88c109af86db6aa3194cbb71c41d449f1a805
/Code/m3wheelbrach/object.h
acdbcac555dc12f0ffd2cac6535919e78da9cbfb
[]
no_license
jbongard/ISCS
2a7fe528140aa24631022807c5af34d7442a122d
a7f7196a2a729564bd033abc13cdf4acb172edfb
refs/heads/master
2016-09-05T08:44:10.630025
2011-08-17T15:31:58
2011-08-17T15:31:58
2,222,304
1
1
null
null
null
null
UTF-8
C++
false
false
2,904
h
/* An object is an object that exists within the simulator. It may or may not be active: if it active, it affects the physics of the simulation. If it is not, it is only drawn translucently. */ #include <ode/ode.h> #include <drawstuff/drawstuff.h> #include "iostream" #include "fstream" using namespace std; #ifndef _OBJECT_H #define _OBJECT_H #include "lightSensor.h" #include "touchSensor.h" #include "robot.h" class OBJECT { public: class ENVIRONMENT *containerEnvironment; class ROBOT *containerRobot; int shape; double color[3]; double radius; double length, width, height; double x, y, z; double rotX, rotY, rotZ; int active; LIGHT_SENSOR *lightSensor; TOUCH_SENSOR *touchSensor; dBodyID body; private: double pos[3]; dReal R[12]; double sides[3]; int hidden; int state; dMass m; dGeomID geom; public: OBJECT( int sh, double l, double w, double h, double posX, double posY, double posZ, double rX, double rY, double rZ); OBJECT( int sh, double radius, double length, double posX, double posY, double posZ, double rX, double rY, double rZ); OBJECT( int sh, double radius, double posX, double posY, double posZ, double rX, double rY, double rZ); OBJECT( ROBOT *cR, OBJECT *other ); OBJECT( ENVIRONMENT *cE, OBJECT *other ); OBJECT( ROBOT *cR, ifstream *inFile ); OBJECT( ENVIRONMENT *cE, ifstream *inFile ); ~OBJECT(); void Activate(void); void Deactivate(void); void Draw(void); void Get_Position(double *pos); void Hide(void); int Is_Cylinder(void); int Is_Incorporeal(void); int Is_Part_Of_Robot(void); int Is_Physical(void); int Is_Rectangular_Solid(void); void Make_Incorporeal(void); void Make_Physical(dWorldID world, dSpaceID space); void Make_Solid(dWorldID world, dSpaceID space); void Move(double deltaX, double deltaY, double deltaZ); void Reproduce(void); void Resize(double changeX, double changeY, double changeZ); void Save(ofstream *outFile); void Sensor_Light_Add(void); void Sensor_Touch_Add(void); void Sensor_Touch_Clear(void); void Sensor_Touch_Set(void); void Sensor_Touch_Print(void); int Sensors_Number_Of(void); void Sensors_Update(void); void Set_Color(double r, double g, double b); void Unhide(void); private: void Destroy(void); void Draw_Geometrically(void); void Draw_Physically(void); void Draw_Solidly(void); bool File_Exists(char *fileName); int File_Index_Next_Available(void); void Initialize(double posX, double posY, double posZ, double rX, double rY, double rZ); void Initialize(OBJECT *other); void Initialize(ifstream *inFile); void Initialize_Cylinder(ifstream *inFile); void Initialize_Rectangular_Solid(ifstream *inFile); void Remove_From_Simulator(void); void Save_Cylinder(ofstream *outFile); void Save_Rectangular_Solid(ofstream *outFile); void Sensors_Reset(void); }; #endif
[ [ [ 1, 115 ] ] ]
0e77d6da7e4d2ee02a0f85ee8257eb3e159be35f
89d2197ed4531892f005d7ee3804774202b1cb8d
/GWEN/include/Gwen/Font.h
b149a32766fd575ffef50c5755a54221b2f8e603
[ "MIT", "Zlib" ]
permissive
hpidcock/gbsfml
ef8172b6c62b1c17d71d59aec9a7ff2da0131d23
e3aa990dff8c6b95aef92bab3e94affb978409f2
refs/heads/master
2020-05-30T15:01:19.182234
2010-09-29T06:53:53
2010-09-29T06:53:53
35,650,825
0
0
null
null
null
null
UTF-8
C++
false
false
690
h
/* GWEN Copyright (c) 2010 Facepunch Studios See license in Gwen.h */ #pragma once #include <string> #include <list> #include "Gwen/BaseRender.h" namespace Gwen { struct Font { typedef std::list<Font*> List; Font() { data = NULL; facename = L"Arial"; size = 10; dropshadow = false; bold = false; } UnicodeString facename; float size; bool bold; bool dropshadow; // This should be set by the renderer // if it tries to use a font where it's // NULL. void* data; // This is the real font size, after it's // been scaled by Render->Scale() float realsize; }; } //namespace Gwen
[ "haza55@5bf3a77f-ad06-ad18-b9fb-7d0f6dabd793" ]
[ [ [ 1, 49 ] ] ]
1667aad270b0d329050f46cf7cd8547d4f4f4ac7
b37fc774441962380592e67129fe6ab93502a3b8
/spider/spider.h
b88ef249487f70851228b2beb3f7430e45d61042
[]
no_license
duckwing/web-categorizer
fb718fbc561eb113080ab0f53541f5a42779f22a
4edbba7c3fd8fa1d6ee5c596c169735132f7f94e
refs/heads/master
2021-01-23T19:39:05.038018
2010-06-03T16:39:47
2010-06-03T16:39:47
33,122,822
0
0
null
null
null
null
UTF-8
C++
false
false
749
h
#ifndef __UTILS_H__ #define __UTILS_H__ // // This header is intended to be precompiled // // // STL // #include <string> #include <algorithm> #include <iostream> using namespace std; // // Qt // #include <QtCore> #include <QtNetwork> #include <QtSql> // // utils // #define sizeof_a(a) (sizeof(a)/sizeof(a[0])) #define DIRECT_CONNECT(sender, signal, receiver, slot, signature) \ QObject::connect(sender, SIGNAL(signal signature), receiver, SLOT(slot signature), Qt::DirectConnection) #define QUEUED_CONNECT(sender, signal, receiver, slot, signature) \ QObject::connect(sender, SIGNAL(signal signature), receiver, SLOT(slot signature), Qt::QueuedConnection) #endif // __UTILS_H__
[ "jin@localhost" ]
[ [ [ 1, 40 ] ] ]
f1719c69217602515034115957dd1319f17d7de0
197ac28d1481843225f35aff4aa85f1909ef36bf
/mcucpp/tiny_ios.h
914edcf63e6d52d577434e36a33d6500f50adbf2
[ "BSD-3-Clause" ]
permissive
xandroalmeida/Mcucpp
831e1088eb38dfcf65bfb6fb3205d4448666983c
6fc5c8d5b9839ade60b3f57acc78a0ed63995fca
refs/heads/master
2020-12-24T12:13:53.497692
2011-11-21T15:36:03
2011-11-21T15:36:03
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,517
h
#ifndef TINY_IOS_H__ #define TINY_IOS_H__ namespace IO { template<class CharT> class CharTrates; template<> class CharTrates<char> { public: static char DigitToLit(unsigned digit) { return (digit < 10 ? '0' : 'a' - 10) + digit; } static char Minus() { return '-'; } static char Plus() { return '+'; } static int SrtLen(const char *str){return strlen(str);} static const char * False(){return "false";} static const char * True(){return "true";} }; template<> class CharTrates<wchar_t> { public: static wchar_t DigitToLit(unsigned digit) { return (digit < 10 ? L'0' : L'a' - 10) + digit; } static wchar_t Minus() { return L'-'; } static wchar_t Plus() { return '+'; } static int SrtLen(const wchar_t *str) { const wchar_t *ptr = str; while(*ptr++); return ptr - str - 1; } static const wchar_t * False(){return L"false";} static const wchar_t * True(){return L"true";} }; #if (defined(__ICCAVR__) || defined(__AVR__) || defined(__AVR) || defined(AVR)) && !defined(TINY_IOS_LARGE_STREAM_SIZE) typedef unsigned char streamsize_t; #else typedef unsigned streamsize_t; #endif class ios_base { ios_base(const ios_base&); ios_base& operator=(const ios_base&); public: ios_base() :_flags(right) {} enum fmtflags { boolalpha = 1 << 0, dec = 1 << 1, fixed = 1 << 2, hex = 1 << 3, internal = 1 << 4, left = 1 << 5, oct = 1 << 6, right = 1 << 7, scientific = 1 << 8, showbase = 1 << 9, showpoint = 1 << 10, showpos = 1 << 11, skipws = 1 << 12, unitbuf = 1 << 13, uppercase = 1 << 14, adjustfield = left | right | internal, basefield = dec | oct | hex, floatfield = scientific | fixed }; enum iostate { goodbit = 0, badbit = 1 << 0, eofbit = 1 << 1, failbit = 1 << 2 }; enum seekdir { beg = 0, cur = 1, end = 2 }; enum openmode { app = 1 << 0, ate = 1 << 1, binary = 1 << 2, in = 1 << 3, out = 1 << 4, trunc = 1 << 5 }; inline fmtflags flags ( ) const; inline fmtflags flags ( fmtflags fmtfl ); inline fmtflags setf ( fmtflags fmtfl ); inline fmtflags setf ( fmtflags fmtfl, fmtflags mask ); inline fmtflags unsetf ( fmtflags mask ); inline streamsize_t width ( ) const; inline streamsize_t width ( streamsize_t width ); inline streamsize_t precision ( ) const; inline streamsize_t precision ( streamsize_t prec ); private: fmtflags _flags; streamsize_t _width; streamsize_t _prec; }; DECLARE_ENUM_OPERATIONS(ios_base::fmtflags) DECLARE_ENUM_OPERATIONS(ios_base::iostate) template<class CharT> class basic_ios :public ios_base { public: basic_ios() :_fillch(' ') {} inline bool good () const; inline bool fail () const; inline bool bad () const; inline bool eof ( ) const; inline iostate rdstate ( ) const; inline void setstate ( iostate state ); inline void clear ( iostate state = goodbit ); inline CharT fill ( ) const; inline CharT fill ( CharT fillch ); protected: iostate _state; CharT _fillch; }; typedef basic_ios<char> ios; typedef basic_ios<wchar_t> wios; } #include <impl/tiny_ios.h> #endif
[ [ [ 1, 21 ], [ 26, 172 ] ], [ [ 22, 25 ] ] ]
8f4160d7d128f90d71e5a8a44eda0715c0202a0f
9c62af23e0a1faea5aaa8dd328ba1d82688823a5
/rl/trunk/engine/script/include/SoundNodeProcessor.h
d8eaa64f22011760e6b170b32243b0c73ce94910
[ "ClArtistic", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
jacmoe/dsa-hl-svn
55b05b6f28b0b8b216eac7b0f9eedf650d116f85
97798e1f54df9d5785fb206c7165cd011c611560
refs/heads/master
2021-04-22T12:07:43.389214
2009-11-27T22:01:03
2009-11-27T22:01:03
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,118
h
/* This source file is part of Rastullahs Lockenpracht. * Copyright (C) 2003-2008 Team Pantheon. http://www.team-pantheon.de * * This program is free software; you can redistribute it and/or modify * it under the terms of the Clarified Artistic License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * Clarified Artistic License for more details. * * You should have received a copy of the Clarified Artistic License * along with this program; if not you can get it here * http://www.jpaulmorrison.com/fbp/artistic2.htm. */ #ifndef __SoundNodeProcessor_H__ #define __SoundNodeProcessor_H__ #include "ScriptPrerequisites.h" #include "AbstractMapNodeProcessor.h" namespace rl { class SoundNodeProcessor : public AbstractMapNodeProcessor { public: virtual bool processNode(const TiXmlElement* nodeElem, const Ogre::String& resourceGroup, bool loadGameObjects); }; } #endif // __SoundNodeProcessor_H__
[ "blakharaz@4c79e8ff-cfd4-0310-af45-a38c79f83013" ]
[ [ [ 1, 32 ] ] ]
0df287c62ab7b65e55cd70914ee9c3a359f6b38a
535d66763ae4d6957b7ca38f1c940720ed34fcfe
/stdafx.cpp
1a83bf8ebb5388083b69e73e16165b38ef385841
[]
no_license
beru/pngquant_gui
b038ed2d47417beb9b310274b236d96f7585d922
f883848b1fd14c5c30fdc0683739f3cbfa412499
refs/heads/master
2021-01-01T18:07:45.246457
2011-10-16T14:06:38
2011-10-16T14:06:38
2,585,340
0
0
null
null
null
null
UTF-8
C++
false
false
289
cpp
// stdafx.cpp : source file that includes just the standard includes // pngquant_gui.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" #if (_ATL_VER < 0x0700) #include <atlimpl.cpp> #endif //(_ATL_VER < 0x0700)
[ [ [ 1, 9 ] ] ]
056e0a89639828f23422ea532eee090e6b148bb2
bfe8eca44c0fca696a0031a98037f19a9938dd26
/DDEPrint/StdAfx.h
2c58332638a791a7551ad7185e649fbe9a76c684
[]
no_license
luge/foolject
a190006bc0ed693f685f3a8287ea15b1fe631744
2f4f13a221a0fa2fecab2aaaf7e2af75c160d90c
refs/heads/master
2021-01-10T07:41:06.726526
2011-01-21T10:25:22
2011-01-21T10:25:22
36,303,977
0
0
null
null
null
null
UTF-8
C++
false
false
1,106
h
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #if !defined(AFX_STDAFX_H__CD75A210_17B4_4ABB_B833_AF55C163AB24__INCLUDED_) #define AFX_STDAFX_H__CD75A210_17B4_4ABB_B833_AF55C163AB24__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #include <afx.h> #include <afxwin.h> // MFC core and standard components #include <afxext.h> // MFC extensions #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #ifndef _AFX_NO_AFXCMN_SUPPORT #include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT #include <iostream> // TODO: reference additional headers your program requires here //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_STDAFX_H__CD75A210_17B4_4ABB_B833_AF55C163AB24__INCLUDED_)
[ "greatfoolbear@756bb6b0-a119-0410-8338-473b6f1ccd30" ]
[ [ [ 1, 30 ] ] ]
ff4f0bb1444edc97ae19c683cb5d23403d2638f4
fa134e5f64c51ccc1c2cac9b9cb0186036e41563
/GT/TurnCoordinator.cpp
774818588ce8f7f1f4ec8727e9e4a312b216cf34
[]
no_license
dlsyaim/gradthes
70b626f08c5d64a1d19edc46d67637d9766437a6
db6ba305cca09f273e99febda4a8347816429700
refs/heads/master
2016-08-11T10:44:45.165199
2010-07-19T05:44:40
2010-07-19T05:44:40
36,058,688
0
1
null
null
null
null
UTF-8
C++
false
false
308
cpp
#include "stdafx.h" #include <stdio.h> #include <olectl.h> #include <math.h> #include <GL\gl.h> #include <string> #include <vector> #include "TurnCoordinator.h" TurnCoordinator::TurnCoordinator(void) { } TurnCoordinator::~TurnCoordinator(void) { }
[ "[email protected]@3a95c3f6-2b41-11df-be6c-f52728ce0ce6" ]
[ [ [ 1, 16 ] ] ]
e59980ddd728a98c50a59250f6e7a125ad34f707
be2e23022d2eadb59a3ac3932180a1d9c9dee9c2
/GameServer/MapGroupKernel/RoleManager.cpp
563e3d2ce439e5c62ba6f4821553f746007605e1
[]
no_license
cronoszeu/revresyksgpr
78fa60d375718ef789042c452cca1c77c8fa098e
5a8f637e78f7d9e3e52acdd7abee63404de27e78
refs/heads/master
2020-04-16T17:33:10.793895
2010-06-16T12:52:45
2010-06-16T12:52:45
35,539,807
0
2
null
null
null
null
GB18030
C++
false
false
6,306
cpp
#include "windows.h" #include "define.h" #include "RoleManager.h" #include "MapGroup.h" #include "AllMsg.h" #include "NPC.h" MYHEAP_IMPLEMENTATION(CRoleManager,s_heap) CRoleManager::CRoleManager(PROCESS_ID idProcess) : m_idProcess(idProcess) { m_setRole = CRoleSet::CreateNew(true); } CRoleManager::~CRoleManager() { if(m_setRole) m_setRole->Release(); } bool CRoleManager::Create() { CHECKF(m_setRole); // need not LoadAllPet(); return true; } bool CRoleManager::LoadAllPet() //??? 最好由AI服务器分段创建 { CHECKF(m_setRole); char szSQL[1024]; sprintf(szSQL, "SELECT * FROM %s", _TBL_PET); IRecordset* pRes = Database()->CreateNewRecordset(szSQL); if(pRes) { for(int i = 0; i < pRes->RecordCount(); i++, pRes->MoveNext()) { CMonster* pMonster = CMonster::CreateNew(); IF_OK(pMonster) { if(pMonster->Create(m_idProcess, pRes)) // false: not this map group { m_setRole->AddObj(pMonster->QueryRole()); pMonster->EnterMapGroup(); } else pMonster->ReleaseByOwner(); } } pRes->Release(); } return true; } IRole* CRoleManager::QueryRole(SOCKET_ID idSocket, OBJID idNpc, OBJID idRole) { if(idSocket != SOCKET_NONE) { CUser* pUser = UserManager()->GetUserBySocketID(idSocket); if(pUser) { CMonster* pEudemon = NULL; if (idRole && idRole == pUser->GetCallPetID()) return pUser->QueryCallPet()->QueryRole(); else if (idRole && (pEudemon = pUser->QueryEudemonByID(idRole))) return pEudemon->QueryRole(); // else if (idRole && idRole == pUser->GetEudemonID()) // 幻兽 // return pUser->QueryEudemon()->QueryRole(); else { if (idRole >= CALLPETID_FIRST && idRole <= CALLPETID_LAST || idRole >= EUDEMON_ID_FIRST && idRole <= EUDEMON_ID_LAST) { return NULL; } else return pUser->QueryRole(); } } } else { return QuerySet()->GetObj(idNpc); } return NULL; } void CRoleManager::OnTimer(time_t tCurr) { for(IRoleSet::Iter i = m_setRole->Begin(); i != m_setRole->End(); ) // 删除 { IRole* pRole = m_setRole->GetObjByIter(i); i++; //??? 提前移动,下面可能会删除当前角色 if(pRole) { DEBUG_TRY pRole->OnTimer(tCurr); // 可能删除MONSTER if(pRole->IsDelThis()) m_setRole->DelObj(pRole->GetID()); DEBUG_CATCH("@CRoleManager::OnTimer@") } } /* for(int i = m_setRole->GetAmount()-1; i >= 0; i--) // 删除 { IRole* pRole = m_setRole->GetObjByIndex(i); if(pRole) pRole->OnTimer(tCurr); }*/ } void CRoleManager::SaveAll() { for(IRoleSet::Iter i = m_setRole->Begin(); i != m_setRole->End(); i++) { IRole* pRole = m_setRole->GetObjByIter(i); if(pRole) pRole->SaveInfo(); } } void CRoleManager::BroadcastMsg(Msg* pMsg, CUser* pExcludeSender) { CHECK(pMsg); BroadcastMapGroupMsg(pMsg, pExcludeSender); MapGroup(PID)->QueryIntraMsg()->SendBroadcastMsg(pMsg); } void CRoleManager::BroadcastMsg(LPCTSTR szMsg, CUser* pExcludeSender) { CHECK(szMsg); CMsgTalk msg; if(msg.Create(SYSTEM_NAME, ALLUSERS_NAME, szMsg)) BroadcastMsg(&msg, pExcludeSender); } // for mapgroup void CRoleManager::BroadcastMapGroupMsg(Msg* pMsg, CUser* pExcludeSender) { ASSERT(pMsg); UserManager()->GetForMapGroup()->BroadcastMapGroupMsg(pMsg, pExcludeSender); } void CRoleManager::BroadcastMapGroupMsg(LPCTSTR szMsg, CUser* pExcludeSender) { CHECK(szMsg); CMsgTalk msg; if(msg.Create(SYSTEM_NAME, ALLUSERS_NAME, szMsg)) UserManager()->GetForMapGroup()->BroadcastMapGroupMsg(&msg, pExcludeSender); } int CRoleManager::CountAllNpc(OBJID idMap) { int nCount = 0; CNpc* pNpc; for(IRoleSet::Iter i = m_setRole->Begin(); i != m_setRole->End(); i++) { IRole* pRole = m_setRole->GetObjByIter(i); if(pRole && pRole->QueryObj(OBJ_NPC, IPP_OF(pNpc)) && pNpc->GetMapID() == idMap) nCount++; } return nCount; } int CRoleManager::CountFurnitureNpc(OBJID idMap) { int nCount = 0; CNpc* pNpc; for(IRoleSet::Iter i = m_setRole->Begin(); i != m_setRole->End(); i++) { IRole* pRole = m_setRole->GetObjByIter(i); if(pRole && pRole->QueryObj(OBJ_NPC, IPP_OF(pNpc)) && pNpc->GetMapID() == idMap && (pNpc->GetType()==_ROLE_FURNITURE_NPC || pNpc->GetType()==_ROLE_3DFURNITURE_NPC)) nCount++; } return nCount; } int CRoleManager::CountNpcByName(OBJID idMap, LPCTSTR szName) { int nCount = 0; CNpc* pNpc; for(IRoleSet::Iter i = m_setRole->Begin(); i != m_setRole->End(); i++) { IRole* pRole = m_setRole->GetObjByIter(i); if(pRole && pRole->QueryObj(OBJ_NPC, IPP_OF(pNpc)) && pNpc->GetMapID() == idMap && strcmp(pNpc->GetName(), szName)==0) nCount++; } return nCount; } int CRoleManager::CountNpcByType(OBJID idMap, int nType) { int nCount = 0; CNpc* pNpc; for(IRoleSet::Iter i = m_setRole->Begin(); i != m_setRole->End(); i++) { IRole* pRole = m_setRole->GetObjByIter(i); if(pRole && pRole->QueryObj(OBJ_NPC, IPP_OF(pNpc)) && pNpc->GetMapID() == idMap && pNpc->GetType() == nType) nCount++; } return nCount; } int CRoleManager::CountMonsterByName(OBJID idMap, LPCTSTR szName) { int nCount = 0; CMonster* pMonster; for(IRoleSet::Iter i = m_setRole->Begin(); i != m_setRole->End(); i++) { IRole* pRole = m_setRole->GetObjByIter(i); if(pRole && pRole->QueryObj(OBJ_MONSTER, IPP_OF(pMonster)) && pMonster->GetMap()->GetID() == idMap && strcmp(pMonster->GetName(), szName)==0) nCount++; } return nCount; } int CRoleManager::CountMonsterByGenID(OBJID idMap, OBJID idGen) { int nCount = 0; CMonster* pMonster; for(IRoleSet::Iter i = m_setRole->Begin(); i != m_setRole->End(); i++) { IRole* pRole = m_setRole->GetObjByIter(i); if(pRole && pRole->QueryObj(OBJ_MONSTER, IPP_OF(pMonster)) && pMonster->GetMap()->GetID() == idMap && pMonster->GetGenID() == idGen) nCount++; } return nCount; } CNpc* CRoleManager::QueryDynNpcByRecordID(OBJID idNpcRecord) { CNpc* pNpc; for(IRoleSet::Iter i = m_setRole->Begin(); i != m_setRole->End(); i++) { IRole* pRole = m_setRole->GetObjByIter(i); if(pRole && pRole->QueryObj(OBJ_NPC, IPP_OF(pNpc)) && pNpc->IsDynaNpc() && pNpc->GetRecordID() == idNpcRecord) return pNpc; } return NULL; }
[ "rpgsky.com@cc92e6ba-efcf-11de-bf31-4dec8810c1c1" ]
[ [ [ 1, 245 ] ] ]
fb5d3bc74336956f8f1591d19d8ba9a5597fe978
09dfc0e039143673380a3d490c84b6c0d3d6ee6c
/surf_object_recognition/src/utils.cpp
8b1933c384c2a56ca1662c1cf7a42cc50bbe4a2d
[]
no_license
vishu2287/ucsb-ros-pkg
8642a78ddbe352fcb544658fb23737cb3ce86f04
b2e34c76b362a69b6c2f3c34c9f5cee419aa9839
refs/heads/master
2016-09-10T04:40:42.981912
2011-03-16T07:40:18
2011-03-16T07:40:18
34,023,815
0
0
null
null
null
null
UTF-8
C++
false
false
10,209
cpp
/*********************************************************** * --- OpenSURF --- * * This library is distributed under the GNU GPL. Please * * use the contact form at http://www.chrisevansdev.com * * for more information. * * * * C. Evans, Research Into Robust Visual Features, * * MSc University of Bristol, 2008. * * * ************************************************************/ #include <highgui.h> #include <iostream> #include <fstream> #include <time.h> #include "utils.h" using namespace std; //------------------------------------------------------- static const int NCOLOURS = 8; static const CvScalar COLOURS [] = {cvScalar(255,0,0), cvScalar(0,255,0), cvScalar(0,0,255), cvScalar(255,255,0), cvScalar(0,255,255), cvScalar(255,0,255), cvScalar(255,255,255), cvScalar(0,0,0)}; //------------------------------------------------------- //! Display error message and terminate program void error(const char *msg) { cout << "\nError: " << msg; getchar(); exit(0); } //------------------------------------------------------- //! Show the provided image and wait for keypress void showImage(const IplImage *img) { cvNamedWindow("Surf", CV_WINDOW_AUTOSIZE); cvShowImage("Surf", img); cvWaitKey(0); } //------------------------------------------------------- //! Show the provided image in titled window and wait for keypress void showImage(char *title,const IplImage *img) { cvNamedWindow(title, CV_WINDOW_AUTOSIZE); cvShowImage(title, img); cvWaitKey(0); } //------------------------------------------------------- // Convert image to single channel 32F IplImage *getGray(const IplImage *img) { // Check we have been supplied a non-null img pointer if (!img) error("Unable to create grayscale image. No image supplied"); IplImage* gray8, * gray32; gray32 = cvCreateImage( cvGetSize(img), IPL_DEPTH_32F, 1 ); if( img->nChannels == 1 ) gray8 = (IplImage *) cvClone( img ); else { gray8 = cvCreateImage( cvGetSize(img), IPL_DEPTH_8U, 1 ); cvCvtColor( img, gray8, CV_BGR2GRAY ); } cvConvertScale( gray8, gray32, 1.0 / 255.0, 0 ); cvReleaseImage( &gray8 ); return gray32; } //------------------------------------------------------- //! Draw all the Ipoints in the provided vector void drawIpoints(IplImage *img, const IpVec& ipts, int tailSize) { const Ipoint *ipt; float s, o; int r1, c1, r2, c2, lap; for(unsigned int i = 0; i < ipts.size(); i++) { ipt = &ipts.at(i); s = (2.5f * ipt->scale); o = ipt->orientation; lap = ipt->laplacian; r1 = fRound(ipt->y); c1 = fRound(ipt->x); c2 = fRound(s * cos(o)) + c1; r2 = fRound(s * sin(o)) + r1; if (o) // Green line indicates orientation cvLine(img, cvPoint(c1, r1), cvPoint(c2, r2), cvScalar(0, 255, 0)); else // Green dot if using upright version cvCircle(img, cvPoint(c1,r1), 1, cvScalar(0, 255, 0),-1); if (lap == 1) { // Blue circles indicate dark blobs on light backgrounds cvCircle(img, cvPoint(c1,r1), fRound(s), cvScalar(255, 0, 0),1); } else if (lap == 0) { // Red circles indicate light blobs on dark backgrounds cvCircle(img, cvPoint(c1,r1), fRound(s), cvScalar(0, 0, 255),1); } else if (lap == 9) { // Red circles indicate light blobs on dark backgrounds cvCircle(img, cvPoint(c1,r1), fRound(s), cvScalar(0, 255, 0),1); } /* // Draw motion from ipoint dx and dy if (tailSize) { cvLine(img, cvPoint(c1,r1), cvPoint(int(c1+ipt->dx*tailSize), int(r1+ipt->dy*tailSize)), cvScalar(255,255,255), 1); } */ } } //------------------------------------------------------- //! Draw a single feature on the image void drawIpoint(IplImage *img, Ipoint &ipt, int tailSize) { float s, o; int r1, c1, r2, c2, lap; s = (2.5f * ipt.scale); o = ipt.orientation; lap = ipt.laplacian; r1 = fRound(ipt.y); c1 = fRound(ipt.x); // Green line indicates orientation if (o) // Green line indicates orientation { c2 = fRound(s * cos(o)) + c1; r2 = fRound(s * sin(o)) + r1; cvLine(img, cvPoint(c1, r1), cvPoint(c2, r2), cvScalar(0, 255, 0)); } else // Green dot if using upright version cvCircle(img, cvPoint(c1,r1), 1, cvScalar(0, 255, 0),-1); if (lap >= 0) { // Blue circles indicate light blobs on dark backgrounds cvCircle(img, cvPoint(c1,r1), fRound(s), cvScalar(255, 0, 0),1); } else { // Red circles indicate light blobs on dark backgrounds cvCircle(img, cvPoint(c1,r1), fRound(s), cvScalar(0, 0, 255),1); } // Draw motion from ipoint dx and dy if (tailSize) { cvLine(img, cvPoint(c1,r1), cvPoint(int(c1+ipt.dx*tailSize), int(r1+ipt.dy*tailSize)), cvScalar(255,255,255), 1); } } //------------------------------------------------------- //! Draw a single feature on the image void drawPoint(IplImage *img, Ipoint &ipt) { float s, o; int r1, c1; s = 3; o = ipt.orientation; r1 = fRound(ipt.y); c1 = fRound(ipt.x); cvCircle(img, cvPoint(c1,r1), fRound(s), COLOURS[ipt.clusterLabel%NCOLOURS], -1); cvCircle(img, cvPoint(c1,r1), fRound(s+1), COLOURS[(ipt.clusterLabel+1)%NCOLOURS], 2); } //------------------------------------------------------- //! Draw a single feature on the image void drawPoints(IplImage *img, vector<Ipoint> &ipts) { float s, o; int r1, c1; for(unsigned int i = 0; i < ipts.size(); i++) { s = 3; o = ipts[i].orientation; r1 = fRound(ipts[i].y); c1 = fRound(ipts[i].x); cvCircle(img, cvPoint(c1,r1), fRound(s), COLOURS[ipts[i].clusterLabel%NCOLOURS], -1); cvCircle(img, cvPoint(c1,r1), fRound(s+1), COLOURS[(ipts[i].clusterLabel+1)%NCOLOURS], 2); } } //------------------------------------------------------- //! Draw descriptor windows around Ipoints in the provided vector void drawWindows(IplImage *img, vector<Ipoint> &ipts) { Ipoint *ipt; float s, o, cd, sd; int x, y; CvPoint2D32f src[4]; for(unsigned int i = 0; i < ipts.size(); i++) { ipt = &ipts.at(i); s = (10 * ipt->scale); o = ipt->orientation; y = fRound(ipt->y); x = fRound(ipt->x); cd = cos(o); sd = sin(o); src[0].x=sd*s+cd*s+x; src[0].y=-cd*s+sd*s+y; src[1].x=sd*s+cd*-s+x; src[1].y=-cd*s+sd*-s+y; src[2].x=sd*-s+cd*-s+x; src[2].y=-cd*-s+sd*-s+y; src[3].x=sd*-s+cd*s+x; src[3].y=-cd*-s+sd*s+y; if (o) // Draw orientation line cvLine(img, cvPoint(x, y), cvPoint(fRound(s*cd + x), fRound(s*sd + y)), cvScalar(0, 255, 0),1); else // Green dot if using upright version cvCircle(img, cvPoint(x,y), 1, cvScalar(0, 255, 0),-1); // Draw box window around the point cvLine(img, cvPoint(fRound(src[0].x), fRound(src[0].y)), cvPoint(fRound(src[1].x), fRound(src[1].y)), cvScalar(255, 0, 0),2); cvLine(img, cvPoint(fRound(src[1].x), fRound(src[1].y)), cvPoint(fRound(src[2].x), fRound(src[2].y)), cvScalar(255, 0, 0),2); cvLine(img, cvPoint(fRound(src[2].x), fRound(src[2].y)), cvPoint(fRound(src[3].x), fRound(src[3].y)), cvScalar(255, 0, 0),2); cvLine(img, cvPoint(fRound(src[3].x), fRound(src[3].y)), cvPoint(fRound(src[0].x), fRound(src[0].y)), cvScalar(255, 0, 0),2); } } //------------------------------------------------------- // Draw the FPS figure on the image (requires at least 2 calls) void drawFPS(IplImage *img) { static int counter = 0; static clock_t t; static float fps; char fps_text[20]; CvFont font; cvInitFont(&font,CV_FONT_HERSHEY_SIMPLEX|CV_FONT_ITALIC, 1.0,1.0,0,2); // Add fps figure (every 10 frames) if (counter > 10) { fps = (10.0f/(clock()-t) * CLOCKS_PER_SEC); t=clock(); counter = 0; } // Increment counter ++counter; // Get the figure as a string sprintf(fps_text,"FPS: %.2f",fps); // Draw the string on the image cvPutText (img,fps_text,cvPoint(10,25), &font, cvScalar(255,255,0)); } //------------------------------------------------------- //! Save the SURF features to file void saveSurf(char *filename, vector<Ipoint> &ipts) { ofstream outfile(filename); // output descriptor length outfile << "64\n"; outfile << ipts.size() << "\n"; // create output line as: scale x y des for(unsigned int i=0; i < ipts.size(); i++) { outfile << ipts.at(i).scale << " "; outfile << ipts.at(i).x << " "; outfile << ipts.at(i).y << " "; outfile << ipts.at(i).orientation << " "; outfile << ipts.at(i).laplacian << " "; outfile << ipts.at(i).scale << " "; for(int j=0; j<64; j++) outfile << ipts.at(i).descriptor[j] << " "; outfile << "\n"; } outfile.close(); } //------------------------------------------------------- //! Load the SURF features from file void loadSurf(char *filename, vector<Ipoint> &ipts) { int descriptorLength, count; ifstream infile(filename); // clear the ipts vector first ipts.clear(); // read descriptor length/number of ipoints infile >> descriptorLength; infile >> count; // for each ipoint for (int i = 0; i < count; i++) { Ipoint ipt; // read vals infile >> ipt.scale; infile >> ipt.x; infile >> ipt.y; infile >> ipt.orientation; infile >> ipt.laplacian; infile >> ipt.scale; // read descriptor components for (int j = 0; j < 64; j++) infile >> ipt.descriptor[j]; ipts.push_back(ipt); } } //------------------------------------------------------- //-------------------------------------------------------
[ "[email protected]@0b0f7875-c668-5978-e4a7-07162229f4fe" ]
[ [ [ 1, 357 ] ] ]
ebc1919671620db9c01a353f7a3490a35ce388e0
9c62af23e0a1faea5aaa8dd328ba1d82688823a5
/rl/branches/persistence2/engine/core/include/GameAreaListener.h
85242e76f1e6d1d3a9dc1fa8c49615271c1808f7
[ "ClArtistic", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
jacmoe/dsa-hl-svn
55b05b6f28b0b8b216eac7b0f9eedf650d116f85
97798e1f54df9d5785fb206c7165cd011c611560
refs/heads/master
2021-04-22T12:07:43.389214
2009-11-27T22:01:03
2009-11-27T22:01:03
null
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
1,777
h
/* This source file is part of Rastullahs Lockenpracht. * Copyright (C) 2003-2008 Team Pantheon. http://www.team-pantheon.de * * This program is free software; you can redistribute it and/or modify * it under the terms of the Clarified Artistic License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * Clarified Artistic License for more details. * * You should have received a copy of the Clarified Artistic License * along with this program; if not you can get it here * http://www.jpaulmorrison.com/fbp/artistic2.htm. */ #ifndef __GameAreaListener_H__ #define __GameAreaListener_H__ #include "EventListener.h" #include "GameAreaEvent.h" #include "CorePrerequisites.h" namespace rl { /** GameAreaListener * Eine Basisklasse für Listener die auf GameAreaEvents lauschen * * @see GameAreaEvent, GameAreaEventSource, GameEventManager, GameAreaTypes */ class _RlCoreExport GameAreaListener : public virtual EventListener<GameAreaEvent> { public: /// Dekonstruktor virtual ~GameAreaListener(); /** Diese Methode wird aufgerufen wenn ein Aktor das Areal verlassen hat * * @param anEvent Das verantwortliche Ereignis */ virtual void areaLeft(GameAreaEvent *anEvent) = 0; /** Diese Methode wird aufgerufen wenn ein Aktor das Areal betreten hat * * @param anEvent Das verantwortliche Ereignis */ virtual void areaEntered(GameAreaEvent *anEvent) = 0; /// Kümmert sich um das Aufrufen benannter Methoden aus Reasons virtual bool eventRaised(GameAreaEvent *anEvent); }; } #endif
[ "timm@4c79e8ff-cfd4-0310-af45-a38c79f83013" ]
[ [ [ 1, 54 ] ] ]
fa65b4923f20631fab133d2368adc0fdcd2924c8
906e87b1936397339734770be45317f06fe66e6e
/src/TGCursor.cpp
68c02a7df86936d4eb8e24b2c57c438f1bbcc726
[]
no_license
kcmohanprasad/tgui
03c1ab47e9058bc763b7e6ffc21a37b4358369bf
9f9cf391fa86b99c7d606c4d196e512a7b06be95
refs/heads/master
2021-01-10T08:52:18.629088
2007-05-17T04:42:58
2007-05-17T04:42:58
52,069,498
0
0
null
null
null
null
UTF-8
C++
false
false
3,558
cpp
//----------------------------------------------------------------------------- // This source file is part of TGUI (Tiny GUI) // // Copyright (c) 2006-2007 Tubras Software, Ltd // Also see acknowledgements in Readme.html // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to // do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. //----------------------------------------------------------------------------- #include "tgui.h" namespace TGUI { //----------------------------------------------------------------------- // T G C u r s o r //----------------------------------------------------------------------- TGCursor::TGCursor(TGString fname,TGString resourceGroup) : TGImage(NULL,fname,resourceGroup) { m_hotSpot = TGPoint(0,0); m_brush.bind(new TGBrush(TGColour(1,1,1,1))); } //----------------------------------------------------------------------- // T G C u r s o r //----------------------------------------------------------------------- TGCursor::TGCursor(TGTexture* texture) : TGImage(NULL,"mouseCursor",texture) { m_hotSpot = TGPoint(0,0); m_brush.bind(new TGBrush(TGColour(1,1,1,1),texture)); } //----------------------------------------------------------------------- // ~ T G C u r s o r //----------------------------------------------------------------------- TGCursor::~TGCursor() { } //----------------------------------------------------------------------- // m o v e //----------------------------------------------------------------------- void TGCursor::move(int x, int y) { // // check screen bounds // int maxWidth = getRenderer()->getWidth(); int maxHeight = getRenderer()->getHeight(); if(x < 0) x = 0; else if(x > maxWidth) x = maxWidth; if(y < 0) y = 0; else if(y > maxHeight) y = maxHeight; TGImage::moveRel(x,y); } //----------------------------------------------------------------------- // d r a w //----------------------------------------------------------------------- void TGCursor::draw() { if(!m_isVisible) return; TGRect r(x1,y1,x2,y2); getRenderer()->renderQuadDirect(r,0,m_brush); } }
[ "pc0der@a5263bde-0223-0410-8bbb-1954fdd97a2f" ]
[ [ [ 1, 94 ] ] ]
c7722affcc303b0009739a35192f1d90955a5429
335783c9e5837a1b626073d1288b492f9f6b057f
/source/fbxcmd/fbxcmd/Plugins/fbxcmn/fbxcmn.cpp
025e590335cdf3b8a691b63a7446c7623740d888
[ "BSD-3-Clause", "LicenseRef-scancode-warranty-disclaimer", "BSD-2-Clause" ]
permissive
code-google-com/fbx4eclipse
110766ee9760029d5017536847e9f3dc09e6ebd2
cc494db4261d7d636f8c4d0313db3953b781e295
refs/heads/master
2016-09-08T01:55:57.195874
2009-12-03T20:35:48
2009-12-03T20:35:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
280
cpp
// fbxcmn.cpp : Defines the exported functions for the DLL application. // #include <fbxsdk.h> #include <fbxfilesdk/fbxfilesdk_nsbegin.h> using namespace kfbxevents; KFbxProperty s_prop; KFbxObjectPropertyChanged s_asdf(s_prop); #include <fbxfilesdk/fbxfilesdk_nsend.h>
[ "tazpn314@ccf8930c-dfc1-11de-9043-17b7bd24f792" ]
[ [ [ 1, 9 ] ] ]
36758bc67fe4bca882ebaf96c46cd03e7205d537
a0155e192c9dc2029b231829e3db9ba90861f956
/CheckOS.NLM/main.cpp
47f2141b354ea880846f5a92dbebd7489a52b7c7
[]
no_license
zeha/mailfilter
d2de4aaa79bed2073cec76c93768a42068cfab17
898dd4d4cba226edec566f4b15c6bb97e79f8001
refs/heads/master
2021-01-22T02:03:31.470739
2010-08-12T23:51:35
2010-08-12T23:51:35
81,022,257
0
0
null
null
null
null
UTF-8
C++
false
false
3,117
cpp
#include <screen.h> #include <stdio.h> #include <errno.h> #include <netware.h> #include <string.h> #include <library.h> #include <malloc.h> #include <dlfcn.h> #include <unistd.h> #include <ndkvers.h> #define STATE_FAIL 2 #define STATE_PASS 1 #define STATE_UNDEF 0 typedef int(*InoScanInit_t)(void*); InoScanInit_t InoScanInit_sym; scr_t gScreen; bool gOnlyUseLibScreenFuncs = false; bool gAutoClose = false; bool bOS_LibC = false; bool bApp_eTrust = false; bool bApp_GwiaCfg = false; void printCheck(const char* szCheck) { if (!szCheck) return; printf(" %s:",szCheck); } void printState(int state) { const char* stateText = "undef"; unsigned char color = COLOR_ATTR_YELLOW; uint16_t row; uint16_t col; switch (state) { case STATE_FAIL: stateText = "fail"; color = COLOR_ATTR_RED; break; case STATE_PASS: stateText = "pass"; color = COLOR_ATTR_LIME; break; } if (gOnlyUseLibScreenFuncs) { printf(" %s\n",stateText); } else { // pretty print output GetOutputCursorPosition(gScreen,&row,&col); col = 80-8; PositionOutputCursor(gScreen,row,col); OutputToScreenWithAttribute(gScreen,color,"%s\n",stateText); } } int main(int argc, char* argv[]) { gScreen = getscreenhandle(); if (argc>1) { if (strcmp(argv[1],"--log") == 0) { gOnlyUseLibScreenFuncs = true; gAutoClose = true; } if (strcmp(argv[1],"--plain") == 0) gOnlyUseLibScreenFuncs = true; } int libthreshold = 0; printf("\n MailFilter System Diagnostics:\n\n"); // libc printCheck("LibC Version"); if (libcthreshold( NETWARE_CSP11, &libthreshold )) printState(STATE_FAIL); else { bOS_LibC = true; printState(STATE_PASS); } // etrust av printCheck("CA eTrust AntiVirus 7"); InoScanInit_sym = (InoScanInit_t)ImportPublicObject(getnlmhandle(),"inoscan@InoScanInit"); if (InoScanInit_sym == NULL) printState(STATE_FAIL); else { bApp_eTrust = true; printState(STATE_PASS); } // sys:\system\gwia.cfg printCheck("GWIA Configuration"); if (access("SYS:\\SYSTEM\\GWIA.CFG",F_OK)) printState(STATE_UNDEF); else { bApp_GwiaCfg = true; printState(STATE_PASS); } printf("\n\n Explanations:\n"); if (!bOS_LibC) { printf( " Your LibC.NLM is too old to support MailFilter properly.\n" " Please upgrade to a newer support pack. Else, you may want to check for\n" " Novell Field Test Files (NWLIBx.EXE) from support.novell.com.\n\n"); } if (!bApp_eTrust) { printf( " CA eTrust AntiVirus may not be running or is not installed. MailFilter can\n" " NOT use this AntiVirus product for scanning e-mails in this configuration.\n" " Make sure eTrust AV is running properly and all fixes have been applied.\n\n"); } if (!bApp_GwiaCfg) { printf( " GWIA.CFG is not located at SYS:SYSTEM. You will have to specify the proper\n" " path to the installation program.\n\n"); } printf("\n\n"); if (!gAutoClose) pressenter(); return 0; } // -eof-
[ [ [ 1, 143 ] ] ]
e80aa0b7d4f8147f76243d71d4dab989087066ad
15732b8e4190ae526dcf99e9ffcee5171ed9bd7e
/INC/priqueue.h
e9ae7a433fcfeb10b1d2e98ecdf7871bda72d7d7
[]
no_license
clovermwliu/whutnetsim
d95c07f77330af8cefe50a04b19a2d5cca23e0ae
924f2625898c4f00147e473a05704f7b91dac0c4
refs/heads/master
2021-01-10T13:10:00.678815
2010-04-14T08:38:01
2010-04-14T08:38:01
48,568,805
0
0
null
null
null
null
UTF-8
C++
false
false
9,350
h
// GENERAL PUBLIC LICENSE AGREEMENT // // PLEASE READ THIS DOCUMENT CAREFULLY BEFORE UTILIZING THE PROGRAM // // BY UTILIZING THIS PROGRAM, YOU AGREE TO BECOME BOUND BY THE TERMS OF // THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE, DO // NOT USE THIS PROGRAM OR ANY PORTION THEREOF IN ANY FORM OR MANNER. // // This Program is licensed, not sold to you by GEORGIA TECH RESEARCH // CORPORATION ("GTRC"), owner of all code and accompanying documentation // (hereinafter "Program"), for use only under the terms of this License, // and GTRC reserves any rights not expressly granted to you. // // 1. This License allows you to: // // (a) make copies and distribute copies of the Program's source code // provide that any such copy clearly displays any and all appropriate // copyright notices and disclaimer of warranty as set forth in Article 5 // and 6 of this License. All notices that refer to this License and to // the absence of any warranty must be kept intact at all times. A copy // of this License must accompany any and all copies of the Program // distributed to third parties. // // A fee may be charged to cover the cost associated with the physical // act of transferring a copy to a third party. At no time shall the // program be sold for commercial gain either alone or incorporated with // other program(s) without entering into a separate agreement with GTRC. // // // (b) modify the original copy or copies of the Program or any portion // thereof ("Modification(s)"). Modifications may be copied and // distributed under the terms and conditions as set forth above, // provided the following conditions are met: // // i) any and all modified files must be affixed with prominent // notices that you have changed the files and the date that the changes // occurred. // // ii) any work that you distribute, publish, or make available, that // in whole or in part contains portions of the Program or derivative // work thereof, must be licensed at no charge to all third parties under // the terms of this License. // // iii) if the modified program normally reads commands interactively // when run, you must cause it, when started running for such interactive // use in the most ordinary way, to display and/or print an announcement // with all appropriate copyright notices and disclaimer of warranty as // set forth in Article 5 and 6 of this License to be clearly displayed. // In addition, you must provide reasonable access to this License to the // user. // // Any portion of a Modification that can be reasonably considered // independent of the Program and separate work in and of itself is not // subject to the terms and conditions set forth in this License as long // as it is not distributed with the Program or any portion thereof. // // // 2. This License further allows you to copy and distribute the Program // or a work based on it, as set forth in Article 1 Section b in // object code or executable form under the terms of Article 1 above // provided that you also either: // // i) accompany it with complete corresponding machine-readable source // code, which must be distributed under the terms of Article 1, on a // medium customarily used for software interchange; or, // // ii) accompany it with a written offer, valid for no less than three // (3) years from the time of distribution, to give any third party, for // no consideration greater than the cost of physical transfer, a // complete machine-readable copy of the corresponding source code, to be // distributed under the terms of Article 1 on a medium customarily used // for software interchange; or, // // // 3. Export Law Assurance. // // You agree that the Software will not be shipped, transferred or // exported, directly into any country prohibited by the United States // Export Administration Act and the regulations thereunder nor will be // used for any purpose prohibited by the Act. // // 4. Termination. // // If at anytime you are unable to comply with any portion of this // License you must immediately cease use of the Program and all // distribution activities involving the Program or any portion thereof. // // // 5. Disclaimer of Warranties and Limitation on Liability. // // YOU ACCEPT THE PROGRAM ON AN "AS IS" BASIS. GTRC MAKES NO WARRANTY // THAT ALL ERRORS CAN BE OR HAVE BEEN ELIMINATED FROM PROGRAM. GTRC // SHALL NOT BE RESPONSIBLE FOR LOSSES OF ANY KIND RESULTING FROM THE USE // OF PROGRAM AND ITS ACCOMPANYING DOCUMENT(S), AND CAN IN NO WAY PROVIDE // COMPENSATION FOR ANY LOSSES SUSTAINED, INCLUDING BUT NOT LIMITED TO // ANY OBLIGATION, LIABILITY, RIGHT, CLAIM OR REMEDY FOR TORT, OR FOR ANY // ACTUAL OR ALLEGED INFRINGEMENT OF PATENTS, COPYRIGHTS, TRADE SECRETS, // OR SIMILAR RIGHTS OF THIRD PARTIES, NOR ANY BUSINESS EXPENSE, MACHINE // DOWNTIME OR DAMAGES CAUSED TO YOU BY ANY DEFICIENCY, DEFECT OR ERROR // IN PROGRAM OR MALFUNCTION THEREOF, NOR ANY INCIDENTAL OR CONSEQUENTIAL // DAMAGES, HOWEVER CAUSED. GTRC DISCLAIMS ALL WARRANTIES, BOTH EXPRESS // AND IMPLIED RESPECTING THE USE AND OPERATION OF PROGRAM AND ITS // ACCOMPANYING DOCUMENTATION, INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR PARTICULAR PURPOSE AND ANY IMPLIED // WARRANTY ARISING FROM COURSE OF PERFORMANCE, COURSE OF DEALING OR // USAGE OF TRADE. GTRC MAKES NO WARRANTY THAT PROGRAM IS ADEQUATELY OR // COMPLETELY DESCRIBED IN, OR BEHAVES IN ACCORDANCE WITH ANY // ACCOMPANYING DOCUMENTATION. THE USER OF PROGRAM IS EXPECTED TO MAKE // THE FINAL EVALUATION OF PROGRAM'S USEFULNESS IN USER'S OWN // ENVIRONMENT. // // GTRC represents that, to the best of its knowledge, the software // furnished hereunder does not infringe any copyright or patent. // // GTRC shall have no obligation for support or maintenance of Program. // // 6. Copyright Notice. // // THE SOFTWARE AND ACCOMPANYING DOCUMENTATION ARE COPYRIGHTED WITH ALL // RIGHTS RESERVED BY GTRC. UNDER UNITED STATES COPYRIGHT LAWS, THE // SOFTWARE AND ITS ACCOMPANYING DOCUMENTATION MAY NOT BE COPIED EXCEPT // AS GRANTED HEREIN. // // You acknowledge that GTRC is the sole owner of Program, including all // copyrights subsisting therein. Any and all copies or partial copies // of Program made by you shall bear the copyright notice set forth below // and affixed to the original version or such other notice as GTRC shall // designate. Such notice shall also be affixed to all improvements or // enhancements of Program made by you or portions thereof in such a // manner and location as to give reasonable notice of GTRC's copyright // as set forth in Article 1. // // Said copyright notice shall read as follows: // // Copyright 2004 // Dr. George F. Riley // Georgia Tech Research Corporation // Atlanta, Georgia 30332-0415 // All Rights Reserved // // Georgia Tech Network Simulator - Priority Queue class // Young-Jun Lee. Georgia Tech, Fall 2004 // Implements a strict priority queue. /* -*- mode:c++ -*- */ #ifndef __PRIQUEUE_H #define __PRIQUEUE_H #include <vector> #include "queue.h" #define NO_PRIQUEUE 3 typedef std::vector<Queue*> QueVec_t; class PriQueue : public Queue { public: PriQueue(); PriQueue(Count_t, const Queue& = Queue::Default()); PriQueue(const PriQueue&); virtual ~PriQueue(); bool Enque(Packet*); Packet* Deque(); Packet* PeekDeque(); //Doc:Method virtual Count_t DequeAllDstMac(MACAddr); //Doc:Desc Remove all packets in the queue with the specified //Doc:Desc destination MAC address. //Doc:Arg1 MAC Address to remove //Doc:Return Count of removed packets //Doc:Method virtual Count_t DequeAllDstIP(IPAddr_t); //Doc:Desc Remove all packets in the queue with the specified //Doc:Desc destination IP address. //Doc:Arg1 IP Address to remove //Doc:Return Count of removed packets //Doc:Method virtual Packet* DequeOneDstMac(MACAddr); //Doc:Desc Remove a packet in the queue with the specified //Doc:Desc destination MAC address. //Doc:Arg1 MAC Address to remove //Doc:Return Pointer to the removed packet //Doc:Method virtual Packet* DequeOneDstIP(IPAddr_t); //Doc:Desc Remove a packet in the queue with the specified //Doc:Desc destination IP address. //Doc:Arg1 IP Address to remove //Doc:Return Pointer to the removed packet Count_t Length(); Count_t LengthPkts(); Queue* Copy() const; void SetInterface(Interface*); void SetLimit(Count_t); Count_t GetLimit() const { return que[0]->GetLimit(); } void SetLimitPkts(Count_t); Count_t GetLimitPkts() const { return que[0]->GetLimitPkts(); } bool Check(Size_t, Packet* = nil); Packet* GetPacket(Count_t); void GetPacketColors(ColorVec_t&); Queue* GetQueue(Count_t); // Get queue for a given priority // Helpers to enque/deque individual queues protected: bool Enque(Packet*, Count_t); // Enque a packet in a particular queue Packet* Deque(Count_t); // Deque a packet from a particular queue Packet* PeekDeque(Count_t); // Peek at head of queue without removal private: QueVec_t que; }; #endif
[ "pengelmer@f37e807c-cba8-11de-937e-2741d7931076" ]
[ [ [ 1, 219 ] ] ]
71d29c55c80c88234881bbfff24ee30248d68c2e
0f8559dad8e89d112362f9770a4551149d4e738f
/Wall_Destruction/Havok/Source/Physics/Utilities/CharacterControl/StateMachine/hkpCharacterContext.h
43c2160f746f5f1423cfa13a84d206ba314c5811
[]
no_license
TheProjecter/olafurabertaymsc
9360ad4c988d921e55b8cef9b8dcf1959e92d814
456d4d87699342c5459534a7992f04669e75d2e1
refs/heads/master
2021-01-10T15:15:49.289873
2010-09-20T12:58:48
2010-09-20T12:58:48
45,933,002
0
0
null
null
null
null
UTF-8
C++
false
false
5,507
h
/* * * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's * prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok. * Level 2 and Level 3 source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2009 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement. * */ #ifndef HK_CHARACTER_CONTEXT_H #define HK_CHARACTER_CONTEXT_H #include <Common/Base/hkBase.h> #include <Common/Base/hkBase.h> #include <Common/Base/Types/Physics/hkStepInfo.h> #include <Physics/Dynamics/Motion/hkpMotion.h> #include <Physics/Utilities/CharacterControl/hkpCharacterControl.h> #include <Physics/Utilities/CharacterControl/StateMachine/hkpCharacterState.h> class hkpCharacterStateManager; class hkpWorld; /// The input to the character state machine. /// Fill in the details and pass to a Character Context to cause a transitions in the state machine and produce and ouput struct hkpCharacterInput { HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR( HK_MEMORY_CLASS_UTILITIES, hkpCharacterInput ); // // User input // /// Input X range -1 to 1 (left / right) hkReal m_inputLR; /// Input Y range -1 to 1 (forward / back) hkReal m_inputUD; /// Set this if you want the character to try and jump hkBool m_wantJump; // // Orientation information // /// Up vector in world space - should generally point in the opposite direction to gravity hkVector4 m_up; /// Forward vector in world space - point in the direction the character is facing hkVector4 m_forward; // // Spatial info // /// Set this if the character is at a ladder and you want it to start to climb hkBool m_atLadder; /// The surface information. hkpSurfaceInfo m_surfaceInfo; // // Simulation info // /// Set this to the timestep between calls to the state machine hkStepInfo m_stepInfo; /// Set this to the current position hkVector4 m_position; /// Set this to the current Velocity hkVector4 m_velocity; /// The gravity that is applied to the character when in the air hkVector4 m_characterGravity; // // User Data // /// Tag in extra user data for new user states here hkUlong m_userData; // +default(0) }; /// The output from the state machine struct hkpCharacterOutput { HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR( HK_MEMORY_CLASS_UTILITIES, hkpCharacterOutput ); /// The output velocity of the character hkVector4 m_velocity; }; /// The character context holds the current state of the state machine and is the interface that handles all state machine requests. class hkpCharacterContext : public hkReferencedObject { public: HK_DECLARE_CLASS_ALLOCATOR(HK_MEMORY_CLASS_CHARACTER); /// This enum defines type of character controlled by state machine enum CharacterType { HK_CHARACTER_PROXY = 0, HK_CHARACTER_RIGIDBODY = 1 }; /// Initializes the character context and give the state machine an initial state /// This adds a reference to the state manager hkpCharacterContext(const hkpCharacterStateManager* manager, hkpCharacterStateType initialState); /// Removes the reference from the state manager ~hkpCharacterContext(); /// Returns the current state hkpCharacterStateType getState() const; /// Causes a state transition. This also calls the leaveState and enterState methods /// for the appropriate states void setState(hkpCharacterStateType state, const hkpCharacterInput& input, hkpCharacterOutput& output ); /// Updates the state machine using the given input /// The output structure in initialized before being passed to the state /// This initialization copies the velocity from the input void update(const hkpCharacterInput& input, hkpCharacterOutput& output); /// Set type of character (proxy or rigid body) void setCharacterType(const CharacterType newType); /// Enable final output velocity filtration void setFilterEnable(const hkBool status); /// Set parameters for final output velocity filtration void setFilterParameters(const hkReal gain, const hkReal maxVelocity, const hkReal maxAcceleration); protected: /// Current character type CharacterType m_characterType; const hkpCharacterStateManager* m_stateManager; hkpCharacterStateType m_currentState; hkpCharacterStateType m_previousState; /// Parameters for final output velocity filtering hkBool m_filterEnable; hkReal m_maxLinearAcceleration; hkReal m_maxLinearVelocity; hkReal m_gain; }; #endif // HK_CHARACTER_CONTEXT_H /* * Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20091222) * * Confidential Information of Havok. (C) Copyright 1999-2009 * Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok * Logo, and the Havok buzzsaw logo are trademarks of Havok. Title, ownership * rights, and intellectual property rights in the Havok software remain in * Havok and/or its suppliers. * * Use of this software for evaluation purposes is subject to and indicates * acceptance of the End User licence Agreement for this product. A copy of * the license is included with this software and is also available at www.havok.com/tryhavok. * */
[ [ [ 1, 173 ] ] ]
e4b5494c7b2ad4d175f0625b9818f8277be3ae57
854ee643a4e4d0b7a202fce237ee76b6930315ec
/arcemu_svn/src/arcemu-shared/Network/SocketOps.h
6488298f8774f999caf3aba60d5319082bfbc5a4
[]
no_license
miklasiak/projekt
df37fa82cf2d4a91c2073f41609bec8b2f23cf66
064402da950555bf88609e98b7256d4dc0af248a
refs/heads/master
2021-01-01T19:29:49.778109
2008-11-10T17:14:14
2008-11-10T17:14:14
34,016,391
2
0
null
null
null
null
UTF-8
C++
false
false
1,033
h
/* * Multiplatform Async Network Library * Copyright (c) 2007 Burlex * * SocketOps - wrapper for any specific socket operations that may be platform-dependant. * */ #ifndef SOCKET_OPS_H #define SOCKET_OPS_H namespace SocketOps { // Create file descriptor for socket i/o operations. SOCKET CreateTCPFileDescriptor(); // Disable blocking send/recv calls. bool Nonblocking(SOCKET fd); // Enable blocking send/recv calls. bool Blocking(SOCKET fd); // Disable nagle buffering algorithm bool DisableBuffering(SOCKET fd); // Enables nagle buffering algorithm bool EnableBuffering(SOCKET fd); // Set internal buffer size to socket. bool SetRecvBufferSize(SOCKET fd, uint32 size); // Set internal buffer size to socket. bool SetSendBufferSize(SOCKET fd, uint32 size); // Set timeout, in seconds bool SetTimeout(SOCKET fd, uint32 timeout); // Closes socket completely. void CloseSocket(SOCKET fd); // Sets SO_REUSEADDR void ReuseAddr(SOCKET fd); }; #endif
[ "[email protected]@3074cc92-8d2b-11dd-8ab4-67102e0efeef", "[email protected]@3074cc92-8d2b-11dd-8ab4-67102e0efeef" ]
[ [ [ 1, 35 ], [ 39, 47 ] ], [ [ 36, 38 ] ] ]
3db13a541ecb6d237dcba6c1846609a0805b4cd6
fcb913eac4bf4e050ed333fe07fc1be8b26d38c3
/murmur.cpp
b24e41429c67fa7f55650ede0e65655ba14fff48
[]
no_license
craftyjon/Songsearch
206d77ab6a3cb5c8496b46da56402a70491efc12
3c007f02c547c60d2a18a4889edd215810f0bd4c
refs/heads/master
2021-01-16T23:17:13.988174
2011-03-17T05:08:48
2011-03-17T05:08:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,250
cpp
//----------------------------------------------------------------------------- // MurmurHash2A, by Austin Appleby // This is a variant of MurmurHash2 modified to use the Merkle-Damgard // construction. Bulk speed should be identical to Murmur2, small-key speed // will be 10%-20% slower due to the added overhead at the end of the hash. // This variant fixes a minor issue where null keys were more likely to // collide with each other than expected, and also makes the algorithm // more amenable to incremental implementations. All other caveats from // MurmurHash2 still apply. #define mmix(h,k) { k *= m; k ^= k >> r; k *= m; h *= m; h ^= k; } unsigned int MurmurHash2A ( const void * key, int len, unsigned int seed ) { const unsigned int m = 0x5bd1e995; const int r = 24; unsigned int l = len; const unsigned char * data = (const unsigned char *)key; unsigned int h = seed; while(len >= 4) { unsigned int k = *(unsigned int*)data; mmix(h,k); data += 4; len -= 4; } unsigned int t = 0; switch(len) { case 3: t ^= data[2] << 16; case 2: t ^= data[1] << 8; case 1: t ^= data[0]; }; mmix(h,t); mmix(h,l); h ^= h >> 13; h *= m; h ^= h >> 15; return h; }
[ [ [ 1, 52 ] ] ]
aeceaca8506dfc5c88e85afd8a8c441db931a133
6dac9369d44799e368d866638433fbd17873dcf7
/src/branches/01032005/sound/fmod/FMODStreamBuffer.cpp
23188ca22277479209b50bb2a7ff09d3804330cd
[]
no_license
christhomas/fusionengine
286b33f2c6a7df785398ffbe7eea1c367e512b8d
95422685027bb19986ba64c612049faa5899690e
refs/heads/master
2020-04-05T22:52:07.491706
2006-10-24T11:21:28
2006-10-24T11:21:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,648
cpp
#include <FMODStreamBuffer.h> // This is the function to call when the stream ends (stops playing) /** Callback for streams where you cannot know the end of the stream, but when it ends, FMOD will call this method to tell the sound system * @ingroup FMOD_Sound_Group * * @param @stream The FMOD stream that called the callback * @param buff Pointer to the stream data buffer to write to * @param len Length of buffer specified in BYTES. * @param param A user data value specified from FSOUND_Stream_Create * * @return TRUE, because fusion doesnt use the return value, true is as good as any value to return */ signed char StreamEndCallback(FSOUND_STREAM *stream, void *buff, int len, int param) { FMODStreamBuffer *buffer = (FMODStreamBuffer *)&param; buffer->m_channel = 0; return 1; } /** FMOD StreamBuffer Constructor */ FMODStreamBuffer::FMODStreamBuffer() { m_stream = NULL; } /** FMOD StreamBuffer Deconstructor * * Operation: * -# Stops the stream playing * -# Closes the stream */ FMODStreamBuffer::~FMODStreamBuffer() { Stop(); Close(); } /** Loads a Sound stream * * @param filename The name of the stream file * * @returns boolean true or false, depending on whether the stream loaded or not */ bool FMODStreamBuffer::Load(std::string filename) { m_stream = FSOUND_Stream_OpenFile(filename.c_str(), FSOUND_NORMAL, 0); FSOUND_Stream_SetEndCallback(m_stream,StreamEndCallback,(int)this); if(m_stream != NULL) return true; return false; } /** Closes the stream * * @returns boolean true or false, in this case, true only since you ignore any error condition */ bool FMODStreamBuffer::Close(void) { if(FSOUND_Stream_Close(m_stream) == 1) return true; return false; } /** Plays the stream * * @returns The channel id that the stream is playing on */ int FMODStreamBuffer::Play(void) { // Play the buffer, return the channel playing on m_channel = FSOUND_Stream_Play(FSOUND_FREE,m_stream); return m_channel; } /** Pauses a stream * * @param pause Whether to pause the stream or not * * @returns If the stream paused, return true, otherwise false */ bool FMODStreamBuffer::Pause(bool pause) { if(IsPlaying() == true && FSOUND_SetPaused(m_channel,pause) == 1) return true; return false; } /** Stop the stream * * @returns boolean true or false, depending on whether the stream stopped successfully or not */ bool FMODStreamBuffer::Stop(void) { if(FSOUND_Stream_Stop(m_stream) == 1) return true; return false; } /** Sets the play position of the stream * * @param position The position to set the stream to start at in BYTES * * @returns boolean true or false, depending on whether it was set successfully or not */ bool FMODStreamBuffer::SetPosition(int position) { if(FSOUND_Stream_SetPosition(m_stream,position) == 1) return true; return false; } /** Sets the Volume of the stream to play at * * @param volume The volume to set the stream to play at * * @returns boolean true or false, depending on whether setting the volume was successful or not * * The valid range of values for the volume is 0 to 255, silent, to max volume respectively */ bool FMODStreamBuffer::Volume(unsigned char volume) { if(FSOUND_SetVolume(m_channel,volume) == 1) return true; return false; } /** Tests whether the stream is playing or not * * @returns boolean true or false, depending on whether the stream is playing or not */ bool FMODStreamBuffer::IsPlaying(void) { if(m_channel!=0) return true; else return false; }
[ "chris_a_thomas@1bf15c89-c11e-0410-aefd-b6ca7aeaabe7" ]
[ [ [ 1, 140 ] ] ]
6dceac4044d5e50e429e44c2dc4c79e6714f3401
a84b143f40d9e945b3ee81a2e4522706a381ca85
/PGR2project/src/SceneModel.h
2534879d0731a69f032dee3856047b1e631d44e2
[]
no_license
kucerad/natureal
ed076b87001104d2817ade8f64a34e1571f53fc8
afa143975c54d406334dc1ee7af3f8ee26008334
refs/heads/master
2021-01-01T05:38:08.139120
2011-09-06T07:00:36
2011-09-06T07:00:36
35,802,274
0
0
null
null
null
null
UTF-8
C++
false
false
900
h
#ifndef __SCENEMODEL__ #define __SCENEMODEL__ #include "settings.h" #include "../common/models/cube.h" #include "utils.h" #include "TextureManager.h" #include "ShaderManager.h" #include "../common/Matrix4x4.h" #include "BBox.h" #include "Material.h" class SceneModel { public: SceneModel(); SceneModel(TextureManager *texManager, ShaderManager *shManager); ~SceneModel(void); virtual void draw()=0; virtual void drawForLOD()=0; virtual void init()=0; virtual void update(double time)=0; void translate(v3 &movVector); void rotate(v3 &axis, float angleRad); void scale(v3 &scaleVector); TextureManager *textureManager; ShaderManager *shaderManager; Material * material; m4 transformMatrix; int fastModeLoc; int shadowMappingEnabledLoc; int LCmatrixLoc; int LMV_CVImatrixLoc; int LPmatrixLoc; BBox * bbox; }; #endif
[ "kucera.ad@2c66c73b-3297-93fb-03e7-aeb916e281bd", "[email protected]@2c66c73b-3297-93fb-03e7-aeb916e281bd" ]
[ [ [ 1, 9 ], [ 13, 22 ], [ 25, 28 ], [ 30, 30 ], [ 32, 32 ], [ 34, 34 ], [ 36, 37 ], [ 48, 50 ] ], [ [ 10, 12 ], [ 23, 24 ], [ 29, 29 ], [ 31, 31 ], [ 33, 33 ], [ 35, 35 ], [ 38, 47 ] ] ]
d55ccbf5b0ccf51cdac1bbdddb870b43f1d2bc62
5a05acb4caae7d8eb6ab4731dcda528e2696b093
/Console/spConsole.cpp
aa78faa7e6d67a7580f35465a962ebc577eb9bb9
[]
no_license
andreparker/spiralengine
aea8b22491aaae4c14f1cdb20f5407a4fb725922
36a4942045f49a7255004ec968b188f8088758f4
refs/heads/master
2021-01-22T12:12:39.066832
2010-05-07T00:02:31
2010-05-07T00:02:31
33,547,546
0
0
null
null
null
null
UTF-8
C++
false
false
4,556
cpp
/////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Apr 16 2008) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "spConsole.h" #include <windows.h> #include <boost/tokenizer.hpp> #include <boost/bind.hpp> #include <algorithm> /////////////////////////////////////////////////////////////////////////// using namespace Spiral::Console; typedef boost::tokenizer< boost::char_separator<char> >::iterator iterator; SpConsole::SpConsole( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxFrame( parent, id, title, pos, size, style, name ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetForegroundColour( wxColour( 3, 26, 129 ) ); this->SetBackgroundColour( wxColour( 3, 26, 129 ) ); wxBoxSizer* bSizer1; bSizer1 = new wxBoxSizer( wxVERTICAL ); m_richText1 = new wxRichTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxALWAYS_SHOW_SB|wxNO_BORDER|wxVSCROLL ); m_richText1->SetForegroundColour( wxColour( 3, 26, 129 ) ); m_richText1->SetBackgroundColour( wxColour( 3, 26, 129 ) ); m_richText1->SetFont( wxFont( 11, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ) ); m_richText1->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SpConsole::OnClick ), NULL, this ); m_richText1->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( SpConsole::OnMouseDown ), NULL, this ); m_richText1->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( SpConsole::OnMouseUp ), NULL, this ); m_caretPos = 0; bSizer1->Add( m_richText1, 1, wxEXPAND | wxALL, 5 ); this->SetSizer( bSizer1 ); this->Layout(); this->Show(); } SpConsole::~SpConsole() { m_richText1->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SpConsole::OnClick ), NULL, this ); m_richText1->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( SpConsole::OnMouseDown ), NULL, this ); m_richText1->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( SpConsole::OnMouseUp ), NULL, this ); } WXLRESULT SpConsole::MSWWindowProc( WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam ) { if( nMsg == WM_COPYDATA ) { COPYDATASTRUCT* data = reinterpret_cast< COPYDATASTRUCT* >( lParam ); if( data ) { const wxChar* str = reinterpret_cast< const wxChar* >( data->lpData ); size_t len = data->cbData; wxString wxstr( str, len ); if( wxstr.Freq('^') ) { ProcessText( wxstr ); }else { m_richText1->BeginTextColour( *wxWHITE ); m_richText1->WriteText( wxstr ); m_richText1->EndTextColour(); } m_caretPos = m_richText1->GetCaretPosition(); } return 0; }else { return wxFrame::MSWWindowProc( nMsg, wParam, lParam ); } } void DrawStringColour( wxRichTextCtrl* ctrl, const wxColour& clr, const std::string& str ) { ctrl->BeginTextColour( clr ); ctrl->WriteText( wxString( str.c_str(), str.length() ) ); ctrl->EndTextColour(); } void DrawString( wxRichTextCtrl* ctrl, const std::string& str ) { char c = *(str.c_str()); std::string _str( (str.c_str() + 1), str.length()-1 ); switch( c ) { case 'r': DrawStringColour( ctrl, *wxRED, _str ); break; case 'b': DrawStringColour( ctrl, *wxBLUE, _str ); break; case 'g': DrawStringColour( ctrl, *wxGREEN, _str ); break; case 'w': DrawStringColour( ctrl, *wxWHITE, _str ); break; case 'd': DrawStringColour( ctrl, *wxBLACK, _str ); break; case 'l': DrawStringColour( ctrl, *wxLIGHT_GREY, _str ); break; case 'y': DrawStringColour( ctrl, wxColour( 255,255,0 ), _str ); break; default: DrawStringColour( ctrl, *wxWHITE, _str ); break; } } void SpConsole::ProcessText( const wxString& str ) { const boost::char_separator<char> delims( "^" ); std::string cstr( str.c_str(), str.length() ); boost::tokenizer< boost::char_separator<char> > tokens( cstr, delims ); std::for_each( tokens.begin(), tokens.end(), boost::bind( DrawString, m_richText1, _1 ) ); } void SpConsole::OnMouseDown( wxMouseEvent& event ) { event.Skip(true); } void SpConsole::OnMouseUp( wxMouseEvent& event ) { m_richText1->SetCaretPosition( m_caretPos, true ); event.Skip(true); } void SpConsole::OnClick( wxMouseEvent& event ) { m_richText1->SetCaretPosition( m_caretPos, true ); event.Skip(true); }
[ "DreLnBrown@e933ee44-1dc6-11de-9e56-bf19dc6c588e" ]
[ [ [ 1, 149 ] ] ]
52b0a61f2bf45d7e6f9b23405eb90e4573453484
9a48be80edc7692df4918c0222a1640545384dbb
/Libraries/Boost1.40/libs/spirit/test/qi/char.cpp
d7946c63332b2935998ce6228ad9643b432fdfb9
[ "BSL-1.0" ]
permissive
fcrick/RepSnapper
05e4fb1157f634acad575fffa2029f7f655b7940
a5809843f37b7162f19765e852b968648b33b694
refs/heads/master
2021-01-17T21:42:29.537504
2010-06-07T05:38:05
2010-06-07T05:38:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,193
cpp
/*============================================================================= Copyright (c) 2001-2007 Joel de Guzman Copyright (c) 2001-2009 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #include <boost/detail/lightweight_test.hpp> #include <boost/spirit/include/qi_char.hpp> #include <boost/spirit/include/qi_string.hpp> #include <boost/spirit/include/support_argument.hpp> #include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/include/phoenix_operator.hpp> #include <iostream> #include "test.hpp" int main() { using spirit_test::test; using namespace boost::spirit::qi; using namespace boost::spirit::ascii; using boost::spirit::char_; using boost::spirit::wchar; { BOOST_TEST(test("x", 'x')); BOOST_TEST(test(L"x", L'x')); BOOST_TEST(test("x", char_)); BOOST_TEST(test("x", char_('x'))); BOOST_TEST(!test("x", char_('y'))); BOOST_TEST(test(L"x", char_(L'x'))); BOOST_TEST(!test(L"x", char_(L'y'))); BOOST_TEST(test("x", char_('a', 'z'))); BOOST_TEST(!test("x", char_('0', '9'))); BOOST_TEST(!test("x", ~char_)); BOOST_TEST(!test("x", ~char_('x'))); BOOST_TEST(test(" ", ~char_('x'))); BOOST_TEST(test("X", ~char_('x'))); BOOST_TEST(!test("x", ~char_('b', 'y'))); BOOST_TEST(test("a", ~char_('b', 'y'))); BOOST_TEST(test("z", ~char_('b', 'y'))); BOOST_TEST(test("x", ~~char_)); BOOST_TEST(test("x", ~~char_('x'))); BOOST_TEST(!test(" ", ~~char_('x'))); BOOST_TEST(!test("X", ~~char_('x'))); BOOST_TEST(test("x", ~~char_('b', 'y'))); BOOST_TEST(!test("a", ~~char_('b', 'y'))); BOOST_TEST(!test("z", ~~char_('b', 'y'))); } { BOOST_TEST(test(" x", 'x', space)); BOOST_TEST(test(L" x", L'x', space)); BOOST_TEST(test(" x", char_, space)); BOOST_TEST(test(" x", char_('x'), space)); BOOST_TEST(!test(" x", char_('y'), space)); BOOST_TEST(test(L" x", char_(L'x'), space)); BOOST_TEST(!test(L" x", char_(L'y'), space)); BOOST_TEST(test(" x", char_('a', 'z'), space)); BOOST_TEST(!test(" x", char_('0', '9'), space)); } { BOOST_TEST(test(L"x", wchar)); BOOST_TEST(test(L"x", wchar(L'x'))); BOOST_TEST(!test(L"x", wchar(L'y'))); BOOST_TEST(test(L"x", wchar('a', 'z'))); BOOST_TEST(!test(L"x", wchar('0', '9'))); BOOST_TEST(!test(L"x", ~wchar)); BOOST_TEST(!test(L"x", ~wchar('x'))); BOOST_TEST(test(L" ", ~wchar('x'))); BOOST_TEST(test(L"X", ~wchar('x'))); BOOST_TEST(!test(L"x", ~wchar('b', 'y'))); BOOST_TEST(test(L"a", ~wchar('b', 'y'))); BOOST_TEST(test(L"z", ~wchar('b', 'y'))); BOOST_TEST(test(L"x", ~~wchar)); BOOST_TEST(test(L"x", ~~wchar('x'))); BOOST_TEST(!test(L" ", ~~wchar('x'))); BOOST_TEST(!test(L"X", ~~wchar('x'))); BOOST_TEST(test(L"x", ~~wchar('b', 'y'))); BOOST_TEST(!test(L"a", ~~wchar('b', 'y'))); BOOST_TEST(!test(L"z", ~~wchar('b', 'y'))); } { // single char strings as argument to char_ BOOST_TEST(test("x", char_("x"), space)); BOOST_TEST(test("x", wchar(L"x"), space)); } { // chsets BOOST_TEST(test("x", char_("a-z"))); BOOST_TEST(!test("1", char_("a-z"))); BOOST_TEST(test("1", char_("a-z0-9"))); BOOST_TEST(test("x", char_(L"a-z"))); BOOST_TEST(!test("1", char_(L"a-z"))); BOOST_TEST(test("1", char_(L"a-z0-9"))); } { // lazy chars using namespace boost::phoenix; BOOST_TEST((test("x", char_(val('x'))))); BOOST_TEST((test("h", char_(val('a'), val('n'))))); } return boost::report_errors(); }
[ "metrix@Blended.(none)" ]
[ [ [ 1, 119 ] ] ]
1f8d3d4dd965c4adadf34365ed480a9318eb6a25
49d4b13f55f09359560d0b9111455d08c6b43625
/stvs/trunk/inc/STA_Transform.hpp
92d31f51cb359e122154b14f8f9dc9a0de7506c6
[]
no_license
aniskhan25/stvs
6c53c27a6dbfa6b4105576ef9ecdae4b8a467a19
457fcf9393417d1a3b4aa963dc215a13d8f296a3
refs/heads/master
2016-09-11T06:37:25.202638
2011-09-22T06:28:14
2011-09-22T06:28:14
32,129,030
0
0
null
null
null
null
UTF-8
C++
false
false
1,533
hpp
#ifndef _TRANSFORM_H #define _TRANSFORM_H // includes #include "../inc/struct.hpp" /// <summary> /// This namespace wraps the static pathway's functionality. /// </summary> namespace Static { /// <summary> /// A class with functions to apply the fourier transformations. /// </summary> class Transform { private: cufftHandle plan; /// <summary> /// Source image size. /// </summary> siz_t im_size_; /// <summary> /// No. of pixels in source image. /// </summary> unsigned int size_; void Init(); void Clean(); public: /// <summary> /// Default contructor for Transform class. /// </summary> inline Transform( siz_t const & im_size) { im_size_ = im_size; size_ = im_size.w*im_size.h; Init(); } /// <summary> /// Destructor for Transform class. /// </summary> inline ~Transform() { Clean(); } void FFT( complex_t* out , complex_t* in , siz_t im_size , int direction ); void Apply( complex_t* out , complex_t* in , siz_t im_size , int direction ); }; // class transform __global__ void KernelShift( complex_t* out , complex_t* in , siz_t im_size , point_t center , bool is_width_odd , bool is_height_odd ); __global__ void KernelShiftInverse( complex_t* out , complex_t* in , siz_t im_size , point_t center , bool is_width_odd , bool is_height_odd ); } // namespace Static #endif // _TRANSFORM_H
[ "[email protected]@9aaba9b0-769e-e9e7-77e3-716b6806c03d" ]
[ [ [ 1, 90 ] ] ]
52af97124fe7baaaa2c9e607a93d9998811943e3
854ee643a4e4d0b7a202fce237ee76b6930315ec
/arcemu_svn/src/arcemu-world/LocalizationMgr.h
a1b4fbe433140a7fcbe49adaf617e4cf6f4f88bc
[]
no_license
miklasiak/projekt
df37fa82cf2d4a91c2073f41609bec8b2f23cf66
064402da950555bf88609e98b7256d4dc0af248a
refs/heads/master
2021-01-01T19:29:49.778109
2008-11-10T17:14:14
2008-11-10T17:14:14
34,016,391
2
0
null
null
null
null
UTF-8
C++
false
false
3,607
h
/* * arcemu MMORPG Server * String Localization Manager * Copyright (C) 2007 Burlex <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #ifndef __LOCALIZATIONMGR_H #define __LOCALIZATIONMGR_H struct LocalizedCreatureName { char * Name; char * SubName; }; struct LocalizedGameObjectName { char * Name; }; struct LocalizedNpcText { char * Texts[8][2]; }; struct LocalizedItemPage { char * Text; }; struct LocalizedItem { char * Name; char * Description; }; struct LocalizedQuest { char * Title; char * Details; char * Objectives; char * CompletionText; char * IncompleteText; char * EndText; char * ObjectiveText[4]; }; struct LocalizedWorldBroadCast { char * Text; }; struct LocalizedWorldStringTable { char * Text; }; struct LocalizedWorldMapInfo { char * Text; }; class LocalizationMgr { public: void Shutdown(); void Reload(bool first); void Lower(string& conv); uint32 GetLanguageId(uint32 full); uint32 GetLanguageId(string langstr) { string ns = langstr; Lower(ns); uint32 lid = *(uint32*)ns.c_str(); return GetLanguageId(lid); } LocalizedQuest * GetLocalizedQuest(uint32 id, uint32 language); LocalizedItem * GetLocalizedItem(uint32 id, uint32 language); LocalizedNpcText * GetLocalizedNpcText(uint32 id, uint32 language); LocalizedCreatureName * GetLocalizedCreatureName(uint32 id, uint32 language); LocalizedGameObjectName * GetLocalizedGameObjectName(uint32 id, uint32 language); LocalizedItemPage * GetLocalizedItemPage(uint32 id, uint32 language); LocalizedWorldStringTable * GetLocalizedWorldStringTable(uint32 id, uint32 language); LocalizedWorldBroadCast * GetLocalizedWorldBroadCast(uint32 id, uint32 language); LocalizedWorldMapInfo * GetLocalizedWorldMapInfo(uint32 id, uint32 language); template<typename T> void CopyHashMap(HM_NAMESPACE::hash_map<uint32,T> * src, HM_NAMESPACE::hash_map<uint32,T> * dest) { for(typename HM_NAMESPACE::hash_map<uint32,T>::iterator itr = src->begin(); itr != src->end(); ++itr) dest->insert(make_pair(itr->first,itr->second)); } private: HM_NAMESPACE::hash_map<uint32, LocalizedQuest> * m_Quests; HM_NAMESPACE::hash_map<uint32, LocalizedItem> * m_Items; HM_NAMESPACE::hash_map<uint32, LocalizedNpcText> * m_NpcTexts; HM_NAMESPACE::hash_map<uint32, LocalizedCreatureName> * m_CreatureNames; HM_NAMESPACE::hash_map<uint32, LocalizedGameObjectName> * m_GameObjectNames; HM_NAMESPACE::hash_map<uint32, LocalizedItemPage> * m_ItemPages; HM_NAMESPACE::hash_map<uint32, LocalizedWorldStringTable> * m_WorldStrings; HM_NAMESPACE::hash_map<uint32, LocalizedWorldBroadCast> * m_WorldBroadCast; HM_NAMESPACE::hash_map<uint32, LocalizedWorldMapInfo> * m_WorldMapInfo; vector<pair<uint32,uint32> > m_languages; bool m_disabled; }; extern LocalizationMgr sLocalizationMgr; #endif
[ "[email protected]@3074cc92-8d2b-11dd-8ab4-67102e0efeef", "[email protected]@3074cc92-8d2b-11dd-8ab4-67102e0efeef" ]
[ [ [ 1, 1 ], [ 3, 61 ], [ 77, 99 ], [ 103, 117 ], [ 122, 128 ] ], [ [ 2, 2 ], [ 62, 76 ], [ 100, 102 ], [ 118, 121 ] ] ]
3d4774e046a142d5cecd1bba93b95684615b335f
4f53f86ab3426b7911a1a24ca9e2c4e1517a105e
/GameContent/Content/Effects/includes/Lighting.inc
03eb3faa695f6a273dda799d770ed279b2bc1dcc
[]
no_license
fjpavm/gdddev
77410ff21ce9dc75fe48115d54f23cd662555afc
43bdf93018226485bd0a9d66707188f8760e0421
refs/heads/master
2021-01-01T17:21:03.912725
2010-10-04T10:40:56
2010-10-04T10:40:56
34,629,578
0
0
null
null
null
null
UTF-8
C++
false
false
529
inc
#ifndef LIGHTING_SHADER_INCLUDE #define LIGHTING_SHADER_INCLUDE shared float3 LightDir; shared float4 LightAmbient; shared float4 LightDiffuse; shared float4 GetLighting(float4 Position, float3 Normal){ // Standard lighting equation float4 vTotalLightDiffuse = LightAmbient; //float3 lightDir = normalize(LightPos-Position); // direction of light vTotalLightDiffuse += LightDiffuse * max(0,dot(Normal, LightDir)); vTotalLightDiffuse.a = 1.0f; return vTotalLightDiffuse; } #endif
[ "FrankM@localhost" ]
[ [ [ 1, 19 ] ] ]
61ad4852412a07198ad5b89c35c2b89aee119dea
24bc1634133f5899f7db33e5d9692ba70940b122
/src/ammo/network/netpeer.cpp
47ff7ee979f48ed9920c2b4e612dd4507819930b
[]
no_license
deft-code/ammo
9a9cd9bd5fb75ac1b077ad748617613959dbb7c9
fe4139187dd1d371515a2d171996f81097652e99
refs/heads/master
2016-09-05T08:48:51.786465
2009-10-09T05:49:00
2009-10-09T05:49:00
32,252,326
0
0
null
null
null
null
UTF-8
C++
false
false
4,865
cpp
#include "ammo/network/netpeer.hpp" #include <iostream> // The length of time the peer has to send any final packets // when it is destroyed #define PEER_SHUTDOWN_DELAY (100) // How long the peer waits each heartbeat // Increase this if the game needs more priority #define PEER_HEARTBEAT_DELAY (0) namespace ammo { /// Creates an instance of NetPeer /// @param parent The client or server object this is attached to /// @param isServer True if this is the server, false otherwise /// @param portNum The port for this server (ignored if isServer is false) /// @param maxConns The maximum number of connections for this server (ignored if isServer is false) NetPeer::NetPeer(Game* parent, bool isServer, unsigned short portNum, unsigned int maxConns) { _parent = parent; _isServer = isServer; // Construct our objects // Our connection factory is responsible for making objects in the replica manager _connFactory = new ReplicaObjectConstructorFactory(_parent->GetGameState()); // The replica manager is responsible for handling replica packets _repMngr = new RakNet::ReplicaManager2(); _repMngr->SetDefaultPacketReliability(UNRELIABLE_SEQUENCED); // Manages network ids of objects we create _netIDMngr = new NetworkIDManager(); #if _DEBUG // For now, we only log all the packets in debug mode _log = new PacketFileLogger(); #endif // Set up our peer (the raknet object responsible for connections) _peer = RakNetworkFactory::GetRakPeerInterface(); _peer->SetNetworkIDManager(_netIDMngr); // Establish whether this peer has the rights to create and destroy objects _netIDMngr->SetIsNetworkIDAuthority(isServer); // attach our plugins _peer->AttachPlugin(_repMngr); #if _DEBUG _peer->AttachPlugin(_log); // Start our log _log->SetPrintAcks(false); if (_isServer) { _log->StartLog("serverLog"); } else { _log->StartLog("clientLog"); } #endif // Set up our connection factory for replica manager _repMngr->SetConnectionFactory(_connFactory); // Set up the server or client's ip/port/max connections if(isServer) { // Set up the server SocketDescriptor s(portNum, 0); // Start the server _peer->Startup(maxConns, PEER_HEARTBEAT_DELAY, &s, 1); // Set the maximum connections allowed by the server _peer->SetMaximumIncomingConnections(maxConns); // Automatically add new connections to the replica manager system _repMngr->SetAutoAddNewConnections(true); } else { // Set up the client SocketDescriptor s; _peer->Startup(1, PEER_HEARTBEAT_DELAY, &s, 1); } #if _DEBUG // Report to the console if we are debugging. if (isServer) { std::cout << "NetPeer (server) finished construction." << std::endl; } else { std::cout << "NetPeer (client) finished construction." << std::endl; } #endif } NetPeer::~NetPeer() { #if _DEBUG // Report to the console if debugging if (_isServer) { std::cout << "NetPeer (server) shutting down." << std::endl; } else { std::cout << "NetPeer (client) shutting down." << std::endl; } #endif // Shut down our client/server, waiting PEER_SHUTDOWN_DELAY ms for any packets to send _peer->Shutdown(PEER_SHUTDOWN_DELAY); // We're shutdown, clean up the peer RakNetworkFactory::DestroyRakPeerInterface(_peer); } // When we receive a packet, it stays in the queue of received packets // until we Deallocate it. This is an important step. void NetPeer::DeallocatePacket(Packet* packet) { // pass the packet to the raknet peer. _peer->DeallocatePacket(packet); } // Returns the packet in the front of the arrived packets queue, but does // not remove it from the queue. It is important to call Deallocate // on the packet after you are done with it. Packet* NetPeer::Receive() { return _peer->Receive(); } // Connects this peer to another peer. Returns false if this peer is a server. // Also returns false if there was something wrong with the client setup. // Note: This cannot be used to detect whether the client successfully connected // to the server, just whether the client was set up properly to make the attempt. bool NetPeer::Connect(const char* host,unsigned short remotePort, const char* passwordData,int pwdDataLength) { if (!_isServer) { return _peer->Connect(host, remotePort,passwordData, pwdDataLength); } return false; } SystemAddress NetPeer::GetLocalAddress() { return _peer->GetExternalID(UNASSIGNED_SYSTEM_ADDRESS); } }
[ "PhillipSpiess@d8b90d80-bb63-11dd-bed2-db724ec49875", "j.nick.terry@d8b90d80-bb63-11dd-bed2-db724ec49875" ]
[ [ [ 1, 28 ], [ 30, 149 ] ], [ [ 29, 29 ], [ 150, 151 ] ] ]