make hollywooMethod macro usable in hollywoo implementation dsls
This commit is contained in:
@@ -1022,6 +1022,7 @@
|
||||
(,mode ,@body)
|
||||
(otherwise (cc))))
|
||||
|
||||
(defMacroVar avoidDuplicateDefinition true)
|
||||
// Some real magic happens here. This macro defines a method, AND a reader macro
|
||||
// for calling it with skipping and cc passed automatically if cc is an argument.
|
||||
// GOTCHA: DO NOT use (method) directly in this file outside of the above #unless subclass block!!
|
||||
@@ -1053,7 +1054,7 @@
|
||||
(b.callSymbol "b.symbol" [(b.str "null")])
|
||||
])))))]
|
||||
methodCall))
|
||||
(#unless subclass @:keep (method ,nameAndType ,argList ,@body))
|
||||
(#when (or !subclass !avoidDuplicateDefinition) @:keep (method ,nameAndType ,argList ,@body))
|
||||
}))
|
||||
|
||||
(hollywooMethod :Void restorePlayMode [:Continuation cc]
|
||||
@@ -1612,4 +1613,7 @@
|
||||
creditsTSV
|
||||
(makeCC
|
||||
(stopSong skipping cc))
|
||||
(director.getSongLength (dictGet songs songKey))))
|
||||
(director.getSongLength (dictGet songs songKey))))
|
||||
|
||||
// This redefinition allows you to call (hollywooMethod) in your hollywoo implementation dsls and movie scripts:
|
||||
(defMacroVar avoidDuplicateDefinition false)
|
Reference in New Issue
Block a user