Skip to content

Commit

Permalink
Another refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
t-lichtenstein committed Aug 2, 2017
1 parent dbc3777 commit cfb5d42
Show file tree
Hide file tree
Showing 32 changed files with 38 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
event handling
event-handling
calculateCurrentDeltaFor: anEvent from: aPosition at: aTimestamp until: aFutureTimestamp

^ (anEvent position - aPosition) * (aTimestamp - self lastEvent timeStamp) // (aFutureTimestamp - self lastEvent timeStamp).
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
event handling
event-handling
checkEOF

^ (self tapeStream isNil or:[self tapeStream atEnd])
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
checkTape
"See if this tape was already converted to the new format"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
convertV0Tape: anArray
"Convert the tape into the new format"
| lastKey |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
createFileChooser

| fileChooser |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
event handling
event-handling
deltaTimeFor: anEvent until: aTimestamp.

self deltaTime ifNil: [self deltaTime: (aTimestamp - anEvent timeStamp)].
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
directoryChooser

| dirChooser |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
events-processing
event-processing
handleListenEvent: anEvent

"Record the given event"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pause/resume
pause-resume
initializePlayHand

self playHand: (HandMorphForReplay new recorder: self).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
event handling
event-handling
nextEventToPlay

| nextEvent now nextTime lastP delta |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
event handling
event-handling
objectTrackingEvents

^ nil
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pause/resume
pause-resume
pauseIn: aWorld

self recorderState = #play
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pause/resume
pause-resume
pausePlayingTapeIn: aWorld

self recorderState: #suspendedPlay.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pause/resume
pause-resume
pauseRecordingTape

self recorderState: #suspendedRecord.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
readFrom: aStream
"Private"
| header |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
readFromV0: aStream
^Array streamContents:[:tStream | | evt line t lineStream |
[aStream atEnd] whileFalse:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
readFromV1: aStream
^Array streamContents:[:tStream |
[aStream atEnd] whileFalse:[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
readTape: aMultiByteFileStream
self writeCheck.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
readTape
| file |
self saveStateIn: (self savedObjects).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ recreateStateFrom: aCollection

ActiveWorld submorphsDo: [:object | (self hasEqualHashWith: object)
ifFalse: [object delete]].
aCollection do: [ :object | ActiveWorld addMorph: (object veryDeepCopy)].
aCollection do: [ :object | ActiveWorld addMorph: (object veryDeepCopy)].

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pause/resume
pause-resume
resume

self pauseTotalTime: self pauseTotalTime + (Time millisecondClockValue - self pauseStartTime).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pause/resume
pause-resume
resumePlay

self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pause/resume
pause-resume
resumeRecord

self recHand: (ActiveWorld activeHand ifNil: [ActiveWorld primaryHand]).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
event handling
event-handling
synchronize

self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
visualization
visualizeMouseEvent: aMouseEvent

| aMouseCircle |
| aMouseCircle aColor|
aMouseCircle := DRCMouseCircle new.

aMouseEvent blueButtonPressed ifTrue: [aMouseCircle showAt: aMouseEvent position with: Color blue].
aMouseEvent redButtonPressed ifTrue: [aMouseCircle showAt: aMouseEvent position with: Color red].
aMouseEvent yellowButtonPressed ifTrue: [aMouseCircle showAt: aMouseEvent position with: Color yellow].
aColor := nil.
aMouseEvent blueButtonPressed ifTrue: [aColor := Color blue.].
aMouseEvent redButtonPressed ifTrue: [aColor := Color red.].
aMouseEvent yellowButtonPressed ifTrue: [aColor := Color yellow].
aMouseCircle showAt: aMouseEvent position with: aColor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
writeCheck
(saved not and: [self confirm: 'The current tape has not been saved.
Would you like to do so now?']) ifTrue:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
writeFileNamed: fileName

| directory file delta|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
writeTape: fileName
| name |
name := self writeFileNamed: fileName.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileIn/Out
fileIn-Out
writeTape

[^self writeTape: (UIManager default request: 'Tape to write'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"recorderState:" : "tl 7/20/2017 13:21",
"recordingTool" : "tl 6/8/2017 09:43",
"recordingTool:" : "tl 6/8/2017 09:43",
"recreateStateFrom:" : "tl 8/2/2017 15:43",
"recreateStateFrom:" : "tl 8/2/2017 15:46",
"resetSavedState" : "fs 7/11/2017 21:22",
"resume" : "tl 8/2/2017 00:13",
"resumePlay" : "tl 8/2/2017 00:23",
Expand All @@ -103,7 +103,7 @@
"time" : "tl 5/30/2017 16:43",
"time:" : "tl 5/30/2017 16:43",
"toggleIsSaving" : "tl 8/2/2017 14:37",
"visualizeMouseEvent:" : "CL 6/15/2017 20:48",
"visualizeMouseEvent:" : "tl 8/2/2017 15:51",
"wantsSteps" : "CL 7/22/2017 16:17",
"writeCheck" : "tl 6/29/2017 14:17",
"writeFileNamed:" : "CL 7/10/2017 15:35",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open
open

^ ToolBuilder open: self.
^ ToolBuilder open: self
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
"open" : "fk 5/13/2017 13:28" },
"open" : "tl 8/2/2017 15:52" },
"instance" : {
"actionResetScript" : "tl 6/29/2017 15:44",
"actionSaveCode" : "tl 6/29/2017 14:26",
Expand Down

0 comments on commit cfb5d42

Please sign in to comment.