| 140 | } |
| 141 | |
| 142 | void CScriptSerializeAny::PushFuncParam(IScriptSystem* pSS) const |
| 143 | { |
| 144 | switch (m_type) |
| 145 | { |
| 146 | case eSST_Bool: |
| 147 | pSS->PushFuncParam(*Ptr<bool>()); |
| 148 | break; |
| 149 | case eSST_Float: |
| 150 | pSS->PushFuncParam(*Ptr<float>()); |
| 151 | break; |
| 152 | case eSST_Int8: |
| 153 | pSS->PushFuncParam((int)*Ptr<int8>()); |
| 154 | break; |
| 155 | case eSST_Int16: |
| 156 | pSS->PushFuncParam((int)*Ptr<int16>()); |
| 157 | break; |
| 158 | case eSST_Int32: |
| 159 | pSS->PushFuncParam((int)*Ptr<int32>()); |
| 160 | break; |
| 161 | case eSST_StringTable: |
| 162 | case eSST_String: |
| 163 | pSS->PushFuncParam(Ptr<string>()->c_str()); |
| 164 | break; |
| 165 | case eSST_EntityId: |
| 166 | { |
| 167 | ScriptHandle temp; |
| 168 | temp.n = *Ptr<EntityId>(); |
| 169 | pSS->PushFuncParam(temp); |
| 170 | } |
| 171 | break; |
| 172 | case eSST_Vec3: |
| 173 | pSS->PushFuncParam(*Ptr<Vec3>()); |
| 174 | break; |
| 175 | case eSST_Void: |
| 176 | pSS->PushFuncParam(0); |
| 177 | break; |
| 178 | default: |
| 179 | CRY_ASSERT(!"need to add the type enum to this switch"); |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | void CScriptSerializeAny::SerializeWith(TSerialize ser, const char* name) |
| 184 | { |
no test coverage detected