Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Issue 12226130: [nacltoons] Add initial frontend and physics game scenes. (Closed)

Created:
7 years, 10 months ago by Sam Clegg
Modified:
7 years, 10 months ago
Reviewers:
noelallen1, binji
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

[nacltoons] Add initial frontend and physics game scenes. The only resource we are now using from the cococs sample is the blocks.png image file. BUG=None Committed: https://code.google.com/p/nativeclient-sdk/source/detail?r=1504

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 24

Patch Set 4 : fix style nits #

Total comments: 23

Patch Set 5 : fix nits #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+324 lines, -61 lines) Patch
M PRESUBMIT.py View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
A nacltoons/data/res/blocks.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M nacltoons/game.mk View 1 chunk +2 lines, -0 lines 0 comments Download
M nacltoons/src/AppDelegate.h View 1 2 3 4 2 chunks +5 lines, -6 lines 0 comments Download
M nacltoons/src/AppDelegate.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
A nacltoons/src/FrontEnd.h View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
A nacltoons/src/FrontEnd.cc View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
M nacltoons/src/GameplayScene.h View 1 2 3 4 1 chunk +28 lines, -15 lines 0 comments Download
M nacltoons/src/GameplayScene.cc View 1 2 3 4 1 chunk +53 lines, -29 lines 0 comments Download
A nacltoons/src/PhysicsLayer.h View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
A nacltoons/src/PhysicsLayer.cc View 1 2 3 4 1 chunk +119 lines, -0 lines 0 comments Download
M nacltoons/src/main.cc View 1 2 3 4 3 chunks +4 lines, -7 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Sam Clegg
7 years, 10 months ago (2013-02-12 22:40:43 UTC) #1
binji
lgtm style issues: do we want to follow Cocos style or Google style? If Google ...
7 years, 10 months ago (2013-02-12 22:51:53 UTC) #2
Sam Clegg
On 2013/02/12 22:51:53, binji wrote: > lgtm > > style issues: do we want to ...
7 years, 10 months ago (2013-02-12 22:55:09 UTC) #3
Sam Clegg
https://codereview.chromium.org/12226130/diff/6001/nacltoons/src/AppDelegate.cc File nacltoons/src/AppDelegate.cc (right): https://codereview.chromium.org/12226130/diff/6001/nacltoons/src/AppDelegate.cc#newcode1 nacltoons/src/AppDelegate.cc:1: // Copyright (c) 2013 The Native Client Authors. All ...
7 years, 10 months ago (2013-02-12 23:07:38 UTC) #4
binji
don't forget filenames should be lower_case not MixedCase https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.h File nacltoons/src/FrontEnd.h (right): https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.h#newcode4 nacltoons/src/FrontEnd.h:4: #ifndef ...
7 years, 10 months ago (2013-02-12 23:13:25 UTC) #5
Sam Clegg
https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.h File nacltoons/src/FrontEnd.h (right): https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.h#newcode4 nacltoons/src/FrontEnd.h:4: #ifndef FRONTEND_H On 2013/02/12 23:13:25, binji wrote: > FRONTEND_H_ ...
7 years, 10 months ago (2013-02-12 23:22:36 UTC) #6
binji
This got lost in the previous comments: don't forget filenames should be lower_case not MixedCase ...
7 years, 10 months ago (2013-02-12 23:25:34 UTC) #7
noelallen1
7 years, 10 months ago (2013-02-12 23:35:52 UTC) #8
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.cc
File nacltoons/src/FrontEnd.cc (right):

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.cc...
nacltoons/src/FrontEnd.cc:9: CCScene* FrontEnd::scene() {
CreateScene() - otherwise this looks like an accessor, and I wouldn't know it
was creating again and again.

Could you add comments, so we know the use theory?

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.cc...
nacltoons/src/FrontEnd.cc:11: CCLayer* frontend = FrontEnd::create();
Are you instantiating something then throwing it away?

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.cc...
nacltoons/src/FrontEnd.cc:13: return scene;
Is a Layer a collection of Scenes or a Scene a collection of layers?

You are adding FrontEnd a Layer to the scene.

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.h
File nacltoons/src/FrontEnd.h (right):

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.h#...
nacltoons/src/FrontEnd.h:12: * Front end scene and layer.
Don't self reference in your doc.  Tell us what this object is supposed to do.

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.h#...
nacltoons/src/FrontEnd.h:18: CREATE_FUNC(FrontEnd);
What is this macro for?

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/FrontEnd.h#...
nacltoons/src/FrontEnd.h:27: #endif // !FRONTEND_H
!FRONTEND_H, did you mean to add the !
I think the standard check is:
#endif  // NAME
with a double space between endif and single space after //
There used to be a presubmit check for this I think.

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/GameplaySce...
File nacltoons/src/GameplayScene.cc (right):

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/GameplaySce...
nacltoons/src/GameplayScene.cc:7: #define PHYSICS_TAG 101
Are these IDs global?  Meaning we don't when them to ever collide?  Should you
use a separate .h with enums?

Maybe provide some allocation pool for LUA instantiated objects that need IDs?

Otherwise "const int" can be evaluated by the debugger, #define can not.

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/GameplaySce...
nacltoons/src/GameplayScene.cc:13: return Gameplay::create();
Is there a reason that "scene" in this one returns create, while "scene" in
front end does the create work?

https://codereview.chromium.org/12226130/diff/10001/nacltoons/src/GameplaySce...
nacltoons/src/GameplayScene.cc:37: ((Gameplay*)getParent())->restart();
static_cast<Gameplay*>(getParent())->

Powered by Google App Engine
This is Rietveld 408576698