Both sides previous revisionPrevious revisionNext revision | Previous revision |
programming:c:huc [2021/05/25 07:27] – add huc directives info (lifted from huc_doc.htm) cabbage | programming:c:huc [2021/05/25 07:32] (current) – cabbage |
---|
Unordered List ItemHuC explanation | HuC explanation |
| |
explanation of forks | explanation of forks |
- #incchr(identifier_name, "filename", begin_x, begin_y, col, row);\\ Extract row rows and col columns of 8x8 tiles starting at position (begin_x, begin_y) | - #incchr(identifier_name, "filename", begin_x, begin_y, col, row);\\ Extract row rows and col columns of 8x8 tiles starting at position (begin_x, begin_y) |
* incchr_ex : This instruction includes data for character patterns from a series of .pcx files, and sets up for the "new style" of 8x8 scroll-tiling. | * incchr_ex : This instruction includes data for character patterns from a series of .pcx files, and sets up for the "new style" of 8x8 scroll-tiling. |
- #incchr(identifier_name, "filename_1", begin_x, begin_y, col, row, pal_idx1, \ \\ "filename_2", begin_x, begin_y, col, rox, pal_idx2, \ \\ "filename_n", begin_x, begin_y, col, rox, pal_idxn );\\ Extract row rows and col columns of 8x8 tiles starting at position (begin_x, begin_y), and using the stated pal_idx from filename_1 (etc.), assembling them as a single list of tiles in memory, available for use in the map and scrolling functions | - #incchr_ex(identifier_name, "filename_1", begin_x, begin_y, col, row, pal_idx1, \ \\ "filename_2", begin_x, begin_y, col, rox, pal_idx2, \ \\ "filename_n", begin_x, begin_y, col, rox, pal_idxn );\\ Extract row rows and col columns of 8x8 tiles starting at position (begin_x, begin_y), and using the stated pal_idx from filename_1 (etc.), assembling them as a single list of tiles in memory, available for use in the map and scrolling functions |
* inctile : This instruction includes data for tile patterns from a .pcx file. | * inctile : This instruction includes data for tile patterns from a .pcx file. |
- #inctile(identifier_name, "filename");\\ Extract all possible 16x16 tiles from the file called filename. | - #inctile(identifier_name, "filename");\\ Extract all possible 16x16 tiles from the file called filename. |
- #inctile(identifier_name, "filename", begin_x, begin_y, col, row);\\ Extract row rows and col columns of 16x16 tiles starting at position (begin_x, begin_y) | - #inctile(identifier_name, "filename", begin_x, begin_y, col, row);\\ Extract row rows and col columns of 16x16 tiles starting at position (begin_x, begin_y) |
* inctile_ex : This instruction includes data for character patterns from a series of .pcx files, and sets up for the "new style" of 16x16 scroll-tiling. | * inctile_ex : This instruction includes data for character patterns from a series of .pcx files, and sets up for the "new style" of 16x16 scroll-tiling. |
- #inctile(identifier_name, "filename_1", begin_x, begin_y, col, row, pal_idx1, \ \\ "filename_2", begin_x, begin_y, col, rox, pal_idx2, \ \\ "filename_n", begin_x, begin_y, col, rox, pal_idxn );\\ Extract row rows and col columns of 16x16 tiles starting at position (begin_x, begin_y), and using the stated pal_idx from filename_1 (etc.), assembling them as a single list of tiles in memory, available for use in the map and scrolling functions | - #inctile_ex(identifier_name, "filename_1", begin_x, begin_y, col, row, pal_idx1, \ \\ "filename_2", begin_x, begin_y, col, rox, pal_idx2, \ \\ "filename_n", begin_x, begin_y, col, rox, pal_idxn );\\ Extract row rows and col columns of 16x16 tiles starting at position (begin_x, begin_y), and using the stated pal_idx from filename_1 (etc.), assembling them as a single list of tiles in memory, available for use in the map and scrolling functions |
* incbat : This is a special instruction that include a kind of map used to recreate a background picture in conjunction with inclusion of tiles pattern. We've set another pseudo instruction that does that but it's not completely flexible (see load_background). | * incbat : This is a special instruction that include a kind of map used to recreate a background picture in conjunction with inclusion of tiles pattern. We've set another pseudo instruction that does that but it's not completely flexible (see load_background). |
- #incbat(identifier_name, "filename", pcx_offset);\\ Extract the map for displaying the whole pcx containing in the file filename. pcx_offset is the position in the video ram where will be stored the pattern to draw the picture. I advise you to let 0x1000 for this argument, if you want to use the load_background instruction for now. | - #incbat(identifier_name, "filename", pcx_offset);\\ Extract the map for displaying the whole pcx containing in the file filename. pcx_offset is the position in the video ram where will be stored the pattern to draw the picture. I advise you to let 0x1000 for this argument, if you want to use the load_background instruction for now. |
* defspr : With this one, you'll define your own sprites using also inline data, not coming from a picture. | * defspr : With this one, you'll define your own sprites using also inline data, not coming from a picture. |
- #defspr(identifier_name, vram_address, default_palette, <8 pixels data> * 32);\\ The vram_address is a value in the range 0-0x10000 which tell the assembler where you want to see these data in the video ram. Don't forget that before using a sprite and such, you'll have to load data into video ram before the real use. In fact, this argument just tells a preference and its value doesn't oblige you to respect this. This is also true for the default_palette (there are 16 palettes for sprites). As for the data, I recommand you to use the hexadecimal notation, in which each 32 bits number easily represent 8 pixels using a digits for each. I bet a little example will make this appear clearer. To declare 8 pixels beginning by 3 pixels of color 5, then 2 of color 10 and finishing by color 1, you'll use the number 0x555AA111. Since we're defining 16x16 sprites, we need two of these numbers to define a line and thus we'll have 32 arguments to define the whole sprite pattern. | - #defspr(identifier_name, vram_address, default_palette, <8 pixels data> * 32);\\ The vram_address is a value in the range 0-0x10000 which tell the assembler where you want to see these data in the video ram. Don't forget that before using a sprite and such, you'll have to load data into video ram before the real use. In fact, this argument just tells a preference and its value doesn't oblige you to respect this. This is also true for the default_palette (there are 16 palettes for sprites). As for the data, I recommand you to use the hexadecimal notation, in which each 32 bits number easily represent 8 pixels using a digits for each. I bet a little example will make this appear clearer. To declare 8 pixels beginning by 3 pixels of color 5, then 2 of color 10 and finishing by color 1, you'll use the number 0x555AA111. Since we're defining 16x16 sprites, we need two of these numbers to define a line and thus we'll have 32 arguments to define the whole sprite pattern. |
| |
* defchr : basically, you should have guessed what this one is for :) (I'm also pretty tired to make documentation ***yawn*** ) | * defchr : basically, you should have guessed what this one is for :) (I'm also pretty tired to make documentation ***yawn*** ) |
- #defchr(identifier_name, vram_address, default_palette, <8 pixels data> * 8);\\ See defspr for most information. I just want to confirm that you also have 16 palettes for tiles data (which makes a total of 32 differents palettes). And since a tile is only 8x8, you have only one hexa number per line and 8 of these numbers. You can have a look at the debug.c file which has the font used for printing defined this way (notice how the vram_address is useless :) | - #defchr(identifier_name, vram_address, default_palette, <8 pixels data> * 8);\\ See defspr for most information. I just want to confirm that you also have 16 palettes for tiles data (which makes a total of 32 differents palettes). And since a tile is only 8x8, you have only one hexa number per line and 8 of these numbers. You can have a look at the debug.c file which has the font used for printing defined this way (notice how the vram_address is useless :) |