// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: new_screen(unsigned char)
void new_screen(u08 c)
{
char *s;

   // setup for a new screen size
   screen_type = c;   // $ command
   if(c == 'd') {
      s="480x320";
      if(user_set_full_screen == 0) {
         go_fullscreen = 1;
         kill_deco = 1;
      }
   }
   else if(c == 'e') {
      s="320x480";
      if(user_set_full_screen == 0) {
         go_fullscreen = 1;
         kill_deco = 1;
      }
   }
   else if(c == 'p') {
      s="800x480";
      if(user_set_full_screen == 0) {
         go_fullscreen = 1;
         kill_deco = 1;
      }
   }
   else if(c == 'r') {
      s="1024x600";
      if(user_set_full_screen == 0) {
         go_fullscreen = 1;
         kill_deco = 1;
      }
   }
   else if(c == 'j') {
      s ="1280x800";
      if(user_set_full_screen == 0) {
         go_fullscreen = 1;
         kill_deco = 1;
      }
   }
   else if(c == 'u') {
      s="640x480";
   }
   else if (c == 's') {
      s="800x600";
   }
   else if(c == 'm') {
      s="1024x768";
   }
   else if(c == 'k') {
      s ="1280x960";
   }
   else if(c == 'l') {
      s="1280x1024";
   }
   else if(c == 'v') {
      s="1400x1050";
   }
   else if(c == 'x') {
      s="1680x1050";
   }
   else if(c == 'h') {
      s="1920x1080";
   }
   else if(c == 'z') {
      s="2048x1536";
   }
   else if(c == 't') {
      s="640x480 text only";
   }
   else if(c == 'n') {
      s="1000x540";
   }
   else if(c == 'c') {
      s="Custom screen size";
   }
   else if(c == 'f') {
      s="Full screen size";
      sprintf(out, "%dx%d", display_width,display_height);
      s = &out[0];
   }
   else              {
      screen_type = 'm';
      s="1024x768";
   }

   if(c == 'c') {
      edit_info1 = "Enter the desired screen config like 1024x768";
      sprintf(edit_buffer,"%dx%d", SCREEN_WIDTH,SCREEN_HEIGHT);
      sprintf(out, "%s screen: optionally add T)iny  S)mall  M)edium  L)arge font:", s);
   }
   else {
      strcpy(edit_buffer, "Y");
      sprintf(out, "%s screen: Y)es  N)o  I)nvert  +  Font: T)iny  S)mall  M)edium  L)arge", s);
   }
   start_edit(SCREEN_CMD, out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1d0e01(%rip), %rax    # 0x202831
movb %dil, (%rax)
addl $-0x63, %edi
cmpl $0x17, %edi
ja 0x31b27
leaq 0xc489e(%rip), %rcx     # 0xf62e4
movslq (%rcx,%rdi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
leaq 0xcdd60(%rip), %rax     # 0xff7b6
leaq 0x2f7b83(%rip), %rcx    # 0x3295e0
movq %rax, (%rcx)
leaq 0x1d0d99(%rip), %rax    # 0x202800
movl (%rax), %edx
leaq 0x1d0d94(%rip), %rax    # 0x202804
movl (%rax), %ecx
leaq 0x2f7867(%rip), %rdi    # 0x3292e0
leaq 0xc3363(%rip), %rsi     # 0xf4de3
xorl %eax, %eax
callq 0x9060
leaq 0x2f4792(%rip), %rdi    # 0x326220
leaq 0xcdd4f(%rip), %rsi     # 0xff7e4
leaq 0xcdd07(%rip), %rdx     # 0xff7a3
jmp 0x31bc7
leaq 0xcdce0(%rip), %rbx     # 0xff788
jmp 0x31baa
leaq 0x1d0d30(%rip), %rax    # 0x2027e4
leaq 0xcdc70(%rip), %rbx     # 0xff72b
jmp 0x31b51
leaq 0x1d0d31(%rip), %rax    # 0x2027f8
movl (%rax), %edx
leaq 0x1d0d2c(%rip), %rax    # 0x2027fc
movl (%rax), %ecx
leaq 0x2f4747(%rip), %rbx    # 0x326220
leaq 0xc3303(%rip), %rsi     # 0xf4de3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
jmp 0x31baa
leaq 0xcdc4f(%rip), %rbx     # 0xff745
jmp 0x31baa
leaq 0xcdc72(%rip), %rbx     # 0xff774
jmp 0x31baa
leaq 0x1d0cd6(%rip), %rax    # 0x2027e4
leaq 0xcdc1e(%rip), %rbx     # 0xff733
jmp 0x31b51
leaq 0x1d0cc6(%rip), %rax    # 0x2027e4
leaq 0xcdbfe(%rip), %rbx     # 0xff723
jmp 0x31b51
movb $0x6d, (%rax)
leaq 0xcdcaa(%rip), %rbx     # 0xff7db
jmp 0x31baa
leaq 0x1d0caa(%rip), %rax    # 0x2027e4
leaq 0xcdbda(%rip), %rbx     # 0xff71b
jmp 0x31b51
leaq 0x1d0c9a(%rip), %rax    # 0x2027e4
leaq 0xcdbeb(%rip), %rbx     # 0xff73c
cmpl $0x0, (%rax)
jne 0x31baa
leaq 0x1d0c83(%rip), %rax    # 0x2027e0
pushq $0x1
popq %rcx
movl %ecx, (%rax)
leaq 0x1d0cbb(%rip), %rax    # 0x202824
movl %ecx, (%rax)
jmp 0x31baa
leaq 0xcdbd9(%rip), %rbx     # 0xff74d
jmp 0x31baa
leaq 0xccd88(%rip), %rbx     # 0xfe905
jmp 0x31baa
leaq 0xcdbda(%rip), %rbx     # 0xff760
jmp 0x31baa
leaq 0xcdc0b(%rip), %rbx     # 0xff79a
jmp 0x31baa
leaq 0xcdbbe(%rip), %rbx     # 0xff756
jmp 0x31baa
leaq 0xcdbdd(%rip), %rbx     # 0xff77e
jmp 0x31baa
leaq 0xcdbc0(%rip), %rbx     # 0xff76a
leaq 0x2f772f(%rip), %rax    # 0x3292e0
movw $0x59, (%rax)
leaq 0x2f4663(%rip), %rdi    # 0x326220
leaq 0xcdc5f(%rip), %rsi     # 0xff823
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9060
leaq 0x2f464b(%rip), %rsi    # 0x326220
pushq $0x24
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x297a7