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,7 +94,7 @@ compile_commands.json:
94 94
 	@echo "Cleaning old build"
95 95
 	@make clean
96 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 98
 	@echo "Running full build within bear"
99 99
 	@bear --config bear.cfg -- make -j4
100 100
 	@rm -rf bear.cfg

+ 1
- 14
src/main.c View File

@@ -409,20 +409,7 @@ void splash(void) BANKED {
409 409
                         switch_special = 1;
410 410
                     }
411 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 413
                     if (debug_entries[debug_menu_index].flag != DBG_NONE) {
427 414
                         conf_get()->debug_flags ^= debug_entries[debug_menu_index].flag;
428 415
                         conf_write_crc();

+ 8
- 0
src/maps.c View File

@@ -21,6 +21,7 @@
21 21
  */
22 22
 
23 23
 #include "banks.h"
24
+#include "gb/cgb.h"
24 25
 #include "gb/gb.h"
25 26
 #include "util.h"
26 27
 #include "map_data.h"
@@ -112,6 +113,13 @@ void map_load(uint8_t is_splash) BANKED {
112 113
 
113 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 125
 void map_fill(enum MAPS map, uint8_t bkg) NONBANKED {

Loading…
Cancel
Save