-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to collision, tiled conversion, sgdk compat
- Loading branch information
Showing
19 changed files
with
984 additions
and
303 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 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,9 @@ | ||
#ifndef _MATH_TABLES | ||
#define _MATH_TABLES | ||
|
||
const s8 sin_table[256]; | ||
const s8 cos_table[256]; | ||
const u8 atan_table[17]; | ||
const u8 sqrt_table[256]; | ||
|
||
#endif |
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,68 @@ | ||
/** | ||
* generic-stack.h | ||
* Declarations for a simple generic implementation of stacks. | ||
* | ||
* <insert MIT license> | ||
*/ | ||
|
||
#ifdef TYPE | ||
|
||
// +--------+-------------------------------------------------------- | ||
// | Macros | | ||
// +--------+ | ||
|
||
/** | ||
* By default, we do not rename procedures and structs. | ||
*/ | ||
#ifndef TYPED | ||
#define TYPED(THING) THING | ||
#endif | ||
|
||
#ifndef NULL | ||
#define NULL 0 | ||
#endif | ||
// +-------+--------------------------------------------------------- | ||
// | Types | | ||
// +-------+ | ||
|
||
typedef struct TYPED(Stack) TYPED(Stack); | ||
|
||
// +------------+---------------------------------------------------- | ||
// | Procedures | | ||
// +------------+ | ||
|
||
/** | ||
* Create a new stack. | ||
*/ | ||
TYPED(Stack)* TYPED(stack_new) (void); | ||
|
||
/** | ||
* Free the space allocated to a stack. | ||
*/ | ||
void TYPED(stack_free) (TYPED(Stack) *stack); | ||
|
||
void TYPED(stack_to_list) (TYPED(Stack) *stack, TYPE* thislist); | ||
|
||
/** | ||
* Determine the number of elements in the stack. | ||
*/ | ||
int TYPED(stack_size) (TYPED(Stack) *stack); | ||
|
||
/** | ||
* Look at the top element of the stack. Requires that the | ||
* stack have at least one element. | ||
*/ | ||
TYPE TYPED(stack_top) (TYPED(Stack) *stack); | ||
|
||
/** | ||
* Remove and return the top element of the stack. Requires that | ||
* the stack have at least one element. | ||
*/ | ||
TYPE TYPED(stack_pop) (TYPED(Stack) *stack); | ||
|
||
/** | ||
* Add an element to the stack. | ||
*/ | ||
void TYPED(stack_push) (TYPED(Stack) *stack, TYPE val); | ||
|
||
#endif // TYPE |
Oops, something went wrong.