sandor_27

Corona sdk [cracked] download _ crack

Jun 13th, 2013
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.20 KB | None | 0 0
  1. Corona sdk [cracked] download
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9. http://ryushare.com/gcaqdfgv9eos/Corona_sdk_%5Bcracked%5D_download_.iso
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. With Corona, you have 3 options:
  26.  
  27. Corona SDK Starter lets you build and publish your apps for FREE.
  28. Corona SDK Pro adds advanced features and our daily builds.
  29. Corona Enterprise lets you use any native library and gives you ultimate flexibility.
  30.  
  31. Take a look at the subscription comparison chart and read on to learn more about the core Corona features and why it is the best solution for building great 2D apps and games.
  32.  
  33. Corona sdk [cracked] download
  34.  
  35. Corona dramatically boosts your productivity. Thanks to our elegant APIs, tasks like animating objects, creating UI widgets or enabling physics take only a few lines of code.
  36.  
  37. Changes are instantly viewable in the Corona Simulator and building to your own mobile device is a breeze.
  38.  
  39. With Corona you write less code. It’s that simple.
  40.  
  41. But you still have access to a powerful OpenGL-based platform with features like built-in physics, Facebook Connect, maps, push notifications,
  42. in-app purchases and more.
  43.  
  44. Read on to see how Corona compares to the alternatives and lets you build cross-platform mobile apps with a fraction of the code.
  45. Loading an image in Corona…
  46. Corona sdk [cracked] download
  47. is this easy. Here’s the entire program:
  48. 1 2
  49.  
  50. --Display "myImage.png"
  51. display.newImage("myImage.png")';
  52.  
  53. view raw gistfile1.lua This Gist brought to you by GitHub.
  54. Compared to…
  55. The equivalent program in Objective-C:
  56. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
  57.  
  58. // Display "myImage.png"Corona sdk [cracked] download
  59.  
  60. // ----------------------------------------------------------------------------
  61. // OpenGLESTextureAppDelegate.m
  62. // ----------------------------------------------------------------------------
  63.  
  64. #import "OpenGLESTextureAppDelegate.h"
  65. #import "EAGLView.h"
  66. #import "OpenGLESTextureViewController.h"
  67.  
  68. @implementation OpenGLESTextureAppDelegate
  69.  
  70. @synthesize window=_window;
  71.  
  72. @synthesize viewController=_viewController;
  73.  
  74. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  75. {
  76. // Override point for customization after application launch.
  77. self.window.rootViewController = self.viewController;
  78. return YES;
  79. }
  80.  
  81. - (void)applicationDidBecomeActive:(UIApplication *)application
  82. {
  83. /*
  84. Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
  85. */
  86. [self.viewController drawFrame];
  87. }
  88.  
  89. - (void)dealloc
  90. {
  91. [_window release];
  92. [_viewController release];
  93. [super dealloc];
  94. }
  95.  
  96. @end
  97.  
  98.  
  99. // ----------------------------------------------------------------------------
  100. // EAGLView.m
  101. // ----------------------------------------------------------------------------
  102.  
  103. #import <QuartzCore/QuartzCore.h>
  104. #import "EAGLView.h"
  105.  
  106. @interface EAGLView (PrivateMethods)
  107. - (void)createFramebuffer;
  108. - (void)deleteFramebuffer;
  109. @end
  110.  
  111. @implementation EAGLView
  112.  
  113. @synthesize context;
  114.  
  115. // You must implement this method
  116. + (Class)layerClass
  117. {
  118. return [CAEAGLLayer class];
  119. }
  120.  
  121. //The EAGL view is stored in the nib file. When it\'s unarchived it\'s sent -initWithCoder:.
  122. - (id)initWithCoder:(NSCoder*)coder
  123. {
  124. self = [super initWithCoder:coder];
  125. if (self) {
  126. CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
  127. eaglLayer.opaque = TRUE;
  128. eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
  129. [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking,
  130. kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,
  131. nil];
  132. }
  133. return self;
  134. }
  135.  
  136. - (void)dealloc
  137. {
  138. [self deleteFramebuffer];
  139. [context release];
  140. [super dealloc];
  141. }
  142.  
  143. - (void)setContext:(EAGLContext *)newContext
  144. {
  145. if (context != newContext) {
  146. [self deleteFramebuffer];
  147. [context release];
  148. context = [newContext retain];
  149. [EAGLContext setCurrentContext:nil];
  150. }
  151. }
  152.  
  153. - (void)createFramebuffer
  154. {
  155. if (context && !defaultFramebuffer) {
  156. [EAGLContext setCurrentContext:context];
  157. // Create default framebuffer object.
  158. glGenFramebuffers(1, &defaultFramebuffer);
  159. glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
  160. // Create color render buffer and allocate backing store.
  161. glGenRenderbuffers(1, &colorRenderbuffer);
  162. glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
  163. [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer *)self.layer];
  164. glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &framebufferWidth);
  165. glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &framebufferHeight);
  166. glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer);
  167. if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
  168. NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
  169. }
  170. }
  171.  
  172. - (void)deleteFramebuffer
  173. {
  174. if (context) {
  175. [EAGLContext setCurrentContext:context];
  176. if (defaultFramebuffer) {
  177. glDeleteFramebuffers(1, &defaultFramebuffer);
  178. defaultFramebuffer = 0;
  179. }
  180. if (colorRenderbuffer) {
  181. glDeleteRenderbuffers(1, &colorRenderbuffer);
  182. colorRenderbuffer = 0;
  183. }
  184. }
  185. }
  186.  
  187. - (void)setFramebuffer
  188. {
  189. if (context) {
  190. [EAGLContext setCurrentContext:context];
  191. if (!defaultFramebuffer)
  192. [self createFramebuffer];
  193. glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
  194. glViewport(0, 0, framebufferWidth, framebufferHeight);
  195. }
  196. }
  197.  
  198. - (BOOL)presentFramebuffer
  199. {
  200. BOOL success = FALSE;
  201. if (context) {
  202. [EAGLContext setCurrentContext:context];
  203. glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
  204. success = [context presentRenderbuffer:GL_RENDERBUFFER];
  205. }
  206. return success;
  207. }
  208.  
  209. - (void)layoutSubviews
  210. {
  211. // The framebuffer will be re-created at the beginning of the next setFramebuffer method call.
  212. [self deleteFramebuffer];
  213. }
  214.  
  215. @end
  216.  
  217.  
  218. // ----------------------------------------------------------------------------
  219. // OpenGLESTextureViewController.m
  220. // ----------------------------------------------------------------------------
  221.  
  222. #import <QuartzCore/QuartzCore.h>
  223. #import "OpenGLESTextureViewController.h"
  224. #import "EAGLView.h"
  225.  
  226. @interface OpenGLESTextureViewController ()
  227. @property (nonatomic, retain) EAGLContext *context;
  228. @property (nonatomic, assign) CADisplayLink *displayLink;
  229. - (void) loadTexture;
  230. @end
  231.  
  232. @implementation OpenGLESTextureViewController
  233.  
  234. @synthesize animating, context, displayLink;
  235.  
  236. - (void)awakeFromNib
  237. {
  238. EAGLContext *aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];
  239. if (!aContext)
  240. NSLog(@"Failed to create ES context");
  241. else if (![EAGLContext setCurrentContext:aContext])
  242. NSLog(@"Failed to set ES context current");
  243. self.context = aContext;
  244. [aContext release];
  245. [(EAGLView *)self.view setContext:context];
  246. [(EAGLView *)self.view setFramebuffer];
  247. [self loadTexture];
  248.  
  249. self.displayLink = nil;
  250. }
  251.  
  252. - (void) loadTexture
  253. {
  254. glEnable(GL_TEXTURE_2D);
  255. glEnable(GL_BLEND);
  256. glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  257.  
  258. glGenTextures(1, &textureID);
  259. glBindTexture(GL_TEXTURE_2D, textureID);
  260. glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
  261. glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
  262. NSString *path = [[NSBundle mainBundle] pathForResource:@"myImage" ofType:@"png"];
  263. NSData *texData = [[NSData alloc] initWithContentsOfFile:path];
  264. UIImage *image = [[UIImage alloc] initWithData:texData];
  265. GLuint width = CGImageGetWidth(image.CGImage);
  266. GLuint height = CGImageGetHeight(image.CGImage);
  267. CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
  268. void *imageData = malloc( height * width * 4 );
  269. CGContextRef image_context = CGBitmapContextCreate( imageData, width, height, 8, 4 * width, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big );
  270. CGColorSpaceRelease( colorSpace );
  271. CGContextClearRect( image_context, CGRectMake( 0, 0, width, height ) );
  272. CGContextTranslateCTM( image_context, 0, height - height );
  273. CGContextDrawImage( image_context, CGRectMake( 0, 0, width, height ), image.CGImage );
  274. glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, imageData);
  275. CGContextRelease(image_context);
  276. free(imageData);
  277. [image release];
  278. [texData release];
  279.  
  280. }
  281.  
  282. - (void)dealloc
  283. {
  284. glDeleteTextures(1, &textureID);
  285. // Tear down context.
  286. if ([EAGLContext currentContext] == context)
  287. [EAGLContext setCurrentContext:nil];
  288. [context release];
  289. [super dealloc];
  290. }
  291.  
  292. - (void)viewDidUnload
  293. {
  294. [super viewDidUnload];
  295. // Tear down context.
  296. if ([EAGLContext currentContext] == context)
  297. [EAGLContext setCurrentContext:nil];
  298. self.context = nil;
  299. }
  300.  
  301. - (void)drawFrame
  302. {
  303. [(EAGLView *)self.view setFramebuffer];
  304. // Replace the implementation of this method to do your own custom drawing.
  305. static const GLfloat squareVertices[] = {
  306. -0.5f, -0.33f,
  307. 0.5f, -0.33f,
  308. -0.5f, 0.33f,
  309. 0.5f, 0.33f,
  310. };
  311. static const GLfloat texCoords[] = {
  312. 0.0, 1.0,
  313. 1.0, 1.0,
  314. 0.0, 0.0,
  315. 1.0, 0.0
  316. };
  317. glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
  318. glClear(GL_COLOR_BUFFER_BIT);
  319. glMatrixMode(GL_PROJECTION);
  320. glLoadIdentity();
  321. glMatrixMode(GL_MODELVIEW);
  322. glLoadIdentity();
  323. glVertexPointer(2, GL_FLOAT, 0, squareVertices);
  324. glEnableClientState(GL_VERTEX_ARRAY);
  325. glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
  326. glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  327. glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
  328. [(EAGLView *)self.view presentFramebuffer];
  329. }
  330.  
  331. @end';
  332.  
  333. view raw gistfile1.m This Gist brought to you by GitHub.
  334. The equivalent program in Java:
  335. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
  336.  
  337. /** Display "myImage.png" **/
  338. package net.obviam.opengl;
  339.  
  340. import java.nio.ByteBuffer;
  341. import java.nio.ByteOrder;
  342. import java.nio.FloatBuffer;
  343.  
  344. import javax.microedition.khronos.opengles.GL10;
  345.  
  346. import android.content.Context;
  347. import android.graphics.Bitmap;
  348. import android.graphics.BitmapFactory;
  349. import android.opengl.GLUtils;
  350.  
  351. public class Square {
  352. private FloatBuffer vertexBuffer; // buffer holding the vertices
  353. private float vertices[] = {
  354. -1.0f, -1.0f, 0.0f, // V1 - bottom left
  355. -1.0f, 1.0f, 0.0f, // V2 - top left
  356. 1.0f, -1.0f, 0.0f, // V3 - bottom right
  357. 1.0f, 1.0f, 0.0f // V4 - top right
  358. };
  359.  
  360. private FloatBuffer textureBuffer; // buffer holding the texture coordinates
  361. private float texture[] = {
  362. // Mapping coordinates for the vertices
  363. 0.0f, 1.0f, // top left (V2)
  364. 0.0f, 0.0f, // bottom left (V1)
  365. 1.0f, 1.0f, // top right (V4)
  366. 1.0f, 0.0f // bottom right (V3)
  367. };
  368. /** The texture pointer */
  369. private int[] textures = new int[1];
  370.  
  371. public Square() {
  372. // a float has 4 bytes so we allocate for each coordinate 4 bytes
  373. ByteBuffer byteBuffer = ByteBuffer.allocateDirect(vertices.length * 4);
  374. byteBuffer.order(ByteOrder.nativeOrder());
  375. // allocates the memory from the byte buffer
  376. vertexBuffer = byteBuffer.asFloatBuffer();
  377. // fill the vertexBuffer with the vertices
  378. vertexBuffer.put(vertices);
  379. // set the cursor position to the beginning of the buffer
  380. vertexBuffer.position(0);
  381. byteBuffer = ByteBuffer.allocateDirect(texture.length * 4);
  382. byteBuffer.order(ByteOrder.nativeOrder());
  383. textureBuffer = byteBuffer.asFloatBuffer();
  384. textureBuffer.put(texture);
  385. textureBuffer.position(0);
  386. }
  387.  
  388. /** Load the texture for the square */
  389. public void loadGLTexture(GL10 gl, Context context) {
  390. // loading texture
  391. Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(),
  392. R.drawable.android);
  393.  
  394. // generate one texture pointer
  395. gl.glGenTextures(1, textures, 0);
  396. // ...and bind it to our array
  397. gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
  398. // create nearest filtered texture
  399. gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
  400. gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);
  401.  
  402. //Different possible texture parameters, e.g. GL10.GL_CLAMP_TO_EDGE
  403. // gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_REPEAT);
  404. // gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_REPEAT);
  405. // Use Android GLUtils to specify a two-dimensional texture image from our bitmap
  406. GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
  407. // Clean up
  408. bitmap.recycle();
  409. }
  410. /** The draw method for the square with the GL context */
  411. public void draw(GL10 gl) {
  412. // bind the previously generated texture
  413. gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
  414. // Point to our buffers
  415. gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
  416. gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
  417. // Set the face rotation
  418. gl.glFrontFace(GL10.GL_CW);
  419. // Point to our vertex buffer
  420. gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
  421. gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer);
  422. // Draw the vertices as triangle strip
  423. gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, vertices.length / 3);
  424.  
  425. //Disable the client state before leaving
  426. gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
  427. gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
  428. }
  429. }
  430.  
  431. view raw gistfile1.java This Gist brought to you by GitHub.
Add Comment
Please, Sign In to add comment