MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / CScriptArrayWrapper

Class CScriptArrayWrapper

Source/Objects/movementobject.cpp:1980–2005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1978
1979template <typename T>
1980class CScriptArrayWrapper {
1981 public:
1982 CScriptArray* c_script_array_;
1983
1984 CScriptArrayWrapper(CScriptArray* c_script_array) : c_script_array_(c_script_array) {}
1985
1986 T& operator[](int index) {
1987 return *(T*)c_script_array_->At(index);
1988 }
1989
1990 const T& operator[](int index) const {
1991 return *(T*)c_script_array_->At(index);
1992 }
1993
1994 void resize(int size) {
1995 c_script_array_->Resize(size);
1996 }
1997
1998 int size() {
1999 return (int)c_script_array_->GetSize();
2000 }
2001
2002 void push_back(const T& val) {
2003 c_script_array_->InsertLast((void*)&val);
2004 }
2005};
2006
2007#define rigged_object_SetFrameMatrix(A, B) (rigged_object.animation_frame_bone_matrices[A] = B)
2008#define rigged_object_GetFrameMatrix(A) (rigged_object.animation_frame_bone_matrices[A])

Callers

nothing calls this directly

Calls 1

AtMethod · 0.45

Tested by

no test coverage detected