Building with Marmalade SDK

i have the same problem , with running my game in landscape but i couldn’t do the same , i still have the problem here is my code :

CCDirector pDirector = CCDirector::sharedDirector;
pDirector~~>setOpenGLView);
pDirector~~>setProjection;
float w, h;
w = 1136;
h =640;
float angle = s3eSurfaceGetInt
90.0f;
UpdateProjection(angle,w, h); //its same as above,

CCEGLView::sharedOpenGLView()>setDesignResolutionSize;
// turn on display FPS
pDirector
>setDisplayStats(true);

// set FPS. the default value is 1.0/60 if you don’t call this
pDirector~~>setAnimationInterval;
// create a scene. it’s an autorelease object
CCScene *pScene = PlayScene::scene;
// run
pDirector~~>runWithScene(pScene);

return true;

ICF FILE:

[S3E]
MemSize=[s3e]DispAreaQ + 60331648

#autorotate

DispFixRot=“FixedLandscape”
IOSDispScaleFactor =200

[GL]
AllowNegativeUniformLocation=1

Hi Amir,

Your code should work! what version of Marmalade are you using?

Cheers!

Hi Oscar

well its not working right ,
marmalade 6.1

i attached result image

here is coordinates i gave from screen after convertoGl

tested on iphone5

Hi Amir,

I’m using Marmalade 6.1.2 I don’t know if there is some issue with DispFixRot stuff in Marmalade 6.1.

Have you tried to upgrade to 6.1.2? Right now yo can download 6.2 version… but I’m having issues when getting the width and height from
s3eSurfaceGetInt() method!

Cheers

Im going to download it now , i’ll post here result i hope it will make it right ,i’ve been busy with this problem since three days ago , it’s really annoying ,
with which version you have issue with s3eSurfaceGetInt() ?

Marmalade 6.2

it seems that it gets better! but it still got issues , i didn’t use virtualres by the way
what do you think?

here is the code:

#include “AppDelegate.h”
#include “PlayScene.h”

USING_NS_CC;

AppDelegate::AppDelegate() {

}

AppDelegate::~AppDelegate()
{
}

void AppDelegate::UpdateProjection(float angle, float& w, float& h) {

if (IwGLGetInt(IW_GL_VIRTUAL_WIDTH) >= 0) {
w = (float)IwGLGetInt(IW_GL_VIRTUAL_WIDTH);
h = (float)IwGLGetInt(IW_GL_VIRTUAL_HEIGHT);
}
else {
w = (float)s3eSurfaceGetInt(S3E_SURFACE_WIDTH);
h = (float)s3eSurfaceGetInt(S3E_SURFACE_HEIGHT);
}
if ((angle 90.0f) || (angle 270.0f)) {
// Swap w and h
float oh = h;
h = w;
w = oh;
}
CCEGLView::sharedOpenGLView()>setFrameSize;
CCEGLView::sharedOpenGLView
>setViewPortInPoints;
kmGLMatrixMode;
kmGLLoadIdentity;
kmGLRotatef, 0.0f, 0.0f, 1.0f );
kmMat4 orthoMatrix;
kmMat4OrthographicProjection;
kmGLMultMatrix;
kmGLMatrixMode;
kmGLLoadIdentity;
}
bool AppDelegate::applicationDidFinishLaunching {
// initialize director
CCDirector pDirector = CCDirector::sharedDirector;
pDirector~~>setOpenGLView);
pDirector~~>setProjection;
float w, h;
w = 1136;
h =640;
float angle = s3eSurfaceGetInt
90.0f;
UpdateProjection;
//pDirector~~>setContentScaleFactor;
CCEGLView::sharedOpenGLView~~>setDesignResolutionSize;
// turn on display FPS
pDirector~~>setDisplayStats;
// set FPS. the default value is 1.0/60 if you don’t call this
pDirector~~>setAnimationInterval(1.0 / 60);

// create a scene. it’s an autorelease object
CCScene *pScene = PlayScene::scene();

// run
pDirector->runWithScene(pScene);

return true;
}

// This function will be called when the app is inactive. When comes a phone call,it’s be invoked too
void AppDelegate::applicationDidEnterBackground() {
CCDirector::sharedDirector()->stopAnimation();

// if you use SimpleAudioEngine, it must be pause
// SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
}

// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground() {
CCDirector::sharedDirector()->startAnimation();

// if you use SimpleAudioEngine, it must resume here
// SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
}

Thanks

Hi ,

Could anyone please post a working code with iphone 5 landscape mode? (Cocos2d-x + marmalade)

after a week i still have same problem

Thanks