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

Commit a898ea5

Browse files
Following files updated:
engine/src/aclip.cpp engine/src/aclip.h engine/src/answer.cpp engine/src/ask.cpp engine/src/button.cpp engine/src/button.h engine/src/capsule.cpp engine/src/card.cpp engine/src/card.h engine/src/cmds.cpp engine/src/cmds.h engine/src/cmdsc.cpp engine/src/cmdsf.cpp
1 parent b6c124f commit a898ea5

File tree

13 files changed

+71
-53
lines changed

13 files changed

+71
-53
lines changed

engine/src/aclip.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ void MCAudioClip::timer(MCNameRef mptr, MCParameter *params)
189189
delete this;
190190
}
191191
}
192-
192+
#ifdef LEGACY_EXEC
193193
Exec_stat MCAudioClip::getprop_legacy(uint4 parid, Properties which, MCExecPoint &ep, Boolean effective)
194194
{
195195
switch (which)
196-
{
196+
{
197197
#ifdef /* MCAudioClip::getprop */ LEGACY_EXEC
198198
case P_SIZE:
199199
ep.setint(size);
@@ -253,21 +253,23 @@ Exec_stat MCAudioClip::getprop_legacy(uint4 parid, Properties which, MCExecPoint
253253
}
254254
else
255255
ep.setint(loudness);
256-
break;
256+
break;
257257
#endif /* MCAudioClip::getprop */
258258
default:
259259
return MCObject::getprop_legacy(parid, which, ep, effective);
260260
}
261261
return ES_NORMAL;
262262
}
263+
#endif
263264

265+
#ifdef LEGACY_EXEC
264266
Exec_stat MCAudioClip::setprop_legacy(uint4 parid, Properties p, MCExecPoint &ep, Boolean effective)
265267
{
266268
int2 i1;
267269
MCString data = ep.getsvalue();
268270

269271
switch (p)
270-
{
272+
{
271273
#ifdef /* MCAudioClip::setprop */ LEGACY_EXEC
272274
case P_PLAY_DESTINATION:
273275
case P_PLAY_LOUDNESS:
@@ -340,13 +342,14 @@ Exec_stat MCAudioClip::setprop_legacy(uint4 parid, Properties p, MCExecPoint &ep
340342
#endif
341343

342344
}
343-
return ES_NORMAL;
345+
return ES_NORMAL;
344346
#endif /* MCAudioClip::setprop */
345347
default:
346348
break;
347349
}
348350
return MCObject::setprop_legacy(parid, p, ep, effective);
349351
}
352+
#endif
350353

351354
Boolean MCAudioClip::del()
352355
{
@@ -1033,4 +1036,4 @@ IO_stat MCAudioClip::load(IO_handle stream, const char *version)
10331036
if ((stat = IO_read_uint2(&loudness, stream)) != IO_NORMAL)
10341037
return stat;
10351038
return loadpropsets(stream);
1036-
}
1039+
}

engine/src/aclip.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ class MCAudioClip : public MCObject
7979

8080
virtual void timer(MCNameRef mptr, MCParameter *params);
8181

82-
virtual Exec_stat getprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
83-
virtual Exec_stat setprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
82+
virtual Exec_stat getprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective) { MCAssert(false); }
83+
virtual Exec_stat setprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective) { MCAssert(false); }
8484

8585

8686
virtual Boolean del();

engine/src/answer.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ void MCAnswer::exec_ctxt(MCExecContext& ctxt)
388388
}
389389
}
390390

391-
#ifdef /* MCAnswer::exec */ LEGACY_EXEC
391+
#ifdef LEGACY_EXEC
392392
Exec_stat MCAnswer::exec(MCExecPoint& ep)
393393
{
394394
Exec_errors t_error = EE_UNDEFINED;
@@ -440,9 +440,9 @@ Exec_stat MCAnswer::exec(MCExecPoint& ep)
440440

441441
return t_error ? ES_ERROR : ES_NORMAL;
442442
}
443-
#endif /* MCAnswer::exec */
443+
#endif
444444

445-
#ifdef /* MCAnswer::exec_pagesetup */ LEGACY_EXEC
445+
#ifdef LEGACY_EXEC
446446
Exec_errors MCAnswer::exec_pagesetup(MCExecPoint& ep, const char *p_title)
447447
{
448448
Exec_errors t_error;
@@ -465,9 +465,9 @@ Exec_errors MCAnswer::exec_pagesetup(MCExecPoint& ep, const char *p_title)
465465

466466
return t_error;
467467
}
468-
#endif /* MCAnswer::exec_pagesetup */
468+
#endif
469469

470-
#ifdef /* MCAnswer::exec_printer */ LEGACY_EXEC
470+
#ifdef LEGACY_EXEC
471471
Exec_errors MCAnswer::exec_printer(MCExecPoint& ep, const char *p_title)
472472
{
473473
Exec_errors t_error;
@@ -490,27 +490,27 @@ Exec_errors MCAnswer::exec_printer(MCExecPoint& ep, const char *p_title)
490490

491491
return t_error;
492492
}
493-
#endif /* MCAnswer::exec_printer */
493+
#endif
494494

495-
#ifdef /* MCAnswer::exec_effect */ LEGACY_EXEC
495+
#ifdef LEGACY_EXEC
496496
Exec_errors MCAnswer::exec_effect(MCExecPoint& ep, const char *p_title)
497497
{
498498
MCresult -> clear(False);
499499
MCtemplateplayer -> stdeffectdlg(ep, p_title, sheet);
500500
return EE_UNDEFINED;
501501
}
502-
#endif /* MCAnswer::exec_effect */
502+
#endif
503503

504-
#ifdef /* MCAnswer::exec_record */ LEGACY_EXEC
504+
#ifdef LEGACY_EXEC
505505
Exec_errors MCAnswer::exec_record(MCExecPoint& ep, const char *p_title)
506506
{
507507
MCresult -> clear(False);
508508
MCtemplateplayer -> stdrecorddlg(ep, p_title, sheet);
509509
return EE_UNDEFINED;
510510
}
511-
#endif /* MCAnswer::exec_record */
511+
#endif
512512

513-
#ifdef /* MCAnswer::exec_colour */ LEGACY_EXEC
513+
#ifdef LEGACY_EXEC
514514
Exec_errors MCAnswer::exec_colour(MCExecPoint& ep, const char *p_title)
515515
{
516516
Exec_errors t_error = EE_UNDEFINED;
@@ -533,9 +533,9 @@ Exec_errors MCAnswer::exec_colour(MCExecPoint& ep, const char *p_title)
533533

534534
return t_error;
535535
}
536-
#endif /* MCAnswer::exec_colour */
536+
#endif
537537

538-
#ifdef /* MCAnswer::exec_file */ LEGACY_EXEC
538+
#ifdef LEGACY_EXEC
539539
Exec_errors MCAnswer::exec_file(MCExecPoint& ep, const char *p_title)
540540
{
541541
Exec_errors t_error = EE_UNDEFINED;
@@ -606,9 +606,9 @@ Exec_errors MCAnswer::exec_file(MCExecPoint& ep, const char *p_title)
606606

607607
return t_error;
608608
}
609-
#endif /* MCAnswer::exec_file */
609+
#endif
610610

611-
#ifdef /* MCAnswer::exec_folder */ LEGACY_EXEC
611+
#ifdef LEGACY_EXEC
612612
Exec_errors MCAnswer::exec_folder(MCExecPoint& ep, const char *p_title)
613613
{
614614
Exec_errors t_error = EE_UNDEFINED;
@@ -644,9 +644,9 @@ Exec_errors MCAnswer::exec_folder(MCExecPoint& ep, const char *p_title)
644644

645645
return t_error;
646646
}
647-
#endif /* MCAnswer::exec_folder */
647+
#endif
648648

649-
#ifdef /* MCAnswer::exec_notify */ LEGACY_EXEC
649+
#ifdef LEGACY_EXEC
650650
Exec_errors MCAnswer::exec_notify(MCExecPoint& ep, const char *p_title)
651651
{
652652
Exec_errors t_error = EE_UNDEFINED;
@@ -725,9 +725,9 @@ Exec_errors MCAnswer::exec_notify(MCExecPoint& ep, const char *p_title)
725725

726726
return t_error;
727727
}
728-
#endif /* MCAnswer::exec_notify */
728+
#endif
729729

730-
#ifdef /* MCAnswer::exec_custom */ LEGACY_EXEC
730+
#ifdef LEGACY_EXEC
731731
Exec_errors MCAnswer::exec_custom(MCExecPoint& ep, const MCString& p_stack, const char *p_type, unsigned int p_count, ...)
732732
{
733733
ep . setstringf("answer %s", p_type);
@@ -761,7 +761,7 @@ Exec_errors MCAnswer::exec_custom(MCExecPoint& ep, const MCString& p_stack, cons
761761

762762
return EE_UNDEFINED;
763763
}
764-
#endif /* MCAnswer::exec_custom */
764+
#endif
765765

766766
void MCAnswer::compile(MCSyntaxFactoryRef ctxt)
767767
{

engine/src/ask.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ void MCAsk::exec_ctxt(class MCExecContext& ctxt)
305305
}
306306
}
307307

308-
#ifdef /* MCAsk::exec_question */ LEGACY_EXEC
308+
#ifdef LEGACY_EXEC
309309
Exec_errors MCAsk::exec_question(MCExecPoint& ep, const char *p_title)
310310
{
311311
Exec_errors t_error = EE_UNDEFINED;
@@ -342,9 +342,9 @@ Exec_errors MCAsk::exec_question(MCExecPoint& ep, const char *p_title)
342342

343343
return t_error;
344344
}
345-
#endif /* MCAsk::exec_question */
345+
#endif
346346

347-
#ifdef /* MCAsk::exec_password */ LEGACY_EXEC
347+
#ifdef LEGACY_EXEC
348348
Exec_errors MCAsk::exec_password(MCExecPoint& ep, const char *p_title)
349349
{
350350
Exec_errors t_error = EE_UNDEFINED;
@@ -381,9 +381,9 @@ Exec_errors MCAsk::exec_password(MCExecPoint& ep, const char *p_title)
381381

382382
return t_error;
383383
}
384-
#endif /* MCAsk::exec_password */
384+
#endif
385385

386-
#ifdef /* MCAsk::exec_file */ LEGACY_EXEC
386+
#ifdef LEGACY_EXEC
387387
Exec_errors MCAsk::exec_file(MCExecPoint& ep, const char *p_title)
388388
{
389389
Exec_errors t_error = EE_UNDEFINED;
@@ -448,9 +448,9 @@ Exec_errors MCAsk::exec_file(MCExecPoint& ep, const char *p_title)
448448

449449
return t_error;
450450
}
451-
#endif /* MCAsk::exec_file */
451+
#endif
452452

453-
#ifdef /* MCAsk::exec_custom */ LEGACY_EXEC
453+
#ifdef LEGACY_EXEC
454454
Exec_errors MCAsk::exec_custom(MCExecPoint& ep, bool& p_cancelled, const MCString& p_stack, const char *p_type, unsigned int p_count, ...)
455455
{
456456
ep . setstringf("ask %s", p_type);
@@ -492,7 +492,7 @@ Exec_errors MCAsk::exec_custom(MCExecPoint& ep, bool& p_cancelled, const MCStrin
492492

493493
return EE_UNDEFINED;
494494
}
495-
#endif /* MCAsk::exec_custom */
495+
#endif
496496

497497
void MCAsk::compile(MCSyntaxFactoryRef ctxt)
498498
{

engine/src/button.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,6 +1640,7 @@ void MCButton::setrect(const MCRectangle &nrect)
16401640
}
16411641
}
16421642

1643+
#ifdef LEGACY_EXEC
16431644
Exec_stat MCButton::getprop_legacy(uint4 parid, Properties which, MCExecPoint& ep, Boolean effective)
16441645
{
16451646
uint2 fheight;
@@ -2537,6 +2538,7 @@ Exec_stat MCButton::setprop_legacy(uint4 parid, Properties p, MCExecPoint &ep, B
25372538
}
25382539
return ES_NORMAL;
25392540
}
2541+
#endif
25402542

25412543
void MCButton::closemenu(Boolean kfocus, Boolean disarm)
25422544
{
@@ -4458,4 +4460,4 @@ IO_stat MCButton::load(IO_handle stream, const char *version)
44584460
}
44594461
}
44604462
return IO_NORMAL;
4461-
}
4463+
}

engine/src/button.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ class MCButton : public MCControl
177177

178178
virtual uint2 gettransient() const;
179179
virtual void setrect(const MCRectangle &nrect);
180-
virtual Exec_stat getprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
181-
virtual Exec_stat setprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
180+
virtual Exec_stat getprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective) { MCAssert(false); }
181+
virtual Exec_stat setprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective) { MCAssert(false); }
182182
virtual void closemenu(Boolean kfocus, Boolean disarm);
183183

184184
// MW-2011-09-20: [[ Collision ]] Compute shape of button - will use mask of icon if possible.

engine/src/capsule.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ bool MCCapsuleProcess(MCCapsuleRef self)
855855

856856
////////////////////////////////////////////////////////////////////////////////
857857

858+
#ifdef LEGACY_EXEC
858859
typedef bool (*MCRecordFieldEncodeCallback)(void *state, MCExecPoint& ep, void* r_encoded_value);
859860
typedef bool (*MCRecordFieldDecodeCallback)(void *state, MCExecPoint& ep, void* encoded_value);
860861

@@ -1200,5 +1201,6 @@ static bool MCCapsuleEnvironmentVersionDecode(void *state, MCExecPoint& ep, void
12001201
ep . copysvalue(t_buffer);
12011202
return true;
12021203
}
1204+
#endif
12031205

12041206
////////////////////////////////////////////////////////////////////////////////

engine/src/card.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,7 @@ void MCCard::timer(MCNameRef mptr, MCParameter *params)
982982
MCObject::timer(mptr, params);
983983
}
984984

985+
#ifdef LEGACY_EXEC
985986
Exec_stat MCCard::getprop_legacy(uint4 parid, Properties which, MCExecPoint& ep, Boolean effective)
986987
{
987988
MCRectangle minrect;
@@ -1245,6 +1246,7 @@ Exec_stat MCCard::setprop_legacy(uint4 parid, Properties which, MCExecPoint &ep,
12451246
}
12461247
return ES_NORMAL;
12471248
}
1249+
#endif
12481250

12491251
Boolean MCCard::del()
12501252
{

engine/src/card.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ class MCCard : public MCObject
7676
virtual Boolean doubledown(uint2 which);
7777
virtual Boolean doubleup(uint2 which);
7878
virtual void timer(MCNameRef mptr, MCParameter *params);
79-
virtual Exec_stat getprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
80-
virtual Exec_stat setprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
79+
virtual Exec_stat getprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective) { MCAssert(false); }
80+
virtual Exec_stat setprop_legacy(uint4 parid, Properties which, MCExecPoint &, Boolean effective) { MCAssert(false); }
8181

8282
virtual Boolean del();
8383
virtual void paste(void);

engine/src/cmds.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ void MCPut::compile(MCSyntaxFactoryRef ctxt)
15381538
MCSyntaxFactoryEndStatement(ctxt);
15391539
}
15401540

1541-
#ifdef /* MCPut::exec_cookie */ LEGACY_EXEC
1541+
#ifdef LEGACY_EXEC
15421542
#if defined(_SERVER)
15431543
bool MCServerSetCookie(const MCString &p_name, const MCString &p_value, uint32_t p_expires, const MCString &p_path, const MCString &p_domain, bool p_secure, bool p_http_only);
15441544
Exec_stat MCPut::exec_cookie(MCExecPoint &ep)
@@ -1616,7 +1616,7 @@ Exec_stat MCPut::exec_cookie(MCExecPoint &ep)
16161616
return ES_ERROR;
16171617
}
16181618
#endif
1619-
#endif /* MCPut::exec_cookie */
1619+
#endif
16201620

16211621
MCQuit::~MCQuit()
16221622
{
@@ -1634,7 +1634,7 @@ Parse_stat MCQuit::parse(MCScriptPoint &sp)
16341634

16351635
void MCQuit::exec_ctxt(MCExecContext& ctxt)
16361636
{
1637-
#ifdef /* MCQuit */ LEGACY_EXEC
1637+
#ifdef LEGACY_EXEC
16381638
// MW-2011-06-22: [[ SERVER ]] Don't send messages in server-mode.
16391639
#ifndef _SERVER
16401640
switch(MCdefaultstackptr->getcard()->message(MCM_shut_down_request))
@@ -1660,7 +1660,7 @@ void MCQuit::exec_ctxt(MCExecContext& ctxt)
16601660
MCtraceabort = True;
16611661
MCtracereturn = True;
16621662
return ES_NORMAL;
1663-
#endif /* MCQuit */
1663+
#endif
16641664

16651665
integer_t t_retcode;
16661666
if (!ctxt . EvalOptionalExprAsInt(retcode, 0, EE_UNDEFINED, t_retcode))
@@ -2149,7 +2149,7 @@ Parse_stat MCSort::parse(MCScriptPoint &sp)
21492149
return PS_NORMAL;
21502150
}
21512151

2152-
#ifdef /* MCSort::sort_container */ LEGACY_EXEC
2152+
#ifdef LEGACY_EXEC
21532153
Exec_stat MCSort::sort_container(MCExecPoint &p_exec_point, Chunk_term p_type, Sort_type p_direction, Sort_type p_form, MCExpression *p_by)
21542154
{
21552155
MCSortnode *t_items;
@@ -2259,7 +2259,7 @@ Exec_stat MCSort::sort_container(MCExecPoint &p_exec_point, Chunk_term p_type, S
22592259
delete t_items;
22602260
return ES_NORMAL;
22612261
}
2262-
#endif /* MCSort::sort_container */
2262+
#endif
22632263

22642264
void MCSort::additem(MCExecContext &ctxt, MCSortnode *items, uint4 &nitems, Sort_type form, MCValueRef p_value, MCExpression *by)
22652265
{

0 commit comments

Comments
 (0)