This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libseven 0.14.0: overhaul video header structure
- Loading branch information
1 parent
261594e
commit d7bc40f
Showing
24 changed files
with
201 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#ifndef _LIBSEVEN_HW_VIDEO_COLOR_CONSTANTS_H | ||
#define _LIBSEVEN_HW_VIDEO_COLOR_CONSTANTS_H | ||
|
||
#include <seven/base.h> | ||
#include <seven/hw/video/color.h> | ||
|
||
_LIBSEVEN_EXTERN_C | ||
|
||
enum ColorConstants | ||
{ | ||
COLOR_RED = RGB5(31, 0, 0), | ||
COLOR_RED_ORANGE = RGB5(31, 8, 0), | ||
COLOR_ORANGE = RGB5(31, 15, 0), | ||
COLOR_ORANGE_YELLOW = RGB5(31, 23, 0), | ||
COLOR_YELLOW = RGB5(31, 31, 0), | ||
COLOR_YELLOW_LIME = RGB5(23, 31, 0), | ||
COLOR_LIME = RGB5(15, 31, 0), | ||
COLOR_LIME_GREEN = RGB5( 8, 31, 0), | ||
COLOR_GREEN = RGB5( 0, 31, 0), | ||
COLOR_GREEN_MINT = RGB5( 0, 31, 8), | ||
COLOR_MINT = RGB5( 0, 31, 15), | ||
COLOR_MINT_CYAN = RGB5( 0, 31, 23), | ||
COLOR_CYAN = RGB5( 0, 31, 31), | ||
COLOR_CYAN_SKYBLUE = RGB5( 0, 23, 31), | ||
COLOR_SKYBLUE = RGB5( 0, 15, 31), | ||
COLOR_SKYBLUE_BLUE = RGB5( 0, 8, 31), | ||
COLOR_BLUE = RGB5( 0, 0, 31), | ||
COLOR_BLUE_PURPLE = RGB5( 8, 0, 31), | ||
COLOR_PURPLE = RGB5(15, 0, 31), | ||
COLOR_PURPLE_MAGENTA = RGB5(23, 0, 31), | ||
COLOR_MAGENTA = RGB5(31, 0, 31), | ||
COLOR_MAGENTA_PINK = RGB5(31, 0, 23), | ||
COLOR_PINK = RGB5(31, 0, 15), | ||
COLOR_PINK_RED = RGB5(31, 0, 8), | ||
|
||
COLOR_BLACK = RGB5( 0, 0, 0), | ||
COLOR_WHITE = RGB5(31, 31, 31), | ||
|
||
COLOR_GRAY_0 = RGB5( 0, 0, 0), | ||
COLOR_GRAY_5 = RGB5( 2, 2, 2), | ||
COLOR_GRAY_10 = RGB5( 3, 3, 3), | ||
COLOR_GRAY_15 = RGB5( 5, 5, 5), | ||
COLOR_GRAY_20 = RGB5( 6, 6, 6), | ||
COLOR_GRAY_25 = RGB5( 8, 8, 8), | ||
COLOR_GRAY_30 = RGB5( 9, 9, 9), | ||
COLOR_GRAY_35 = RGB5(11, 11, 11), | ||
COLOR_GRAY_40 = RGB5(12, 12, 12), | ||
COLOR_GRAY_45 = RGB5(14, 14, 14), | ||
COLOR_GRAY_50 = RGB5(15, 15, 15), | ||
COLOR_GRAY_55 = RGB5(17, 17, 17), | ||
COLOR_GRAY_60 = RGB5(19, 19, 19), | ||
COLOR_GRAY_65 = RGB5(20, 20, 20), | ||
COLOR_GRAY_70 = RGB5(22, 22, 22), | ||
COLOR_GRAY_75 = RGB5(23, 23, 23), | ||
COLOR_GRAY_80 = RGB5(25, 25, 25), | ||
COLOR_GRAY_85 = RGB5(26, 26, 26), | ||
COLOR_GRAY_90 = RGB5(28, 28, 28), | ||
COLOR_GRAY_95 = RGB5(29, 29, 29), | ||
COLOR_GRAY_100 = RGB5(31, 31, 31), | ||
}; | ||
|
||
_LIBSEVEN_EXTERN_C_END | ||
|
||
#endif /* !_LIBSEVEN_HW_VIDEO_COLOR_CONSTANTS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#ifndef _LIBSEVEN_HW_VIDEO_MEMORY_H | ||
#define _LIBSEVEN_HW_VIDEO_MEMORY_H | ||
|
||
#include <seven/base.h> | ||
#include <seven/hw/memory.h> | ||
#include <seven/hw/video/types.h> | ||
|
||
_LIBSEVEN_EXTERN_C | ||
|
||
#define BG_PALETTE MEMADDR(MEM_PALETTE, Palette) | ||
#define OBJ_PALETTE MEMADDR(MEM_PALETTE + 512, Palette) | ||
|
||
#define BG_PALETTE_BANK MEMARRAY(MEM_PALETTE, PaletteBank, 16) | ||
#define OBJ_PALETTE_BANK MEMARRAY(MEM_PALETTE + 512, PaletteBank, 16) | ||
|
||
#define GFX_BASE_ADDR(n) (MEM_VRAM + ((n) << 14)) | ||
#define MAP_BASE_ADDR(n) (MEM_VRAM + ((n) << 11)) | ||
|
||
#define OAM_OBJS MEMARRAY(MEM_OAM, struct Object, 128) | ||
|
||
_LIBSEVEN_EXTERN_C_END | ||
|
||
#endif /* !_LIBSEVEN_HW_VIDEO_MEMORY_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.