MOHAWK: Handle LB conversion from string to point/rect.
This commit is contained in:
parent
3a2bd43c75
commit
43d6d49e2e
1 changed files with 10 additions and 4 deletions
|
@ -101,8 +101,11 @@ double LBValue::toDouble() const {
|
|||
Common::Point LBValue::toPoint() const {
|
||||
switch (type) {
|
||||
case kLBValueString:
|
||||
// FIXME
|
||||
return Common::Point();
|
||||
{
|
||||
Common::Point ret;
|
||||
sscanf(string.c_str(), "%hd , %hd", &ret.x, &ret.y);
|
||||
return ret;
|
||||
}
|
||||
case kLBValueInteger:
|
||||
return Common::Point(integer, integer);
|
||||
case kLBValuePoint:
|
||||
|
@ -117,8 +120,11 @@ Common::Point LBValue::toPoint() const {
|
|||
Common::Rect LBValue::toRect() const {
|
||||
switch (type) {
|
||||
case kLBValueString:
|
||||
// FIXME
|
||||
return Common::Rect();
|
||||
{
|
||||
Common::Rect ret;
|
||||
sscanf(string.c_str(), "%hd , %hd , %hd , %hd", &ret.left, &ret.top, &ret.right, &ret.bottom);
|
||||
return ret;
|
||||
}
|
||||
case kLBValueInteger:
|
||||
return Common::Rect(integer, integer, integer, integer);
|
||||
case kLBValuePoint:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue