ref: 8adf5934036660e01c4a00128d2efa655eca9872
parent: 02295489d234c33fd68a0150b01fa726c393efc1
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Aug 5 15:51:06 EDT 2020
Caret documentation/cleanup
--- a/src/Caret.cpp
+++ b/src/Caret.cpp
@@ -8,27 +8,54 @@
#include "Game.h"
#include "Triangle.h"
+#define CARET_MAX 0x40
+
+struct CARET
+{
+ int cond;
+ int code;
+ int direct;
+ int x;
+ int y;
+ int xm;
+ int ym;
+ int act_no;
+ int act_wait;
+ int ani_no;
+ int ani_wait;
+ int view_left;
+ int view_top;
+ RECT rect;
+};
+
+struct CARET_TABLE
+{
+ int view_left;
+ int view_top;
+};
+
CARET gCrt[CARET_MAX];
+// Sprite offsets
CARET_TABLE gCaretTable[18] = {
{0, 0},
- {0x800, 0x800},
- {0x1000, 0x1000},
- {0x1000, 0x1000},
- {0x1000, 0x1000},
- {0x800, 0x800},
- {0x1000, 0x1000},
- {0x800, 0x800},
- {0x1000, 0x1000},
- {0x1000, 0x1000},
- {0x3800, 0x1000},
- {0x800, 0x800},
- {0x2000, 0x2000},
- {0x800, 0x800},
- {0x2800, 0x2800},
- {0x800, 0x800},
- {0x2800, 0x800},
- {0x6800, 0x800}
+ { 4 * 0x200, 4 * 0x200},
+ { 8 * 0x200, 8 * 0x200},
+ { 8 * 0x200, 8 * 0x200},
+ { 8 * 0x200, 8 * 0x200},
+ { 4 * 0x200, 4 * 0x200},
+ { 8 * 0x200, 8 * 0x200},
+ { 4 * 0x200, 4 * 0x200},
+ { 8 * 0x200, 8 * 0x200},
+ { 8 * 0x200, 8 * 0x200},
+ {28 * 0x200, 8 * 0x200},
+ { 4 * 0x200, 4 * 0x200},
+ {16 * 0x200, 16 * 0x200},
+ { 4 * 0x200, 4 * 0x200},
+ {20 * 0x200, 20 * 0x200},
+ { 4 * 0x200, 4 * 0x200},
+ {20 * 0x200, 4 * 0x200},
+ {52 * 0x200, 4 * 0x200}
};
void InitCaret(void)
--- a/src/Caret.h
+++ b/src/Caret.h
@@ -2,35 +2,6 @@
#include "WindowsWrapper.h"
-#define CARET_MAX 0x40
-
-struct CARET_TABLE
-{
- int view_left;
- int view_top;
-};
-
-struct CARET
-{
- int cond;
- int code;
- int direct;
- int x;
- int y;
- int xm;
- int ym;
- int act_no;
- int act_wait;
- int ani_no;
- int ani_wait;
- int view_left;
- int view_top;
- RECT rect;
-};
-
-extern CARET gCrt[CARET_MAX];
-extern CARET_TABLE gCaretTable[18];
-
void InitCaret(void);
void ActCaret(void);
void PutCaret(int fx, int fy);