예제 #1
0
void FCDPhysicsShape::SetMass(float _mass)
{
	SAFE_DELETE(mass);
	mass = new float;
	*mass = _mass;
	SetDirtyFlag();
}
예제 #2
0
void SelectClear(int mode)
{
   Uint8 *dst;
   Uint size = 0;
   Uint planes = 0;
   Uint ofset = 0;
   switch(mode) {
     case SCR_200LINE:
       size = 0x4000;
       planes = 3;
       ofset = 0x4000;
       break;
     case SCR_400LINE:
       size = 0x8000;
       planes = 3;
       ofset = 0x8000;
       break;
     case SCR_4096:
       size = 0x2000;
       planes = 12;
       ofset = 0x2000;
       break;
     case SCR_262144:
       size = 0x2000;
       planes = 18;
       ofset = 0x2000;
       break;
   }
   if((size == 0) || (planes == 0)) {
       return;
   }

   if(bCLEnabled) {
#ifdef _USE_OPENCL
     dst = cldraw->GetBufPtr(0);
     if(dst == NULL) {
       cldraw->ReleaseBufPtr();
       return;
     }
     memset(dst, 0x00, size *  planes);
     cldraw->ReleaseBufPtr();
#endif
   } else {
     if(pVram2 == NULL) return;
     switch(nRenderMethod) {
     case RENDERING_RASTER:
       memset(pVram2, 0x00, 640 * 400 * sizeof(Uint32));
       Palet640(); // ?
       Palet320();
       SetDirtyFlag(0, 400, TRUE);
       break;
     case RENDERING_FULL:
     case RENDERING_BLOCK:
       memset(pVram2, 0x00, 640 * 400 * sizeof(Uint32));
       SetDrawFlag(TRUE);
       break;
     }       
   }
   return;
}
예제 #3
0
void FCDPhysicsShape::SetDensity(float _density) 
{
	SAFE_DELETE(density);
	density = new float;
	*density = _density;
	SetDirtyFlag();
}
예제 #4
0
void FCDEffectParameterT<PrimitiveType>::Overwrite(FCDEffectParameter* target)
{
	if (target->GetType() == GetType())
	{
		FCDEffectParameterT<PrimitiveType>* s = (FCDEffectParameterT<PrimitiveType>*) target;
		s->value = value;
		SetDirtyFlag();
	}
}
예제 #5
0
void FCDEffectParameterAnimatableT<PrimitiveType, Qualifiers>::Overwrite(FCDEffectParameter* target)
{
	if (target->GetType() == GetType())
	{
		FCDEffectParameterAnimatableT<PrimitiveType, Qualifiers>* s = (FCDEffectParameterAnimatableT<PrimitiveType, Qualifiers>*) target;
		s->value = *value;
		SetDirtyFlag();
	}
}
예제 #6
0
void FCDENode::SetContent(const fchar* _content)
{
	// As COLLADA doesn't allow for mixed content, release all the children.
	while (!children.empty())
	{
		children.back()->Release();
	}

	content = _content;
	SetDirtyFlag();
}
예제 #7
0
    /*
     *  320x200、アナログモード セレクト
     */
BOOL Select320(void)
{
/*
 * 全領域無効
 */
   int y;
   //LockVram();
   nDrawTop = 0;
   nDrawBottom = 200;
   nDrawLeft = 0;
   nDrawRight = 320;
   
#if defined(USE_SSE2)
    if(pCpuID->use_sse2) {
       pVirtualVramBuilder = &api_vram4096_sse2;
    } else {
       pVirtualVramBuilder = &api_vram4096_generic;
    }
#else
   pVirtualVramBuilder = &api_vram4096_generic;
#endif
   LockVram();
   if(!bCLEnabled) {
     bPaletFlag = TRUE;
     SetDirtyFlag(0, 400, TRUE);
     Palet640();
     Palet320();
   } else {
     bNextFrameRender = TRUE;
     //SetDirtyFlag(0, 400, TRUE);
     for(y = 0; y < 400; y++) {
       bDrawLine[y] = FALSE;
       bDirtyLine[y] = FALSE;
     }
   }     
#if XM7_VER >= 3
   /*
    * アナログ/200ラインモード
    */
   bMode = SCR_4096;

#else				/*  */
   /*
    * アナログモード
    */
   bAnalog = TRUE;
#endif				/*  */
  SDLDrawFlag.Drawn = TRUE;
  UnlockVram();
  return TRUE;
}
예제 #8
0
void FCDAnimationMultiCurve::SetKeyCount(size_t count, FUDaeInterpolation::Interpolation interpolation)
{
	size_t oldCount = GetKeyCount();
	if (oldCount < count)
	{
		keys.reserve(count);
		for (; oldCount < count; ++oldCount) AddKey(interpolation);
	}
	else if (count < oldCount)
	{
		for (FCDAnimationMKeyList::iterator it = keys.begin() + count; it != keys.end(); ++it) delete (*it);
		keys.resize(count);
	}
	SetDirtyFlag();
}
예제 #9
0
   /*
    *  320x200、26万色モード セレクト
    */
BOOL Select256k()
{
   /*
    * 全領域無効
    */
//   LockVram();
   int y;
   nDrawTop = 0;
   nDrawBottom = 200;
   nDrawLeft = 0;
   nDrawRight = 320;
   //bPaletFlag = TRUE;
#if defined(USE_SSE2)
    if(pCpuID->use_sse2) {
       pVirtualVramBuilder = &api_vram256k_sse2;
    } else {
       pVirtualVramBuilder = &api_vram256k_generic;
    }
#else
   pVirtualVramBuilder = &api_vram256k_generic;
#endif

   if(!bCLEnabled) {
      Palet640();
      Palet320();
   }
   
   LockVram();
   if((nRenderMethod == RENDERING_RASTER) || (bCLEnabled)){
      bNextFrameRender = TRUE;
      SetDirtyFlag(0, 400, TRUE);
      for(y = 0; y < 400; y++) {
	   bDrawLine[y] = FALSE;
	   bDirtyLine[y] = FALSE;
      }
   } else {
      SetDrawFlag(TRUE);
   }

   /*
    * アナログ(26万色)/200ラインモード
    */
   bMode = SCR_262144;
   SDLDrawFlag.Drawn = TRUE;
   UnlockVram();
   return TRUE;
}
예제 #10
0
void FCDEntityReference::SetUri(const FUUri& uri)
{
	entityId = TO_STRING(uri.GetFragment());
    entityId = FCDObjectWithId::CleanId(entityId);
	FCDPlaceHolder* documentPlaceHolder = NULL;
	
	if (uri.IsFile())
	{
		fstring fileUrl = GetDocument()->GetFileManager()->GetCurrentUri().MakeAbsolute(uri.GetAbsolutePath());
	
		documentPlaceHolder = GetDocument()->GetExternalReferenceManager()->FindPlaceHolder(fileUrl);
		if (documentPlaceHolder == NULL)
		{
			documentPlaceHolder = GetDocument()->GetExternalReferenceManager()->AddPlaceHolder(fileUrl);
		}
	}
	SetPlaceHolder(documentPlaceHolder);
	SetDirtyFlag();
}
예제 #11
0
파일: sscawrd.c 프로젝트: fbtestrepo/hw
static void CheckExtendTable (
  SscBadgPtr sbp
)

{
  Int2  numItems;

  if (sbp == NULL) return;

  GetDocParams (sbp->badglog, &numItems, NULL);
  if (sbp->currItem == numItems) {
    AppendItem (sbp->badglog, PrintBadgTable, sbp, FALSE, 1,
                &badgParFmt, badgColFmt, systemFont);
  }

  Update ();

  SetDirtyFlag (sbp->tables);
}
예제 #12
0
// Creates a new face.
void FCDGeometryPolygons::AddFace(uint32 degree)
{
	bool newPolygonSet = faceVertexCounts.empty();
	faceVertexCounts.push_back(degree);

	// Inserts empty indices
	size_t inputCount = inputs.size();
	for (size_t i = 0; i < inputCount; ++i)
	{
		FCDGeometryPolygonsInput* input = inputs[i];
		if (!newPolygonSet && input->OwnsIndices()) input->SetIndexCount(input->GetIndexCount() + degree);
		else if (newPolygonSet && input->GetIndexCount() == 0)
		{
			// Declare this input as the owner!
			input->SetIndexCount(degree);
		}
	}

	parent->Recalculate();
	SetDirtyFlag();
}
예제 #13
0
void FCDGeometryMesh::SetConvexHullOf(FCDGeometry* _geom)
{
	convexHullOf = _geom->GetDaeId();
	SetDirtyFlag();
}
예제 #14
0
void FCDEntity::SetNote(const fstring& _note)
{
	note = _note;
	SetDirtyFlag();
}
예제 #15
0
void FCDENode::SetName(fm::string& _name)
{
	name = _name;
	CleanName(name);
	SetDirtyFlag();
}
예제 #16
0
void CPGauge::Exec(void){
	CPObject::Exec();
	SetDirtyFlag(); //VWF FOR NOW
}
예제 #17
0
파일: FCDObject.cpp 프로젝트: Marlinc/0ad
FCDObject::FCDObject(FCDocument* _document)
:	FUParameterizable(), document(_document)
,	userHandle(NULL)
{
	SetDirtyFlag();
}
예제 #18
0
void FCDEffectParameter::SetReference(const char* _reference)
{
	reference = FCDObjectWithId::CleanSubId(_reference);
	SetDirtyFlag();
}
예제 #19
0
void FCDEffectCode::SetFilename(const fstring& _filename)
{
	filename = GetDocument()->GetFileManager()->GetCurrentUri().MakeAbsolute(_filename);
	type = INCLUDE;
	SetDirtyFlag();
}
예제 #20
0
// Do not inline this function.  No memory-creating functions should be inline
void FCDEffectCode::SetSubId(const fm::string& _sid)
{ 
	sid = FCDObjectWithId::CleanSubId(_sid); 
	SetDirtyFlag(); 
}
예제 #21
0
void FCDEntityInstance::SetName(const fstring& _name) 
{
	name = FCDEntity::CleanName(_name.c_str());
	SetDirtyFlag();
}
예제 #22
0
void FCDTransform::SetSubId(const fm::string& subId)
{
	sid = FCDObjectWithId::CleanSubId(subId); 
	SetDirtyFlag();
}