It's large already. I can post the part for positioning:
Vector4 MakeVector4(float x,float y,float z,float w){
Vector4 v;
v.x=x;
v.y=y;
v.z=z;
v.w=w;
return v;
}
Vector4 gVect4_01;
int SCENE_FX;
int ZABI_FX;
void LoadFXs(void){
SetCurrentDirectory(FolderList.GamePath.c_str());
string Relative="../fx/";
SCENE_FX=dbLoadEffect(Relative+"normalmapping.fx",0,FindFreeFX());//the scene will have different values than NPC effect
ZABI_FX=dbLoadEffect(Relative+"normalmapping.fx",0,FindFreeFX());
gVect4_01=MakeVector4(0.2f,0.2f,0.2f,0);
dbSetEffectConstantVector(SCENE_FX,"Ambient",&gVect4_01);
dbSetEffectTechnique(SCENE_FX,"Ambient");
dbSetEffectConstantVector(ZABI_FX,"Ambient",&gVect4_01);
dbSetEffectTechnique(ZABI_FX,"Ambient");
gVect4_01=MakeVector4(0.0f,3.2f,0.0f,0);
dbSetEffectConstantVector(SCENE_FX,"LightPosition_1",&gVect4_01);
gVect4_01=MakeVector4(0.15f,0.15f,0.15f,0);
dbSetEffectConstantVector(SCENE_FX,"LightColor_1",&gVect4_01);
dbSetEffectConstantFloat (SCENE_FX,"LightRange_1",30.0f);
dbSetEffectTechnique(SCENE_FX,"Light1");
}
The fastest code is the code never written.