1 //------------------------------------------------------------------------- 2 /* 3 Copyright (C) 2004-2020 EDuke32 developers and contributors 4 5 This file is part of EDuke32. 6 7 EDuke32 is free software; you can redistribute it and/or 8 modify it under the terms of the GNU General Public License version 2 9 as published by the Free Software Foundation. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 15 See the GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program; if not, write to the Free Software 19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 */ 21 //------------------------------------------------------------------------- 22 23 #pragma once 24 #ifndef gamestructures_h__ 25 #define gamestructures_h__ 26 27 #include "compat.h" 28 #include "hash.h" 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2); 35 void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t const newValue); 36 int32_t __fastcall VM_GetActiveProjectile(int const spriteNum, int32_t labelNum); 37 void __fastcall VM_SetActiveProjectile(int const spriteNum, int const labelNum, int32_t const newValue); 38 int32_t __fastcall VM_GetPlayer(int const playerNum, int32_t labelNum, int const lParm2); 39 void __fastcall VM_SetPlayer(int const playerNum, int const labelNum, int const lParm2, int32_t const newValue); 40 int32_t __fastcall VM_GetPlayerInput(int const playerNum, int32_t labelNum); 41 void __fastcall VM_SetPlayerInput(int const playerNum, int const labelNum, int32_t const newValue); 42 int32_t __fastcall VM_GetWall(int const wallNum, int32_t labelNum); 43 void __fastcall VM_SetWall(int const wallNum, int const labelNum, int32_t const newValue); 44 int32_t __fastcall VM_GetSector(int const sectNum, int32_t labelNum); 45 void __fastcall VM_SetSector(int const sectNum, int const labelNum, int32_t newValue); 46 int32_t __fastcall VM_GetSprite(int const spriteNum, int32_t labelNum, int const lParm2); 47 void __fastcall VM_SetSprite(int const spriteNum, int const labelNum, int const lParm2, int32_t const newValue); 48 int32_t __fastcall VM_GetProjectile(int const tileNum, int32_t labelNum); 49 void __fastcall VM_SetProjectile(int const tileNum, int const labelNum, int32_t const newValue); 50 int32_t __fastcall VM_GetTileData(int const tileNum, int32_t labelNum); 51 void __fastcall VM_SetTileData(int const tileNum, int const labelNum, int32_t const newValue); 52 int32_t __fastcall VM_GetPalData(int const palNum, int32_t labelNum); 53 54 typedef struct 55 { 56 const char *name; 57 58 int16_t lId; 59 uint16_t flags; 60 int16_t maxParm2; 61 int16_t offset; 62 } memberlabel_t; 63 64 extern memberlabel_t const ActorLabels[]; 65 extern memberlabel_t const InputLabels[]; 66 extern memberlabel_t const PalDataLabels[]; 67 extern memberlabel_t const PlayerLabels[]; 68 extern memberlabel_t const ProjectileLabels[]; 69 extern memberlabel_t const SectorLabels[]; 70 extern memberlabel_t const TileDataLabels[]; 71 extern memberlabel_t const TsprLabels[]; 72 extern memberlabel_t const UserdefsLabels[]; 73 extern memberlabel_t const WallLabels[]; 74 75 extern hashtable_t h_actor; 76 extern hashtable_t h_input; 77 extern hashtable_t h_paldata; 78 extern hashtable_t h_player; 79 extern hashtable_t h_projectile; 80 extern hashtable_t h_sector; 81 extern hashtable_t h_tiledata; 82 extern hashtable_t h_tsprite; 83 extern hashtable_t h_userdef; 84 extern hashtable_t h_wall; 85 86 static hashtable_t *const vmStructHashTablePtrs[] = { 87 &h_actor, &h_input, &h_paldata, &h_player, &h_projectile, &h_sector, &h_tiledata, &h_tsprite, &h_userdef, &h_wall, 88 }; 89 90 #ifdef __cplusplus 91 } 92 #endif 93 94 #endif // gamestructures_h__