// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
movl %edi, %ebx
leaq 0x1e4139(%rip), %rax    # 0x218831
movb %bl, (%rax)
movl %edi, %ecx
addl $-0x63, %ecx
cmpl $0x17, %ecx
ja 0x347aa
leaq 0xd7b55(%rip), %rdx     # 0x10c264
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0xe0f70(%rip), %r14     # 0x11568f
jmp 0x3482f
leaq 0xe0f49(%rip), %r14     # 0x115674
jmp 0x3482f
leaq 0x1e40ad(%rip), %rax    # 0x2187e4
leaq 0xe0ed9(%rip), %r14     # 0x115617
jmp 0x347d4
leaq 0x1e40ae(%rip), %rax    # 0x2187f8
movl (%rax), %edx
leaq 0x1e40a9(%rip), %rax    # 0x2187fc
movl (%rax), %ecx
leaq 0x307ac4(%rip), %r14    # 0x33c220
leaq 0xd65f5(%rip), %rsi     # 0x10ad58
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
jmp 0x3482f
leaq 0xe0eb8(%rip), %r14     # 0x115631
jmp 0x3482f
leaq 0xe0edb(%rip), %r14     # 0x115660
jmp 0x3482f
leaq 0x1e4053(%rip), %rax    # 0x2187e4
leaq 0xe0e87(%rip), %r14     # 0x11561f
jmp 0x347d4
leaq 0x1e4043(%rip), %rax    # 0x2187e4
leaq 0xe0e67(%rip), %r14     # 0x11560f
jmp 0x347d4
movb $0x6d, (%rax)
leaq 0xe0f13(%rip), %r14     # 0x1156c7
jmp 0x3482f
leaq 0x1e4027(%rip), %rax    # 0x2187e4
leaq 0xe0e43(%rip), %r14     # 0x115607
jmp 0x347d4
leaq 0x1e4017(%rip), %rax    # 0x2187e4
leaq 0xe0e54(%rip), %r14     # 0x115628
cmpl $0x0, (%rax)
jne 0x3482f
leaq 0x1e4000(%rip), %rax    # 0x2187e0
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x1e4036(%rip), %rax    # 0x218824
movl %ecx, (%rax)
jmp 0x3482f
leaq 0xe0e40(%rip), %r14     # 0x115639
jmp 0x3482f
leaq 0xdffef(%rip), %r14     # 0x1147f1
jmp 0x3482f
leaq 0xe0e41(%rip), %r14     # 0x11564c
jmp 0x3482f
leaq 0xe0e72(%rip), %r14     # 0x115686
jmp 0x3482f
leaq 0xe0e25(%rip), %r14     # 0x115642
jmp 0x3482f
leaq 0xe0e44(%rip), %r14     # 0x11566a
jmp 0x3482f
leaq 0xe0e27(%rip), %r14     # 0x115656
cmpb $0x63, %bl
jne 0x34875
leaq 0xe0e67(%rip), %rax     # 0x1156a2
leaq 0x30ad9e(%rip), %rcx    # 0x33f5e0
movq %rax, (%rcx)
leaq 0x1e3fb4(%rip), %rax    # 0x218800
movl (%rax), %edx
leaq 0x1e3faf(%rip), %rax    # 0x218804
movl (%rax), %ecx
leaq 0x30aa82(%rip), %rdi    # 0x33f2e0
leaq 0xd64f3(%rip), %rsi     # 0x10ad58
xorl %eax, %eax
callq 0x9060
leaq 0xe0e5d(%rip), %rsi     # 0x1156d0
jmp 0x34888
leaq 0x30aa64(%rip), %rax    # 0x33f2e0
movw $0x59, (%rax)
leaq 0xe0e87(%rip), %rsi     # 0x11570f
leaq 0x307991(%rip), %rbx    # 0x33c220
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x9060
movl $0x24, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2bc51