Advertisement
PT_

Untitled

PT_
Jun 26th, 2017
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. #include <stdbool.h>
  2. #include <stddef.h>
  3. #include <stdint.h>
  4. #include <tice.h>
  5.  
  6. #include <math.h>
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include <string.h>
  10.  
  11. #include <decompress.h>
  12. #include <graphx.h>
  13.  
  14. /* Include the graphics file */
  15. #include "gfx/all_gfx.h"
  16.  
  17. /* Put all your code here */
  18. void main(void) {
  19. /* Define our sprite */
  20. gfx_image_t *IntroA;
  21.  
  22. /* This is just here so that the malloc function is compiled into the binary */
  23. malloc(0);
  24.  
  25. /* Allocate space for the decompressed sprite */
  26. IntroA = gfx_MallocSprite(220, 240);
  27.  
  28. /* Initialize the 8bpp graphics */
  29. gfx_Begin(gfx_8bpp);
  30.  
  31. /* Set up the palette */
  32. gfx_SetPalette(all_gfx_pal, sizeof all_gfx_pal, 0);
  33. gfx_FillScreen(0);
  34.  
  35. /* Decompress the sprite */
  36. dzx7_Standard(IntroA_compressed, IntroA); // or dzx7_Turbo
  37.  
  38. /* Draw the decompressed sprite */
  39. gfx_Sprite(IntroA, (320 - 220) / 2, (240 - 240) / 2
  40.  
  41. /* Decompress the sprite */
  42. dzx7_Standard(IntroB_compressed, IntroB); // or dzx7_Turbo
  43.  
  44. /* Draw the decompressed sprite */
  45. gfx_Sprite(IntroB, (320 - 220) / 2, (240 - 240) / 2);
  46.  
  47. /* Wait for a key */
  48. while (!os_GetCSC());
  49.  
  50. /* Please, don't forget to free the apple image memory :) */
  51. free(IntroA);
  52.  
  53. gfx_End();
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement