Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit ffde979

Browse files
author
Ali Lloyd
committed
[[ RefactorSyntax ]] fixed various things preventing Windows from running properly
1 parent 4ef1f9d commit ffde979

16 files changed

+69
-74
lines changed

engine/src/bitmapeffect.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ bool MCBitmapEffectsGetProperty(MCExecContext& ctxt, MCBitmapEffectsRef& self, M
737737
MCAutoValueRef t_valueref;
738738
// Fetch the property, then store it into the array.
739739
MCBitmapEffectFetchProperty(ctxt, t_effect, s_bitmap_effect_properties[i] . value, t_value);
740-
MCExecTypeConvertAndReleaseAlways(ctxt, t_value . type, &t_value . type + 1, kMCExecValueTypeValueRef, &(&t_valueref));
740+
MCExecTypeConvertAndReleaseAlways(ctxt, t_value . type, &t_value , kMCExecValueTypeValueRef, &(&t_valueref));
741741
MCArrayStoreValue(*v, ctxt . GetCaseSensitive(), MCNAME(s_bitmap_effect_properties[i] . token), *t_valueref);
742742
}
743743
}
@@ -906,7 +906,7 @@ static void MCBitmapEffectStoreProperty(MCExecContext& ctxt, MCBitmapEffect& x_e
906906
case kMCBitmapEffectPropertyColor:
907907
{
908908
MCColor t_color;
909-
MCExecTypeConvertAndReleaseAlways(ctxt, p_value . type, &p_value . type + 1, kMCExecValueTypeColor, &t_color);
909+
MCExecTypeConvertAndReleaseAlways(ctxt, p_value . type, &p_value , kMCExecValueTypeColor, &t_color);
910910
MCBitmapEffectsSetColorProperty(x_effect, p_prop, t_color, r_dirty);
911911
}
912912
break;
@@ -922,7 +922,7 @@ static void MCBitmapEffectStoreProperty(MCExecContext& ctxt, MCBitmapEffect& x_e
922922
case kMCBitmapEffectPropertyAngle:
923923
{
924924
uinteger_t t_value;
925-
MCExecTypeConvertAndReleaseAlways(ctxt, p_value . type, &p_value . type + 1, kMCExecValueTypeUInt, &t_value);
925+
MCExecTypeConvertAndReleaseAlways(ctxt, p_value . type, &p_value , kMCExecValueTypeUInt, &t_value);
926926
MCBitmapEffectsSetUIntProperty(x_effect, p_prop, p_value . uint_value, r_dirty);
927927
}
928928
break;
@@ -989,7 +989,7 @@ bool MCBitmapEffectsSetProperty(MCExecContext& ctxt, MCBitmapEffectsRef& self, M
989989
bool t_dirty_array;
990990
t_dirty_array = false;
991991
MCAutoArrayRef t_array;
992-
MCExecTypeConvertAndReleaseAlways(ctxt, p_value . type, &p_value . type + 1, kMCExecValueTypeArrayRef, &(&t_array));
992+
MCExecTypeConvertAndReleaseAlways(ctxt, p_value . type, &p_value , kMCExecValueTypeArrayRef, &(&t_array));
993993
// Loop through all the properties in the table and apply the relevant
994994
// ones.
995995
for(uint32_t i = 0; i < ELEMENTS(s_bitmap_effect_properties); i++)

engine/src/chunk.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ bool MCChunk::getobj(MCExecContext& ctxt, MCObjectPtr& r_object, Boolean p_recur
13251325
return true;
13261326
}
13271327

1328-
void MCChunk::getoptionalobj(MCExecContext& ctxt, MCObject *&r_object, uint4 r_parid, Boolean p_recurse)
1328+
void MCChunk::getoptionalobj(MCExecContext& ctxt, MCObject *&r_object, uint4& r_parid, Boolean p_recurse)
13291329
{
13301330
MCObjectPtr t_obj_ptr;
13311331

engine/src/chunk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class MCChunk : public MCExpression
9797
// Added for MCChunk::count:
9898
// in some cases there is no object to return but no error either
9999
// and caller might want to default to something else
100-
void getoptionalobj(MCExecContext& ctxt, MCObject *&r_object, uint4 r_parid, Boolean p_recurse);
100+
void getoptionalobj(MCExecContext& ctxt, MCObject *&r_object, uint4& r_parid, Boolean p_recurse);
101101
void getoptionalobj(MCExecContext &ctxt, MCObjectPtr &r_object, Boolean p_recurse);
102102

103103
#ifdef LEGACY_EXEC

engine/src/cmds.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ const char *MCDoMenu::lookup(MCStringRef s)
641641
{
642642
uint2 size = ELEMENTS(domenu_table);
643643
while(size--)
644-
if (MCStringIsEqualToCString(s, domenu_table[size].token, kMCCompareCaseless));
644+
if (MCStringIsEqualToCString(s, domenu_table[size].token, kMCCompareCaseless))
645645
return domenu_table[size].command;
646646
return NULL;
647647
}

engine/src/exec-interface-field-chunk.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,10 +1062,10 @@ void MCField::GetFormattedRectOfCharChunk(MCExecContext& ctxt, uint32_t p_part_i
10621062
while (ei > 0 && sptr != pgptr);
10631063

10641064
// MW-2012-01-25: [[ FieldMetrics ]] Make sure the rect we return is in card coords.
1065-
r_value . height = y - (maxy - y);
1065+
r_value . height = (maxy - 2*y);
10661066
r_value . width = maxx - minx;
10671067
r_value . x = minx + getcontentx();
1068-
r_value . y = (maxy - y) + yoffset;
1068+
r_value . y = y + yoffset;
10691069
}
10701070
else
10711071
memset(&r_value, 0, sizeof(MCRectangle));

engine/src/exec-interface-field.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,8 @@ void MCField::GetFormattedWidth(MCExecContext& ctxt, uinteger_t& r_width)
595595
{
596596
if (opened)
597597
{
598-
r_width = textwidth + rect.width - getfwidth()
599-
+ leftmargin + rightmargin
598+
uint2 fwidth = getfwidth();
599+
r_width = textwidth + rect.width - fwidth + leftmargin + rightmargin
600600
+ (flags & F_VSCROLLBAR ? (flags & F_DONT_WRAP ? 0 : -vscrollbar->getrect().width) : 0);
601601
}
602602
else

engine/src/exec-nativecontrol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ void MCNativeControlExecGet(MCExecContext& ctxt, MCStringRef p_control_name, MCS
713713

714714
MCExecValue t_value;
715715
MCExecFetchProperty(ctxt, t_info, &t_control, t_value);
716-
MCExecTypeConvertToValueRefAndReleaseAlways(ctxt, t_value . type, &t_value . type + 1, r_result);
716+
MCExecTypeConvertToValueRefAndReleaseAlways(ctxt, t_value . type, &t_value, r_result);
717717
}
718718
}
719719

engine/src/exec-store.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void MCStoreExecGet(MCExecContext& ctxt, integer_t p_id, MCStringRef p_prop_name
188188
{
189189
MCExecValue t_value;
190190
MCExecFetchProperty(ctxt, t_info, t_purchase, t_value);
191-
MCExecTypeConvertToValueRefAndReleaseAlways(ctxt, t_value . type, &t_value . type + 1, r_value);
191+
MCExecTypeConvertToValueRefAndReleaseAlways(ctxt, t_value . type, &t_value, r_value);
192192
return;
193193
}
194194

0 commit comments

Comments
 (0)