Compare commits

..

2 Commits

Author SHA1 Message Date
Nuno Gonçalves (Ulukyn) 7df9b2f255 Merge branch '58-add-rotz-roty-and-dist-reflect-lua-to-3dcamera-of-a-scene' into 'main/gingo-test'
Resolve "Add rotz roty and dist reflect lua to 3DCamera of a scene"

See merge request ryzom/ryzom-core!48
3 years ago
Nuno Gonçalves (Ulukyn) 8697553956 Resolve "Add rotz roty and dist reflect lua to 3DCamera of a scene" 3 years ago

@ -1602,8 +1602,7 @@ public:
{
CSPhraseManager *pPM= CSPhraseManager::getInstance();
sint val= (sint32)value.getInteger();
// first half of memorized stanza sets
clamp(val, 0, MEM_SET_TYPES::NumMemories / 2 - 1);
clamp(val, 0, MEM_SET_TYPES::NumMemories-1);
pPM->selectMemoryLineDB(val);
}
}
@ -1627,11 +1626,8 @@ public:
else
{
CSPhraseManager *pPM= CSPhraseManager::getInstance();
// second half of memorized stanza sets
sint minValue = MEM_SET_TYPES::NumMemories / 2;
sint maxValue = MEM_SET_TYPES::NumMemories - 1;
sint val = (sint32)value.getInteger() + minValue;
clamp(val, minValue, maxValue);
sint val= (sint32)value.getInteger();
clamp(val, 0, MEM_SET_TYPES::NumMemories-1);
pPM->selectMemoryLineDBalt(val);
}
}

@ -403,6 +403,15 @@ public:
float getTgtY() const { return _Target.y; }
float getTgtZ() const { return _Target.z; }
float getRotZ() const { return _Rot.z; }
void setRotZ(float f) { _Rot.z = f; }
float getRotY() const { return _Rot.y; }
void setRotY(float f) { _Rot.y = f; }
float getDist() const { return _Dist; }
void setDist(float f) { _Dist = f; }
REFLECT_EXPORT_START(CInterface3DCamera, CInterfaceElement)
REFLECT_FLOAT ("posx", getPosX, setPosX);
REFLECT_FLOAT ("posy", getPosY, setPosY);
@ -410,19 +419,13 @@ public:
REFLECT_FLOAT ("tgtx", getTgtX, setTgtX);
REFLECT_FLOAT ("tgty", getTgtY, setTgtY);
REFLECT_FLOAT ("tgtz", getTgtZ, setTgtZ);
REFLECT_FLOAT ("rotz", getRotZ, setRotZ);
REFLECT_FLOAT ("roty", getRotY, setRotY);
REFLECT_FLOAT ("dist", getDist, setDist);
REFLECT_FLOAT ("fov", getFOV, setFOV);
REFLECT_FLOAT ("roll", getRoll, setRoll);
REFLECT_EXPORT_END
float getRotZ() const { return _Rot.z; }
void setRotZ(float f) { _Rot.z = f; }
float getRotY() const { return _Rot.y; }
void setRotY(float f) { _Rot.y = f; }
float getDist() const { return _Dist; }
void setDist(float f) { _Dist = f; }
void reset(); // Reset user interaction
protected:

@ -27,7 +27,7 @@ namespace MEM_SET_TYPES
// New System. Only 10 memories are allowed
enum
{
NumMemories= 20,
NumMemories= 10,
};
// Deprecated

Loading…
Cancel
Save