Sporkinator

EnumerateModes

Jan 9th, 2012
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. globalvar ListModes, Output;
  2. Output = "";
  3. ListModes = ds_list_create();
  4. var width, height, bits, frequency, index, entry, time;
  5. time = current_time;
  6. index = argument0;
  7. for (bits = 16; bits < 32 + 8; bits += 8)
  8. {
  9.     for (frequency = 60; frequency < 100; frequency += 10)
  10.     {
  11.         for (width = 640; width < 1280; width += 8)
  12.         {
  13.             for (height = 480; height < 1280; height += 8)
  14.             {
  15.                 entry = "[" + string(width) + " x " + string(height) + ", " + string(bits) + ", " + string(frequency) + "]";
  16.                 draw_clear(0);
  17.                 draw_set_color(c_white);
  18.                 draw_text(0, 0, "Testing: " + entry);
  19.                 if (displayTest(index, width, height, bits, frequency))
  20.                 {
  21.                     //entry = "1024x600, 16 Bit, 60Hz";
  22.                     ds_list_add(ListModes, entry);
  23.                     Output += entry + "#";
  24.                     draw_text(32, 32, "SUCCESS!");
  25.                 }
  26.                 io_handle();
  27.                 screen_refresh();
  28.                 //sleep(500);
  29.                 if (keyboard_check(vk_escape))
  30.                 {
  31.                     if (show_question("ESCAPE?"))
  32.                         return Output;
  33.                 }
  34.             }
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment