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

Support for phone resolutions #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ImperialPenguin
Copy link
Contributor

I'm new to git and didn't realize that i couldn't choose which commits that I wanted to share, so there is probably some stuff in here that you don't want. Having to make a new branch for every thing I do is going to take some getting used to. Letting us choose which commits to send pull requests for would make so much more sense (am I missing a way to do that?)
Anyhow, the other changes are compiling cocos2d as a static lib, both because I couldn't get the shared lib to load on my pre and because I'm not sure HP allows apps on their store that use non-whitelisted .so files. I'm also using the default build of libJPEG that comes with the PDK and that doesn't have a jpeg_mem_src function, so I hacked a replacement in. This problem did not present itself until I build cocos2d as a static library, so you might want to confirm that jpegs are handled correctly if you haven't already. The tests all use PNGs.
The only other significant change is that I created a Makefile with paths for mac users.

@Glikeme
Copy link
Contributor

Glikeme commented Jun 7, 2012

Thank you very much. I made ​​changes.

@ImperialPenguin
Copy link
Contributor Author

No problem. I post on the Palm Developer forums as HemiMG. The resolution fix solved most of my problems, the touch events now respond properly and, of course, the display isn't so tiny. There are still a few things I want to work on before taking a look at CocosDenshion. If any of it is relevant, I'll pass it along.

@webos-fan
Copy link

Hi,

Thanks for your input to WebOS port.

Please keep Cocos2d-x library as shared library.
On device,if you are running your Cocos2d-x executable from command line
then cococs2d-x library should be in /usr/lib/ folder and if you are
running Cocos2d-x executbale from application launcher,then Cocos2d-x
library should in local folder as your executable.

HP should not prevent putting Cococ2d-x library in local folder along with
your binary.

Also from your size function,you hardcoded (1078,787) size,please read size
using PDK fucntion and then return appropriate size.

Regards,
WebOS Fan.

On Wed, Jun 6, 2012 at 11:09 PM, ImperialPenguin <
[email protected]

wrote:

I'm new to git and didn't realize that i couldn't choose which commits
that I wanted to share, so there is probably some stuff in here that you
don't want. Having to make a new branch for every thing I do is going to
take some getting used to. Letting us choose which commits to send pull
requests for would make so much more sense (am I missing a way to do that?)
Anyhow, the other changes are compiling cocos2d as a static lib, both
because I couldn't get the shared lib to load on my pre and because I'm not
sure HP allows apps on their store that use non-whitelisted .so files. I'm
also using the default build of libJPEG that comes with the PDK and that
doesn't have a jpeg_mem_src function, so I hacked a replacement in. This
problem did not present itself until I build cocos2d as a static library,
so you might want to confirm that jpegs are handled correctly if you
haven't already. The tests all use PNGs.
The only other significant change is that I created a Makefile with paths
for mac users.

You can merge this Pull Request by running:

git pull https://github.com/ImperialPenguin/cocos2dx-webos master

Or you can view, comment on it, or merge it online at:

#1

-- Commit Summary --

  • Added WebOS Makefiles for Mac
  • Fixed jpeg_mem_src problem on WebOS
  • Support for all WebOS resolutions
  • Now builds cocos2d as a static library on WebOS
  • Deleted libcocos2d.so

-- File Changes --

A HelloWorld/WebOS/Makefile.mac (42)
A HelloWorld/WebOS/Makefile.win (0)
M cocos2dx/platform/CCImage.cpp (15)
M cocos2dx/platform/WebOS/CCEGLView_WebOS.cpp (8)
A cocos2dx/proj.webos/Makefile.mac (130)
R cocos2dx/proj.webos/Makefile.win (15)
A tests/test.webos/Makefile.mac (135)
R tests/test.webos/Makefile.win (16)

-- Patch Links --

https://github.com/cocos2d-x/cocos2dx-webos/pull/1.patch
https://github.com/cocos2d-x/cocos2dx-webos/pull/1.diff


Reply to this email directly or view it on GitHub:
#1

@ImperialPenguin
Copy link
Contributor Author

For some reason, it is loading okay as a shared library now, so I can go back to those Makefiles. I'm not sure where I hardcoded anything as 1024x768? I am using a Palm Pre and don't own a Touchpad, so I'm not sure why I would do that. There was a part where I removed the hardcoding of that value and replaced it with PDK values. Did that commit not come through properly?
It looks like I'm going to have to change it again anyway, right now landscape orientation isn't working on my Pre and hacking support for it in has already required a change to getSize.

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.

3 participants