Browse Source

misc tweaks

Thomas B 3 weeks ago
parent
commit
53039b9ebe
3 changed files with 10 additions and 15 deletions
  1. 1
    1
      Makefile
  2. 1
    14
      src/main.c
  3. 8
    0
      src/maps.c

+ 1
- 1
Makefile View File

94
 	@echo "Cleaning old build"
94
 	@echo "Cleaning old build"
95
 	@make clean
95
 	@make clean
96
 	@echo "Preparing bear.cfg"
96
 	@echo "Preparing bear.cfg"
97
-	@echo '{"compilation":{"compilers_to_recognize":[{"executable":"$(GBDK_HOME)/bin/sdcc","flags_to_add":["-D__PORT_sm83", "-D__TARGET_gb" ],"flags_to_remove":[""]}]}}' > bear.cfg
97
+	@echo '{"compilation":{"compilers_to_recognize":[{"executable":"$(GBDK_HOME)/bin/sdcc","flags_to_add":["-D__PORT_sm83", "-D__TARGET_gb", "-DBANK(x)=42", "-DBANKREF(x)=", "-DBANKREF_EXTERN(x)=" ],"flags_to_remove":[""]}]}}' > bear.cfg
98
 	@echo "Running full build within bear"
98
 	@echo "Running full build within bear"
99
 	@bear --config bear.cfg -- make -j4
99
 	@bear --config bear.cfg -- make -j4
100
 	@rm -rf bear.cfg
100
 	@rm -rf bear.cfg

+ 1
- 14
src/main.c View File

409
                         switch_special = 1;
409
                         switch_special = 1;
410
                     }
410
                     }
411
                     splash_win();
411
                     splash_win();
412
-                } else if (key_pressed(J_RIGHT)) {
413
-                    if (debug_entries[debug_menu_index].flag != DBG_NONE) {
414
-                        conf_get()->debug_flags ^= debug_entries[debug_menu_index].flag;
415
-                        conf_write_crc();
416
-                    } else {
417
-                        if (debug_special_value < debug_entries[debug_menu_index].max) {
418
-                            debug_special_value++;
419
-                        } else {
420
-                            debug_special_value = 0;
421
-                        }
422
-                        switch_special = 1;
423
-                    }
424
-                    splash_win();
425
-                } else if (key_pressed(J_A)) {
412
+                } else if (key_pressed(J_RIGHT) || key_pressed(J_A)) {
426
                     if (debug_entries[debug_menu_index].flag != DBG_NONE) {
413
                     if (debug_entries[debug_menu_index].flag != DBG_NONE) {
427
                         conf_get()->debug_flags ^= debug_entries[debug_menu_index].flag;
414
                         conf_get()->debug_flags ^= debug_entries[debug_menu_index].flag;
428
                         conf_write_crc();
415
                         conf_write_crc();

+ 8
- 0
src/maps.c View File

21
  */
21
  */
22
 
22
 
23
 #include "banks.h"
23
 #include "banks.h"
24
+#include "gb/cgb.h"
24
 #include "gb/gb.h"
25
 #include "gb/gb.h"
25
 #include "util.h"
26
 #include "util.h"
26
 #include "map_data.h"
27
 #include "map_data.h"
112
 
113
 
113
         map_load_helper(i);
114
         map_load_helper(i);
114
     }
115
     }
116
+
117
+    if (is_splash) {
118
+        BGP_REG = 0b11100100;
119
+    } else {
120
+        // invert BGP for DMG in-game
121
+        BGP_REG = 0b00011011;
122
+    }
115
 }
123
 }
116
 
124
 
117
 void map_fill(enum MAPS map, uint8_t bkg) NONBANKED {
125
 void map_fill(enum MAPS map, uint8_t bkg) NONBANKED {

Loading…
Cancel
Save