Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/support pause #44

Merged
merged 10 commits into from
May 12, 2020
Merged

Feature/support pause #44

merged 10 commits into from
May 12, 2020

Conversation

neophob
Copy link
Owner

@neophob neophob commented May 11, 2020

enhance ui:

  • support game pause
  • add option to load specific game part
  • stop current game
  • load and save current game
  • update game log level

@neophob neophob requested a review from pfiaux May 11, 2020 19:50
@@ -273,7 +273,7 @@ func (video *Video) PlaySound(resNum, freq, vol, channel int) {
return
}

logger.Info("playSound resNum %d", resNum)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

less spam

func (c Canvas) fillRect(x, y, width, height int) {
c.context2d.Call("fillRect", x, y, width, height)
}

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

red diff is a good diff!

wasm/index.html Outdated
//
<a id="badge" href="#" onclick="shutdown()">STOP</a>
<a id="badge" href="#" onclick="handleKeyEvent('l', 76, 'keydown'); setTimeout(() => handleKeyEvent('l', 76, 'keyup'), 50);">LOAD</a>
<a id="badge" href="#" onclick="handleKeyEvent('s', 83, 'keydown'); setTimeout(() => handleKeyEvent('s', 83, 'keyup'), 50);">SAVE</a>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #45

wasm/index.html Outdated Show resolved Hide resolved
wasm/engine.go Show resolved Hide resolved
@neophob neophob merged commit 03a2832 into master May 12, 2020
@neophob neophob deleted the feature/supportPause branch May 12, 2020 13:44
<p>
<a class="badge" href="#" onclick="shutdown()">STOP</a>
<a class="badge" href="#" onclick="handleKeyEvent('l', 76, 'keydown'); setTimeout(() => handleKeyEvent('l', 76, 'keyup'), 50);">LOAD</a>
<a class="badge" href="#" onclick="handleKeyEvent('s', 83, 'keydown'); setTimeout(() => handleKeyEvent('s', 83, 'keyup'), 50);">SAVE</a>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor magic numbers used for the timeout

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah should be fixed with #45 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants