OSDN Git Service

Aligned misaligned indent.
[hengbandforosx/hengbandosx.git] / src / main-cocoa.m
index 5b7a281..038b144 100644 (file)
@@ -118,7 +118,7 @@ static wchar_t convert_two_byte_eucjp_to_utf16_native(const char *cp);
 - (void)playSound:(int)event;
 
 /**
- * Impose an arbitary limit on number of possible samples per event.
+ * Impose an arbitrary limit on the number of possible samples per event.
  * Currently not declaring this as a class property for compatibility with
  * versions of Xcode prior to 8.
  */
@@ -132,7 +132,7 @@ static wchar_t convert_two_byte_eucjp_to_utf16_native(const char *cp);
 + (AngbandSoundCatalog*)sharedSounds;
 
 /**
- * Release any resouces associated with shared sounds.
+ * Release any resources associated with shared sounds.
  */
 + (void)clearSharedSounds;
 
@@ -333,7 +333,7 @@ static __strong AngbandSoundCatalog* gSharedSounds = nil;
     if (gSharedSounds == nil) {
        gSharedSounds = [[AngbandSoundCatalog alloc] init];
     }
-    return gSharedSounds;;
+    return gSharedSounds;
 }
 
 + (void)clearSharedSounds {
@@ -3291,7 +3291,6 @@ static int compare_nsrect_yorigin_greater(const void *ap, const void *bp)
     NSGraphicsContext *nsctx = nil;
     CGContextRef ctx = 0;
     NSFont* screenFont = nil;
-    term *old = 0;
     int graf_width = 0, graf_height = 0;
     int overdraw_row = 0, overdraw_max = 0;
     wchar_t blank = 0;
@@ -3299,8 +3298,6 @@ static int compare_nsrect_yorigin_greater(const void *ap, const void *bp)
        rect.origin.x + rect.size.width > self.borderSize.width &&
        rect.origin.y < bottomY &&
        rect.origin.y + rect.size.height > self.borderSize.height) {
-       old = Term;
-       Term_activate(self->terminal);
        nsctx = [NSGraphicsContext currentContext];
        ctx = [nsctx graphicsPort];
        screenFont = [self.angbandViewFont screenFont];
@@ -3326,9 +3323,6 @@ static int compare_nsrect_yorigin_greater(const void *ap, const void *bp)
     if (overdraw_row && invalidCount > 1) {
        sortedRects = malloc(invalidCount * sizeof(NSRect));
        if (sortedRects == 0) {
-           if (old != 0) {
-               Term_activate(old);
-           }
            NSException *exc = [NSException exceptionWithName:@"OutOfMemory"
                                            reason:@"sorted rects in drawRect"
                                            userInfo:nil];
@@ -3675,9 +3669,6 @@ static int compare_nsrect_yorigin_greater(const void *ap, const void *bp)
     }
 
     free(sortedRects);
-    if (old != 0) {
-       Term_activate(old);
-    }
 }
 
 - (BOOL)isOrderedIn
@@ -4922,7 +4913,7 @@ static void quit_calmly(void)
     {
         /* Hack -- Forget messages and term */
         msg_flag = FALSE;
-               Term->mapped_flag = FALSE;
+        Term->mapped_flag = FALSE;
 
         /* Save the game */
         do_cmd_save_game(FALSE);
@@ -5357,15 +5348,18 @@ static term *term_data_link(int i)
     /* Initialize the term */
     term_init(newterm, columns, rows, 256 /* keypresses, for some reason? */);
 
-    /* Differentiate between BS/^h, Tab/^i, etc. */
-    /* newterm->complex_input = TRUE; */
-
     /* Use a "software" cursor */
     newterm->soft_cursor = TRUE;
 
     /* Disable the per-row flush notifications since they are not used. */
     newterm->never_frosh = TRUE;
 
+    /*
+     * Differentiate between BS/^h, Tab/^i, ... so ^h and ^j work under the
+     * roguelike command set.
+     */
+    /* newterm->complex_input = TRUE; */
+
     /* Erase with "white space" */
     newterm->attr_blank = TERM_WHITE;
     newterm->char_blank = ' ';