Cavestory Mod API
CSMAPI_WeaponTemplates.h
Go to the documentation of this file.
1 /*
2  Cavestory Multiplayer API
3  Copyright (C) 2021 Johnny Ledger
4 
5  This software is provided 'as-is', without any express or implied
6  warranty. In no event will the authors be held liable for any damages
7  arising from the use of this software.
8 
9  Permission is granted to anyone to use this software for any purpose,
10  including commercial applications, and to alter it and redistribute it
11  freely, subject to the following restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not
14  claim that you wrote the original software. If you use this software
15  in a product, an acknowledgment in the product documentation would be
16  appreciated but is not required.
17  2. Altered source versions must be plainly marked as such, and must not be
18  misrepresented as being the original software.
19  3. This notice may not be removed or altered from any source distribution.
20 */
21 
26 #pragma once
28 
29 //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
30 
31 #define DEFAULT_WEAPON(NAME, LEVEL1, LEVEL2, LEVEL3, DISPINFO) { { LEVEL1, LEVEL2, LEVEL3 }, DISPINFO, NAME }
32 #define LEVEL_INFO(BULINDEX, EXP, LEFT, TOP, WIDTH, HEIGHT) { BULINDEX, EXP, { LEFT, TOP, LEFT + WIDTH, TOP + HEIGHT } }
33 #define DISPLAY_INFO(LEFT, TOP, WIDTH, HEIGHT, HOLD_OFFSET_X, HOLD_OFFSET_Y) { LEFT, TOP, LEFT + WIDTH, TOP + HEIGHT, HOLD_OFFSET_X, HOLD_OFFSET_Y }
34 
35 //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
36 
37 PXMOD_WEAPON_STRUCT g_DefaultWeaponList[] =
38 {
39  // ************* Agility ************* //
40  DEFAULT_WEAPON
41  (
42  "Agility",
43  // Level 1
44  LEVEL_INFO
45  (
46  /* Bullet Index */ 0,
47  /* Level-Up Experience */ 10,
48  /* View Rect */ 0, 0, 0, 0
49  ),
50  // Level 2
51  LEVEL_INFO
52  (
53  /* Bullet Index */ 1,
54  /* Level-Up Experience */ 20,
55  /* View Rect */ 0, 0, 0, 0
56  ),
57  // Level 3
58  LEVEL_INFO
59  (
60  /* Bullet Index */ 2,
61  /* Level-Up Experience */ 30,
62  /* View Rect */ 0, 0, 0, 0
63  ),
64  // Basic display information
65  DISPLAY_INFO
66  (
67  /* Weapon Rect */ 0, 0, 0, 0,
68  /* Hold Offset X */ 0,
69  /* Hold Offset Y */ 0
70  )
71  )
72 };
73 
74 /*
76  struct WEAPON_LEVEL_INFO
77  {
79  int bullet_index;
80 
82  int exp;
83 
85  struct
86  {
87  int left;
88  int top;
89  int right;
90  int bottom;
91  } view;
92  } level_info[3];
93 
94  struct WEAPON_DISPLAY_INFO
95  {
96  int left;
97  int top;
98  int right;
99  int bottom;
100 
101  int hold_offset_x;
102  int hold_offset_y;
103  } display_info;
104 
106  char name[64];
107 */
108 
109 //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
110 
111 #undef DEFINE_DEFAULT_WEAPON
112 #undef DEFINE_DEFAULT_WEAPON
Definition: ModConfigResource.h:282