Ejemplo n.º 1
0
moText moShader::LoadShaderSource(moText p_fn)
{
	FILE *src_file = fopen(p_fn, "rt");
	moText src_text;

	if (src_file)
	{
		char *content = NULL;
		int count = 0;

		fseek(src_file, 0, SEEK_END);
		count = ftell(src_file);
		fseek(src_file, 0, SEEK_SET);
        if (count > 0)
		{
			content = (char *)malloc(sizeof(char) * (count+1));
			count = fread(content,sizeof(char), count, src_file);
			content[count] = '\0';
		}
		fclose(src_file);

		src_text = moText(content);
	}
	else
	{
		moText errstr = "Shader source file ";
		errstr += p_fn + moText(" not found") ;
		if (MODebug != NULL) MODebug2->Push(errstr);
		src_text = moText("");
	}

	return src_text;
}
Ejemplo n.º 2
0
void
moPreviewFrame::OnToolClick( wxCommandEvent &event) {

    if ( event.GetId() == TOOLPLAY) {
        ShowMessage( moText("Play") );
        //ToolBar1->Hide();
        //SetClientSize(wxSize(1024,768));
    } else if (event.GetId() == TOOLPAUSE) {
        ShowMessage( moText("Pause") );
        //ToolBar1->Hide();

    } else if (event.GetId() == TOOLFULLSCREEN) {
        ShowMessage( moText("Fullscreen") );
        FullScreen();
    }

    //wxDisplay thisDisplay(0);
    //wxDisplay theOtherDisplay(1);

    //thisDisplay.GetFromWindow(this);

    //wxRect client = thisDisplay.GetClientArea();
    //wxRect client2 = theOtherDisplay.GetClientArea();

    //wxString clientareastr;
    //wxString clientareastr2;

    //clientareastr.Printf(" area: %d,%d,%d,%d", client.GetLeft(), client.GetTop(), client.GetWidth(), client.GetHeight() );
    //clientareastr2.Printf(" area: %d,%d,%d,%d", client2.GetLeft(), client2.GetTop(), client2.GetWidth(), client2.GetHeight() );

   ///wxMessageBox(thisDisplay.GetName() + clientareastr);
   //wxMessageBox(theOtherDisplay.GetName() + clientareastr2 );


}
Ejemplo n.º 3
0
MOboolean moTextureManager::Init()
{
	if (m_pResourceManager){
		m_glmanager = m_pResourceManager->GetGLMan();
		m_fbmanager = m_pResourceManager->GetFBMan();
	} else return false;

	m_textures_array.Init(0, NULL);

	m_preview_texture_idx = AddTexture("preview_texture", 1024, 1024);
	//AddTexture("texture_clip1", 1024, 768);
	//AddTexture("texture_clip2", 1024, 768);
	//AddTexture("texture_clip3", 1024, 768);

	int m_id_default = AddTexture( "default", 256, 256);
	moTexture* DefaultTexture =  GetTexture(m_id_default);
    if (DefaultTexture) DefaultTexture->BuildFromFile(
        m_pResourceManager->GetDataMan()->GetAppPath() +
        moSlash +
        moText("..") +
        moSlash +
        moText("..") +
        moSlash +
        moText("art") +
        moSlash +
        moText("icons") +
        moSlash +
        moText("moldeologo.png")
    );

	return (m_glmanager && m_fbmanager);
}
Ejemplo n.º 4
0
moFont*
moFontManager::LoadFont( moText p_fontname_path, moFontType p_fonttype, MOfloat p_fontsize ) {

    moFont *pFont = NULL;
    moTexture* p_Texture = NULL;
    int idx = -1;

	pFont = new moFont();

	if (pFont) {

        if ( p_fonttype == MO_FONT_GLBUILD ) {
            idx = m_pResourceManager->GetTextureMan()->GetTextureMOId( p_fontname_path, true );
            if (idx>-1) p_Texture = (moTexture*) m_pResourceManager->GetTextureMan()->GetTexture(idx);
            if (p_Texture)
              pFont->Init( p_fonttype, p_fontname_path, p_fontsize, p_Texture->GetGLId() );
            MODebug2->Push( moText("Loaded Bitmap Font: ") + (moText)p_fontname_path );
        } else if ( pFont->Init( p_fonttype, p_fontname_path, p_fontsize) ) {
            MODebug2->Push( moText("Loaded FreeType Font: ") + (moText)p_fontname_path );
        } else {
            MODebug2->Push( moText("Error: font: ") + (moText)p_fontname_path );
            return NULL;
        }

        AddFont(pFont);

	}

	return pFont;
}
Ejemplo n.º 5
0
END_TEST

START_TEST(test_data_session_config) {
  bool res;
  moDataSessionConfig *DataSessionConfig = new moDataSessionConfig(
		  moText("apppath"),
		  moText("datapath"),
		  moText("config.mol"),
		  moText("session_file_name"),
		  moText("video_file_name"),
		  0, 1, 2, 3);
  fail_unless(DataSessionConfig != NULL);
/*
  fail_unless(DataSessionConfig->GetDataPath() == moText("datapath"));
  fail_unless(DataSessionConfig->GetConsoleConfigName() == moText("config.mol"));
  fail_unless(DataSessionConfig->GetSessionFileName() == moText("session_file_name"));
  fail_unless(DataSessionConfig->GetVideoFileName() == moText("video_file_name"));
*/
  /* TODO: Not implemented
	m_MaxKeys
	m_MaxTimecode
	m_Port
	m_Address
   */
  delete DataSessionConfig;
}
Ejemplo n.º 6
0
void
moMidiDevice::Update(moEventList *Events) {

	MOint i;
	moMidiData	mididata;

	//m_lock.Lock();


	for( i=0; i < m_MidiDatas.Count(); i++ ) {

		mididata = m_MidiDatas.Get( i );

		MODebug2->Push(moText("MIDI Data CC:") + IntToStr(mididata.m_CC) + moText(" val:") + IntToStr(mididata.m_Val) );

		Events->Add( MO_IODEVICE_MIDI, (MOint)(mididata.m_Type), mididata.m_Channel, mididata.m_CC, mididata.m_Val );

	}
	m_MidiDatas.Empty();


	//mididata = m_MidiDatas.Get( m_MidiDatas.Count()-1 );
	//moData pData = m_DataMessage.Get(m_DataMessage.Count()-1);
	//MODebug2->Push(moText("MIDI n:") + IntToStr(m_DataMessage.Count()) + moText(" code:") + IntToStr(pData.Int()) );
    //m_DataMessage.Empty();

	//m_lock.Unlock();

}
Ejemplo n.º 7
0
moDirectorStatus
moLayerEffectCtrl::ParameterUpdated( moParameterDescriptor p_ParameterDesc ) {

    moValueIndex vindex;

    ///solo actualizamos aquellos parametros que tienen textura y color...
    ///el nombre del parametro debe ser "color" o "texture"

    switch( p_ParameterDesc.GetParamDefinition().GetType() ) {

      case MO_PARAM_COLOR:
      case MO_PARAM_TEXTURE:

        if (  p_ParameterDesc.GetParamDefinition().GetName()==moText("color") ||
              p_ParameterDesc.GetParamDefinition().GetName()==moText("texture")
        ) {

          vindex.m_ParamIndex = p_ParameterDesc.GetIndex();
          vindex.m_ValueIndex = p_ParameterDesc.GetIndexValue();

          moValueDescriptor ValueDes( p_ParameterDesc, vindex );

          ///PEDIMOS EL VALOR.... completo
          ValueDes = GetValue( ValueDes );

          ///auto actualizamos
          ValueUpdated( ValueDes );
        }

        break;

    }

    return MO_DIRECTOR_STATUS_OK;
}
Ejemplo n.º 8
0
void moPostPlugin::Load(moText plugin_file)
{
    name = plugin_file;
    handle = moLoadPlugin(plugin_file);

    if(!handle) {
    #ifndef MO_WIN32
          moDebugManager::Error( "moPostPlugin::Load > Cannot open library: " + moText(dlerror()) );
    #else
      CHAR szBuf[80];
      DWORD dw = GetLastError();
      sprintf(szBuf, "%s failed: GetLastError returned %i\n",
        (char*)plugin_file, (int)dw);
      moDebugManager::Error( "moPostPlugin::Load > Cannot open library: " + moText(szBuf) );
    #endif
      return;
    }

    #ifdef MO_WIN32
	FARPROC farp;
	farp = GetProcAddress(handle, "DestroyPostEffectFactory");
    CreatePostEffectFactory = CreatePostEffectFactoryFunction(GetProcAddress(handle, "CreatePostEffectFactory"));
	DestroyPostEffectFactory = DestroyPostEffectFactoryFunction(GetProcAddress(handle, "DestroyPostEffectFactory"));
    #else
    CreatePostEffectFactory = CreatePostEffectFactoryFunction(dlsym(handle, "CreatePostEffectFactory"));
	DestroyPostEffectFactory = DestroyPostEffectFactoryFunction(dlsym(handle, "DestroyPostEffectFactory"));
    #endif

	if(this->CreatePostEffectFactory!=NULL)
		m_factory = this->CreatePostEffectFactory();

}
Ejemplo n.º 9
0
MOboolean
moFont::Init( moFontType p_Type, moText p_fontname, MOint p_size, MOuint glid ) {

  glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );

	switch( (int)p_Type ) {
		case MO_FONT_OUTLINE://3d
			m_pFace = (FTFont*)new FTGLOutlineFont( p_fontname );
			break;
		case MO_FONT_TRANSLUCENT://2d
            m_pFace = (FTFont*)new FTGLBitmapFont( p_fontname );
			break;
		case MO_FONT_TRANSLUCENTTEXTURE://3d
            m_pFace = (FTFont*)new FTGLTextureFont( p_fontname );
			break;
		case MO_FONT_GRAYSCALE://2d
            m_pFace = (FTFont*)new FTGLPixmapFont( p_fontname );
			break;
		case MO_FONT_MONOCHROME://2d
            m_pFace = (FTFont*)new FTGLPixmapFont( p_fontname );
			break;
		case MO_FONT_SOLID://3d extruded (depth)
            m_pFace = (FTFont*)new FTGLExtrdFont( p_fontname );
			break;
		case MO_FONT_FILLED://3d
            m_pFace = (FTFont*)new FTGLPolygonFont( p_fontname );
			break;
    case MO_FONT_GLBUILD:
            m_FontGLId = glid;
            BuildFont();
			break;
    case MO_FONT_UNDEFINED:
            MODebug2->Error(moText(" FontManager:: UNDEFINED font type"));
            m_pFace = NULL;
            break;

	}


  FTFont* FF = (FTFont*) m_pFace;
  FT_Error FontError;
  if (FF)
    FontError = FF->Error();

	if ( ( p_Type!=MO_FONT_GLBUILD && ( FF == NULL || FontError!=0 ) ) ||
         ( p_Type==MO_FONT_UNDEFINED )  || (p_Type==MO_FONT_GLBUILD && (int)m_FontGLId==-1)) {
        MODebug2->Error(moText("FontManager: Could not construct face from ")+(moText)p_fontname);
        return false;
	} else {
		m_Name = p_fontname;
    if (FF) {
      SetSize(p_size);
      FF->Depth(20);
      //FF->CharMap(ft_encoding_unicode);
    }
		return true;
	}

	return false;
}
Ejemplo n.º 10
0
void moPreviewFrame::OnSize(wxSizeEvent& event)
{
    wxSize framesize;
    wxPoint framepos;

    framesize = event.GetSize();
    framepos = GetPosition();

    Log( moText("moPreviewFrame::OnSize > Frame On Size : ") + IntToStr(framesize.GetWidth()) + moText("X") + IntToStr(framesize.GetHeight())
        + moText( " Position:")
        + IntToStr( framepos.x ) + moText("X") + IntToStr( framepos.y )
        );

    if (m_pGLCanvas) {
        //ReSetGLCanvas( m_pGLCanvas->GetContext() );
        m_pGLCanvas->SetSize(0,0,framesize.GetWidth(), framesize.GetHeight());
        m_pGLCanvas->Reset();
    }

    Refresh();

    //SetView( 0 , 0, framesize.GetWidth() , framesize.GetHeight() );
    //Init();
    //wxFrame::OnSize(event);
}
Ejemplo n.º 11
0
void
moPostEffectDebug::Update( moEventList* p_EventList ) {

	moEvent *actual,*tmp;
	moMessage *pmessage;
	MOint evtscount = 0;

	actual = p_EventList->First;
	textevents.Empty();
	textevents.Add(moText("Events List:"));

	//Procesamos los eventos recibidos de los MoldeoObject Outlets
	while(actual!=NULL) {
		tmp = actual->next;

		if (actual->reservedvalue3 == MO_MESSAGE) {

			//pSample = (moVideoSample*)actual->pointer;
			pmessage = (moMessage*)actual;
			textevents.Add( moText("Did:") + IntToStr( pmessage->m_MoldeoIdDest) + moText("SrcId:") + IntToStr( pmessage->m_MoldeoIdSrc) );
		} else {
			textevents.Add( moText("Did:") + IntToStr( actual->deviceid) );
		}
		evtscount++;
		actual = tmp;
	}
	textevents.Set(0,moText("Events List:")+IntToStr(evtscount));

}
Ejemplo n.º 12
0
// Callback: Detected a pose
void UserPose_PoseDetected(xn::PoseDetectionCapability& capability, const XnChar* strPose, XnUserID nId, void* pCookie)
{
	//printf("Pose %s detected for user %d\n", strPose, nId);
	moAbstract::MODebug2->Push( moText("Pose ") + moText(strPose) + moText(" detected for user: ") + IntToStr(nId));

	m_UserGenerator.GetPoseDetectionCap().StopPoseDetection(nId);
	m_UserGenerator.GetSkeletonCap().RequestCalibration(nId, TRUE);
}
Ejemplo n.º 13
0
moConfigDefinition *
moPostEffectVideoWall::GetDefinition( moConfigDefinition *p_configdefinition ) {
	//default: alpha, color, syncro
	p_configdefinition = moEffect::GetDefinition( p_configdefinition );
	p_configdefinition->Add( moText("configuration"), MO_PARAM_NUMERIC, VIDEOWALL_CONFIGURATION, moValue( "0", "NUM").Ref() );
	p_configdefinition->Add( moText("translatez"), MO_PARAM_FUNCTION, VIDEOWALL_TRANSLATEZ );
	return p_configdefinition;
}
Ejemplo n.º 14
0
/**
FreeImage error handler
@param fif Format / Plugin responsible for the error
@param message Error message
*/
void FreeImageErrorHandler(FREE_IMAGE_FORMAT fif, const char *message) {

   if(fif != FIF_UNKNOWN) {
     //printf("%s Format\n", FreeImage_GetFormatFromFIF(fif));
   }
   moAbstract::MODebug2->Error(moText("FreeImage error:") + moText(message));

}
Ejemplo n.º 15
0
MOboolean moPreEffectErase::Init()
{
    if (!PreInit()) return false;

    moDefineParamIndex( ERASE_ALPHA, moText("alpha") );
    moDefineParamIndex( ERASE_COLOR, moText("color") );

	return true;
}
Ejemplo n.º 16
0
/*
MO_PARAM_ALPHA,			//value type: NUM or FUNCTION
MO_PARAM_COLOR,			//value type: NUM[4] or FUNCTION[4] or
MO_PARAM_SYNC,			//value type: NUM or FUNCTION
MO_PARAM_TEXT,			//value type: TXT or LNK
MO_PARAM_TEXTURE,		//value type: TXT or LNK
MO_PARAM_VIDEO,		//value type: TXT or LNK
MO_PARAM_SOUND,		//value type: TXT or LNK
MO_PARAM_FUNCTION,		//value type: NUM or FUNCTION
MO_PARAM_SCRIPT,		//value type: TXT or LNK
MO_PARAM_TRA,			//value type: NUM[3] or FUNCTION[3]
MO_PARAM_ROT,			//value type: NUM[3] or FUNCTION[3]
MO_PARAM_SCA			//value type: NUM[3] or FUNCTION[3]
*/
moConfigDefinition *
moEffect::GetDefinition( moConfigDefinition *p_configdefinition ) {

    p_configdefinition = moMoldeoObject::GetDefinition(p_configdefinition);
    p_configdefinition->Add( moText("alpha"), MO_PARAM_ALPHA );
    p_configdefinition->Add( moText("color"), MO_PARAM_COLOR );
    p_configdefinition->Add( moText("syncro"), MO_PARAM_SYNC );
    p_configdefinition->Add( moText("phase"), MO_PARAM_PHASE );
    return p_configdefinition;
}
Ejemplo n.º 17
0
moConfigDefinition *
moPostEffectColorFilter::GetDefinition( moConfigDefinition *p_configdefinition ) {
	//default: alpha, color, syncro
	p_configdefinition = moEffect::GetDefinition( p_configdefinition );
	p_configdefinition->Add( moText("color"), MO_PARAM_COLOR, COLORFILTER_COLOR );
	p_configdefinition->Add( moText("blending"), MO_PARAM_FUNCTION, COLORFILTER_BLENDING );
	p_configdefinition->Add( moText("sensibility"), MO_PARAM_FUNCTION, COLORFILTER_SENSIBILITY );
	p_configdefinition->Add( moText("syncro"), MO_PARAM_FUNCTION, COLORFILTER_SYNCRO );
	return p_configdefinition;
}
Ejemplo n.º 18
0
//Devuelve el puntero generado
//en caso de no encontrar el archivo, devuelve MOTEXTURAS_ERROR
mo3dModel*
mo3dModelManager::Load3dModel( moText Tname, moText datapath ) {

	MOint i,j;
	CLoad3DS g_Load3ds; // Clase importacion de escenas 3DS.
	moText strTexture;
	moText file3ds;
	MOuint texid=MO_UNDEFINED;
    if (datapath==moText(""))
        file3ds = m_pResourceManager->GetDataMan()->GetDataPath();
    else
        file3ds = datapath;
	file3ds+= moText("/");
	file3ds+= Tname;

	Models[nModels] = new(mo3dModel);

	if(Models[nModels]!=NULL) {
		Models[nModels]->numOfMaterials = 0;
		Models[nModels]->numOfObjects = 0;

		if(g_Load3ds.Import3DS( Models[nModels], file3ds) == true) {

			for(i = 0; i < Models[nModels]->numOfMaterials; i++)
			{
				//check all maps of the material
				for(j=0;j<(MOint)Models[nModels]->pMaterials[i].texMaps.size();j++) {
						// Check to see if there is a file name to load in this material
					if(strlen(Models[nModels]->pMaterials[i].texMaps[j].strFile) > 0)
					{
						// Use the name of the texture file to load the bitmap, with a texture ID(i).
						// We pass in our global texture array, the name of the texture, and an ID to reference it.
						//CreateTexture(g_Texture, g_3DModel.pMaterials[i].strFile, i);
						strTexture = Models[nModels]->pMaterials[i].texMaps[j].strFile;
						strTexture = moText("objetos/materials/")+(moText)strTexture;
						texid = Textures->GetTextureMOId(strTexture, true);
					}

					// Set the texture ID for this material
					//if(texid!=MOTEXTURAS_ERROR) {
						Models[nModels]->pMaterials[i].texMaps[j].textureId = texid;
					//}
				}
			}
			Models[nModels]->name = Tname;
		} else {
			delete Models[nModels];
			Models[nModels] = NULL;
			return NULL;
		}
	} else return(NULL);

	nModels++;
	return Models[nModels-1];
}
Ejemplo n.º 19
0
moConfigDefinition *
moNetOSCIn::GetDefinition( moConfigDefinition *p_configdefinition ) {

	//default: alpha, color, syncro
	p_configdefinition = moMoldeoObject::GetDefinition( p_configdefinition );
	p_configdefinition->Add( moText("hosts"), MO_PARAM_TEXT, NETOSCIN_HOSTS, moValue("127.0.0.1","TXT") );
	p_configdefinition->Add( moText("port"), MO_PARAM_NUMERIC, NETOSCIN_PORT, moValue("7400","INT") );
	p_configdefinition->Add( moText("receive_events"), MO_PARAM_NUMERIC, NETOSCIN_RECEIVEEVENTS, moValue("0","INT") );

	return p_configdefinition;
}
Ejemplo n.º 20
0
moConfigDefinition *
moPreEffectErase::GetDefinition( moConfigDefinition *p_configdefinition ) {

	p_configdefinition = moMoldeoObject::GetDefinition(p_configdefinition);
	p_configdefinition->Add( moText("alpha"), MO_PARAM_ALPHA );
	p_configdefinition->Add( moText("color"), MO_PARAM_COLOR, -1, moValue( "0.0", "FUNCTION", "0.0","FUNCTION","0.0","FUNCTION","0.0","FUNCTION") );
	p_configdefinition->Add( moText("syncro"), MO_PARAM_SYNC );
	p_configdefinition->Add( moText("phase"), MO_PARAM_PHASE );


	return p_configdefinition;
}
Ejemplo n.º 21
0
MOboolean moCalibrationGrid::Init() {

    if (!PreInit()) return false;

	moDefineParamIndex( CALIBRATIONGRID_ALPHA, moText("alpha") );
	moDefineParamIndex( CALIBRATIONGRID_COLOR, moText("color") );

    Tx = Ty = Tz = Rx = Ry = Rz = 0.0;
	Sx = Sy = Sz = 1.0;

	return true;
}
Ejemplo n.º 22
0
mo3dModel*
mo3dModelManagerRef::Get(int i) {

	if((i>=0) &&(i<(MOint)nModels)) {
		return(Models[i]);
	} else {
                moText text;
                text = moText("Error(ajModelsRef): el indice: ");
                text += IntToStr(i);
                text += moText(" no existe.");
		MODebug2->Error(text);
		return(0);
	}
}
Ejemplo n.º 23
0
int mo3dModelManagerRef::Add(moText namemodelo,mo3dModelManager *M) {

	MOint i;

    mo3dModel* newModel = NULL;

	//y alli cargamos la textura
	newModel = M->Get3dModel(namemodelo);

	if(newModel != MO_3DMODEL_ERROR) {

        mo3dModel **ModelsAux = NULL;

        ModelsAux = new mo3dModel* [nModels+1];

        if(Models!=NULL) {
            //copio el contenido del buffer
            for(i=0;i<(int)nModels;i++) {
                ModelsAux[i] = Models[i];
            }
            //borro el buffer viejo
            delete[] Models;
            Models = NULL;
        }

        //aumentamos el array de uno
        nModels++;
        //recreamos el buffer con un elemento mas
        Models = new mo3dModel* [nModels];
        //lo completamos otra vez con los datos guardados en memoria
        if(Models!=NULL) {
            for(i=0;i<(int)nModels-1;i++) {
                Models[i] = ModelsAux[i];
            }
        }
        //nos paramos en el last
        i = nModels - 1 ;

        Models[i] = newModel;
        MODebug2->Push(moText("Modelo cargado: ") + (moText)Models[i]->name);

        delete [] ModelsAux;
        return i;
	} else {
		MODebug2->Push(moText("ERROR! Modelo  no cargado: "));
	}

	return MO_UNDEFINED;
}
Ejemplo n.º 24
0
LIBMOLDEO_API moPostEffect* moNewPostEffect(moText effect_name, moPostPluginsArray &plugins)
{
    // Creando el nombre complete del plugin(incluyendo ruta por defecto)
    // a partir del nombre del efecto.
    moText complete_name;

    if(!stricmp(effect_name, "nil")) return NULL;

    #if defined(_WIN32)
    complete_name = moText(moDataManager::GetModulesDir()+ "/posteffects/") + (moText)effect_name;
		#ifdef _DEBUG
		complete_name+= moText("_d");
		#endif
    complete_name += moText(".dll");
    #else
    complete_name = moText(moDataManager::GetModulesDir()+ "/posteffects/libmoldeo_") + (moText)effect_name;
		#ifdef _DEBUG
		complete_name+= moText("_d");
		#endif
    complete_name += moPluginExtension;
    #endif
		//printf("completename:%s\n",complete_name);

    // Indice del plugin que se utilizara para crear a este efecto.
    int plg_index = -1;

    // First, revisa que el plugin ya no haya sido cargado antes.
    for(MOuint i = 0; i < plugins.Count(); i++)
        if(!stricmp(plugins[i]->GetName(), complete_name))
        {
            plg_index = i;
            break;
        }

    if(plg_index == -1)
    {
        // Es la primera vez que se intenta cargar este plugin. Se lo agrega al array.
        // Falta control de errores(que pasa si la libreria no carga, etc?) :-)
        plg_index = plugins.Count();
		moPostPlugin *pplugin = new moPostPlugin(complete_name);
        plugins.Add( pplugin );
    }

    // El plugin crea al efecto!
	if(plugins[plg_index]->m_factory!=NULL)
	return plugins[plg_index]->Create();
	else return NULL;
}
moDirectorStatus
moTreeLayerCtrl::ValueUpdated( moValueDescriptor p_ValueDesc ) {

    //recorre los mobs a ver a quien le pertenece!!! este valor y se lo pasa

    moItemLayerWindow* pLayerCtrl = FindObjectByMob( p_ValueDesc.GetParamDescriptor().GetMobDescriptor() );

    if (pLayerCtrl) {

            moMobDescriptor p_MobDesc = pLayerCtrl->Get();

            return pLayerCtrl->ValueUpdated( p_ValueDesc );

    } else if ( p_ValueDesc.GetParamDescriptor().GetMobDescriptor().GetMobDefinition().GetType() == MO_OBJECT_IODEVICE
    || p_ValueDesc.GetParamDescriptor().GetMobDescriptor().GetMobDefinition().GetType() == MO_OBJECT_RESOURCE
    || p_ValueDesc.GetParamDescriptor().GetMobDescriptor().GetMobDefinition().GetType() == MO_OBJECT_MASTEREFFECT) {
        //skip...

    } else {
        LogError( moText("No layer object control founded!! ::") + (moText)p_ValueDesc.GetParamDescriptor().GetMobDescriptor().GetMobDefinition().GetLabelName() );

        return MO_DIRECTOR_STATUS_ERROR;

    }


    return MO_DIRECTOR_STATUS_OK;

}
Ejemplo n.º 26
0
MOboolean
mo3dModelManagerRef::Init(moConfig * cfg, MOuint param, mo3dModelManager *M) {
        moText text;

	nModels = cfg->GetValuesCount(param);
        text = moText("nModels: ");
        text +=  IntToStr(nModels);
	MODebug2->Push(text);
	Models = new mo3dModel* [nModels];
	for(MOuint i=0;i<nModels;i++) Models[i] = NULL;

	MODebug2->Push(moText("Espacio asignado: cargando modelos... 8o|"));
	LoadModels(cfg,param,M);
	MODebug2->Push(moText("Models cargados 8oD"));
	return true;
}
Ejemplo n.º 27
0
moConnector::moConnector() {
	m_ConnectorLabelName = moText("");
	m_ConnectorId = -1;
	m_bUpdated = false;
	m_pData = NULL;
	m_pParam = NULL;
}
Ejemplo n.º 28
0
MOboolean
moFontManager::Init() {

    m_Fonts.Init(0, NULL);



	moFont *pFont = NULL;

	pFont = new moFont();

	if (pFont) {

		moText	completepath;

		//completepath = m_pResourceManager->GetDataMan()->GetDataPath() + moText("/");
		completepath = moText("../../art/fonts/Tuffy.ttf");

		pFont->Init( MO_FONT_OUTLINE, completepath, 16 );


		//pFont->Init( MO_FONT_SOLID, completepath, 16 );

	}

	AddFont(pFont);

	return true;

}
Ejemplo n.º 29
0
moShader::moShader()
{
    m_Active = 0;
    m_VertErrorCode = 0;
    m_FragErrorCode = 0;

	m_name = moText("");
}
Ejemplo n.º 30
0
moConfigDefinition *
moMidi::GetDefinition( moConfigDefinition *p_configdefinition ) {

	//default: alpha, color, syncro
	p_configdefinition = moIODevice::GetDefinition( p_configdefinition );
	p_configdefinition->Add( moText("mididevice"), MO_PARAM_TEXT, MIDI_DEVICE, moValue( "BCR2000[2]", "TXT") );
	return p_configdefinition;
}