mirror of
				https://github.com/isledecomp/isle.git
				synced 2025-10-25 09:24:17 +00:00 
			
		
		
		
	 494a556f8e
			
		
	
	494a556f8e
	
	
	
		
			
			* Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commitd87d665127. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit8c815418d2. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
		
			
				
	
	
		
			69 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			69 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "orientableroi.h"
 | |
| 
 | |
| #include "../decomp.h"
 | |
| 
 | |
| DECOMP_SIZE_ASSERT(OrientableROI, 0xdc)
 | |
| 
 | |
| // FUNCTION: LEGO1 0x100a5910
 | |
| void OrientableROI::VTable0x1c()
 | |
| {
 | |
| 	UpdateWorldBoundingVolumes();
 | |
| 	UpdateWorldVelocity();
 | |
| }
 | |
| 
 | |
| // FUNCTION: LEGO1 0x100a5930
 | |
| void OrientableROI::SetLocalTransform(const Matrix4Impl& p_transform)
 | |
| {
 | |
| 	reinterpret_cast<Matrix4Impl&>(m_local2world) = p_transform;
 | |
| 	UpdateWorldBoundingVolumes();
 | |
| 	UpdateWorldVelocity();
 | |
| }
 | |
| 
 | |
| // FUNCTION: LEGO1 0x100a5960
 | |
| void OrientableROI::VTable0x24(const Matrix4Data& p_transform)
 | |
| {
 | |
| 	Matrix4Data l_matrix(m_local2world);
 | |
| 	m_local2world.EqualsMxProduct(&p_transform, &l_matrix);
 | |
| 	UpdateWorldBoundingVolumes();
 | |
| 	UpdateWorldVelocity();
 | |
| }
 | |
| 
 | |
| // FUNCTION: LEGO1 0x100a59b0
 | |
| void OrientableROI::UpdateWorldData(const Matrix4Data& p_transform)
 | |
| {
 | |
| 	Matrix4Data l_matrix(m_local2world);
 | |
| 	m_local2world.EqualsMxProduct(&l_matrix, &p_transform);
 | |
| 	UpdateWorldBoundingVolumes();
 | |
| 	UpdateWorldVelocity();
 | |
| 
 | |
| 	// iterate over comps
 | |
| 	if (m_comp)
 | |
| 		for (CompoundObject::iterator iter = m_comp->begin(); !(iter == m_comp->end()); iter++) {
 | |
| 			ROI* child = *iter;
 | |
| 			static_cast<OrientableROI*>(child)->UpdateWorldData(p_transform);
 | |
| 		}
 | |
| }
 | |
| 
 | |
| // FUNCTION: LEGO1 0x100a5a50
 | |
| void OrientableROI::UpdateWorldVelocity()
 | |
| {
 | |
| }
 | |
| 
 | |
| // FUNCTION: LEGO1 0x100a5d80
 | |
| const Vector3& OrientableROI::GetWorldVelocity() const
 | |
| {
 | |
| 	return (Vector3&) *m_world_velocity.GetData();
 | |
| }
 | |
| 
 | |
| // FUNCTION: LEGO1 0x100a5d90
 | |
| const BoundingBox& OrientableROI::GetWorldBoundingBox() const
 | |
| {
 | |
| 	return m_world_bounding_box;
 | |
| }
 | |
| 
 | |
| // FUNCTION: LEGO1 0x100a5da0
 | |
| const BoundingSphere& OrientableROI::GetWorldBoundingSphere() const
 | |
| {
 | |
| 	return m_world_bounding_sphere;
 | |
| }
 |