This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:cprog:fall2024:projects:fwg0 [2024/10/09 03:13] – [compile] mwinter4 | notes:cprog:fall2024:projects:fwg0 [2024/10/10 02:15] (current) – [processing textures and regions] tkastne1 | ||
---|---|---|---|
Line 8: | Line 8: | ||
*This repository has .zip and .tar.gz files containing all necessary source code | *This repository has .zip and .tar.gz files containing all necessary source code | ||
+ | |||
+ | The list of C header files for Vircon32 is here [[https:// | ||
+ | |||
+ | *Functions specific to Vircon32 are defined here, including video.h | ||
=====Build from Source===== | =====Build from Source===== | ||
Line 18: | Line 22: | ||
Where <wrap hi> | Where <wrap hi> | ||
====assemble==== | ====assemble==== | ||
+ | Once you've compiled your code successfully, | ||
+ | < | ||
+ | Where, again, <wrap hi> | ||
====image processing==== | ====image processing==== | ||
To use the images we want with the Vircon32 console/ | To use the images we want with the Vircon32 console/ | ||
Line 34: | Line 40: | ||
The print() method draws text using the drawing point as the uppermost left part of the text | The print() method draws text using the drawing point as the uppermost left part of the text | ||
====processing textures and regions==== | ====processing textures and regions==== | ||
+ | select_texture(int texture_id) | ||
+ | *"Sets the selected texture to the given texture ID. All texture functions will apply to that texture from that moment" | ||
+ | *Selects a .vtex texture that will be used for other functions (like select_region) | ||
+ | |||
+ | select_region(int region_id) | ||
+ | *"Sets the selected texture region to the given texture ID. All region functions will apply to that region ID from the selected texture" | ||
+ | *Selects/ | ||
+ | define_region(int min_x, int min_y, int max_x, int max_y, int hotspot_x, int hotspot_y) | ||
+ | *Defines the currently selected texture region, as a rectangle within the selected texture. All arguments are given in pixel coordinates within the selected texture | ||
+ | *Defines the bounds of the region, used for other function (like draw_region_at | ||
+ | *Allows a specific portion of a texture to be used as a sprite | ||
+ | *Allows a single texture/ | ||
====displaying a region at location==== | ====displaying a region at location==== | ||