Advertisement
Guest User

COBOL code

a guest
Jan 18th, 2024
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
COBOL 1.47 KB | None | 0 0
  1.        identification division.
  2.        program-id. game-main.
  3.  
  4.        data division.
  5.        working-storage section.
  6.  
  7.        copy rl-keys.
  8.        copy rl-bool.
  9.        copy rl-def.
  10.  
  11.        01 is-closing pic 9 value 0.
  12.        
  13.        01 w-width pic 999 value 800 is external.
  14.        01 w-height pic 999 value 600 is external.
  15.  
  16.        procedure division.
  17.  
  18.          call "SetTraceLogLevel" using
  19.           by value rl-log-error end-call
  20.          call "InitWindow" using
  21.           by value 800 600
  22.           by reference "Game" end-call
  23.  
  24.          perform until is-closing = rl-true
  25.          
  26.           call "WindowShouldClose" returning is-closing
  27.  
  28.           call "BeginDrawing"
  29.  
  30.           call "update"
  31.  
  32.           call "paint"
  33.  
  34.           call "EndDrawing"
  35.  
  36.          end-perform
  37.  
  38.          call "CloseWindow"
  39.  
  40.        .
  41.  
  42.        end program game-main.
  43.  
  44.        identification division.
  45.        program-id. update.
  46.  
  47.        data division.
  48.        working-storage section.
  49.  
  50.        procedure division.
  51.  
  52.        end program update.
  53.  
  54.        identification division.
  55.        program-id. paint.
  56.  
  57.        data division.
  58.        working-storage section.
  59.  
  60.        copy rl-keys.
  61.        copy rl-bool.
  62.        copy rl-def.
  63.  
  64.        procedure division.
  65.  
  66.        call "b_ClearBackground" using
  67.         by value 245 245 245 255 end-call
  68.        call "b_DrawRectangle" using
  69.         by value 50 50 50 50
  70.         255 0 0 255
  71.        end-call.
  72.  
  73.        end program paint.
  74.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement