// File: 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
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %cl
leaq 0x22da99(%rip), %rax    # 0x277a11
movb %cl, (%rax)
movzbl -0x1(%rbp), %eax
cmpl $0x64, %eax
jne 0x49fb9
leaq 0x1300ad(%rip), %rax    # 0x17a037
movq %rax, -0x10(%rbp)
leaq 0x22da2f(%rip), %rax    # 0x2779c4
cmpl $0x0, (%rax)
jne 0x49fb4
leaq 0x22da1f(%rip), %rax    # 0x2779c0
movl $0x1, (%rax)
leaq 0x22da56(%rip), %rax    # 0x277a04
movl $0x1, (%rax)
jmp 0x4a25a
movzbl -0x1(%rbp), %eax
cmpl $0x65, %eax
jne 0x49ff8
leaq 0x130076(%rip), %rax    # 0x17a03f
movq %rax, -0x10(%rbp)
leaq 0x22d9f0(%rip), %rax    # 0x2779c4
cmpl $0x0, (%rax)
jne 0x49ff3
leaq 0x22d9e0(%rip), %rax    # 0x2779c0
movl $0x1, (%rax)
leaq 0x22da17(%rip), %rax    # 0x277a04
movl $0x1, (%rax)
jmp 0x4a258
movzbl -0x1(%rbp), %eax
cmpl $0x70, %eax
jne 0x4a037
leaq 0x13003f(%rip), %rax    # 0x17a047
movq %rax, -0x10(%rbp)
leaq 0x22d9b1(%rip), %rax    # 0x2779c4
cmpl $0x0, (%rax)
jne 0x4a032
leaq 0x22d9a1(%rip), %rax    # 0x2779c0
movl $0x1, (%rax)
leaq 0x22d9d8(%rip), %rax    # 0x277a04
movl $0x1, (%rax)
jmp 0x4a256
movzbl -0x1(%rbp), %eax
cmpl $0x72, %eax
jne 0x4a076
leaq 0x130008(%rip), %rax    # 0x17a04f
movq %rax, -0x10(%rbp)
leaq 0x22d972(%rip), %rax    # 0x2779c4
cmpl $0x0, (%rax)
jne 0x4a071
leaq 0x22d962(%rip), %rax    # 0x2779c0
movl $0x1, (%rax)
leaq 0x22d999(%rip), %rax    # 0x277a04
movl $0x1, (%rax)
jmp 0x4a254
movzbl -0x1(%rbp), %eax
cmpl $0x6a, %eax
jne 0x4a0b5
leaq 0x12ffd2(%rip), %rax    # 0x17a058
movq %rax, -0x10(%rbp)
leaq 0x22d933(%rip), %rax    # 0x2779c4
cmpl $0x0, (%rax)
jne 0x4a0b0
leaq 0x22d923(%rip), %rax    # 0x2779c0
movl $0x1, (%rax)
leaq 0x22d95a(%rip), %rax    # 0x277a04
movl $0x1, (%rax)
jmp 0x4a252
movzbl -0x1(%rbp), %eax
cmpl $0x75, %eax
jne 0x4a0ce
leaq 0x12f152(%rip), %rax    # 0x179217
movq %rax, -0x10(%rbp)
jmp 0x4a250
movzbl -0x1(%rbp), %eax
cmpl $0x73, %eax
jne 0x4a0e7
leaq 0x12ff83(%rip), %rax    # 0x17a061
movq %rax, -0x10(%rbp)
jmp 0x4a24e
movzbl -0x1(%rbp), %eax
cmpl $0x6d, %eax
jne 0x4a100
leaq 0x130011(%rip), %rax    # 0x17a108
movq %rax, -0x10(%rbp)
jmp 0x4a24c
movzbl -0x1(%rbp), %eax
cmpl $0x6b, %eax
jne 0x4a119
leaq 0x12ff59(%rip), %rax    # 0x17a069
movq %rax, -0x10(%rbp)
jmp 0x4a24a
movzbl -0x1(%rbp), %eax
cmpl $0x6c, %eax
jne 0x4a132
leaq 0x12ff49(%rip), %rax    # 0x17a072
movq %rax, -0x10(%rbp)
jmp 0x4a248
movzbl -0x1(%rbp), %eax
cmpl $0x76, %eax
jne 0x4a14b
leaq 0x12ff3a(%rip), %rax    # 0x17a07c
movq %rax, -0x10(%rbp)
jmp 0x4a246
movzbl -0x1(%rbp), %eax
cmpl $0x78, %eax
jne 0x4a164
leaq 0x12ff2b(%rip), %rax    # 0x17a086
movq %rax, -0x10(%rbp)
jmp 0x4a244
movzbl -0x1(%rbp), %eax
cmpl $0x68, %eax
jne 0x4a17d
leaq 0x12ff1c(%rip), %rax    # 0x17a090
movq %rax, -0x10(%rbp)
jmp 0x4a242
movzbl -0x1(%rbp), %eax
cmpl $0x7a, %eax
jne 0x4a196
leaq 0x12ff0d(%rip), %rax    # 0x17a09a
movq %rax, -0x10(%rbp)
jmp 0x4a240
movzbl -0x1(%rbp), %eax
cmpl $0x74, %eax
jne 0x4a1af
leaq 0x12fefe(%rip), %rax    # 0x17a0a4
movq %rax, -0x10(%rbp)
jmp 0x4a23e
movzbl -0x1(%rbp), %eax
cmpl $0x6e, %eax
jne 0x4a1c5
leaq 0x12fef7(%rip), %rax    # 0x17a0b6
movq %rax, -0x10(%rbp)
jmp 0x4a23c
movzbl -0x1(%rbp), %eax
cmpl $0x63, %eax
jne 0x4a1db
leaq 0x12feea(%rip), %rax    # 0x17a0bf
movq %rax, -0x10(%rbp)
jmp 0x4a23a
movzbl -0x1(%rbp), %eax
cmpl $0x66, %eax
jne 0x4a223
leaq 0x12fee7(%rip), %rax    # 0x17a0d2
movq %rax, -0x10(%rbp)
leaq 0x22d7e2(%rip), %rax    # 0x2779d8
movl (%rax), %edx
leaq 0x22d7dd(%rip), %rax    # 0x2779dc
movl (%rax), %ecx
leaq 0x3511f8(%rip), %rdi    # 0x39b400
leaq 0x126b46(%rip), %rsi    # 0x170d55
movb $0x0, %al
callq 0x9060
leaq 0x3511e3(%rip), %rax    # 0x39b400
movq %rax, -0x10(%rbp)
jmp 0x4a238
leaq 0x22d7e7(%rip), %rax    # 0x277a11
movb $0x6d, (%rax)
leaq 0x12fed4(%rip), %rax    # 0x17a108
movq %rax, -0x10(%rbp)
jmp 0x4a23a
jmp 0x4a23c
jmp 0x4a23e
jmp 0x4a240
jmp 0x4a242
jmp 0x4a244
jmp 0x4a246
jmp 0x4a248
jmp 0x4a24a
jmp 0x4a24c
jmp 0x4a24e
jmp 0x4a250
jmp 0x4a252
jmp 0x4a254
jmp 0x4a256
jmp 0x4a258
jmp 0x4a25a
movzbl -0x1(%rbp), %eax
cmpl $0x63, %eax
jne 0x4a2b6
leaq 0x354556(%rip), %rax    # 0x39e7c0
leaq 0x12fe72(%rip), %rcx    # 0x17a0e3
movq %rcx, (%rax)
leaq 0x22d765(%rip), %rax    # 0x2779e0
movl (%rax), %edx
leaq 0x22d760(%rip), %rax    # 0x2779e4
movl (%rax), %ecx
leaq 0x354233(%rip), %rdi    # 0x39e4c0
leaq 0x126ac1(%rip), %rsi    # 0x170d55
movb $0x0, %al
callq 0x9060
movq -0x10(%rbp), %rdx
leaq 0x35115a(%rip), %rdi    # 0x39b400
leaq 0x12fe64(%rip), %rsi    # 0x17a111
movb $0x0, %al
callq 0x9060
jmp 0x4a2e2
leaq 0x354203(%rip), %rdi    # 0x39e4c0
leaq 0x127d84(%rip), %rsi    # 0x172048
callq 0x9350
movq -0x10(%rbp), %rdx
leaq 0x35112c(%rip), %rdi    # 0x39b400
leaq 0x12fe75(%rip), %rsi    # 0x17a150
movb $0x0, %al
callq 0x9060
movl $0x24, %edi
leaq 0x351112(%rip), %rsi    # 0x39b400
callq 0x3d470
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)