ZoriaRPG

std_shortcuts.zh for ZC 2.55

Nov 25th, 2016
92
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //std_shortcuts.zh
  2. //Shortcuts for ZScript Functions that ignore *-> namespaces, and classes.
  3. //v0.8.4
  4. //6th January, 2016
  5.  
  6. //Class FFC
  7.  
  8. int FFCData(ffc f){ return f->Data;}
  9. void FFCData(ffc f, int data) { f->Data = data;}
  10. void FFCData(ffc f, int data, bool change) {
  11.     if ( change ) f->Data += data;
  12.     else    f->Data = data;
  13. }
  14.  
  15. int FFCScript(ffc f) { return f->Script;}
  16. void FFCScript(ffc f, int scriptid){ f->Script = scriptid;}
  17.  
  18. int FFCCSet(ffc f) { return f->CSet; }
  19. void FFCCSet(ffc f, int cset) { f->CSet = cset;}
  20.  
  21. int FFCDelay(ffc f) { return f->Delay;}
  22. void FFCDelay(ffc f, int delay) { f->Delay = delay;}
  23. void FFCDelay(ffc f, int delay, bool change) {
  24.     if ( change ) f->Delay += delay;
  25.     else f->Delay = delay;
  26. }
  27.  
  28. int FFCX(ffc f) { return f->X;}
  29. void FFCX(ffc f, int x){ f->X = x;}
  30. void FFCX(ffc f, int x, bool change){
  31.     if ( change ) f->X += x;
  32.     else f->X = x;
  33. }
  34.  
  35.  
  36. int FFCY(ffc f) { return f->Y;}
  37. void FFCY(ffc f, int y){ f->Y = y;}
  38. void FFCY(ffc f, int y, bool change){
  39.     if ( change ) f->Y += y;
  40.     else f->Y = y;
  41.     }
  42.  
  43. int FFCVx(ffc f) { return f->Vx;}
  44. void FFCVx(ffc f, int vx){ f->Vx = vx;}
  45. void FFCVx(ffc f, int vx, bool change){
  46.     if ( change ) f->Vx += vx;
  47.     else f->Vx = vx;
  48. }
  49.  
  50. int FFCVy(ffc f){ return f->Vy;}
  51. void FFCVy(ffc f, int vy){ f->Vy = vy;}
  52. void FFCVy(ffc f, int vy, bool change){
  53.     if ( change ) f->Vy += vy;
  54.     else f->Vy = vy;
  55. }
  56.  
  57. int FFCAx(ffc f) { return f->Ax;}
  58. void FFCAx(ffc f, int ax) { f->Ax = ax;}
  59. void FFCAx(ffc f, int ax, bool change) {
  60.     if ( change ) f->Ax += ax;
  61.     else f->Ax = ax;
  62. }
  63.  
  64. bool GetFFCFlag(ffc f, int flag) { return f->Flags[flag];}
  65. void SetFFCFlag(ffc f, int flag, int value) { f->Flags[flag] = value;}
  66.  
  67. int FFCTileWidth(ffc f) { return f->TileWidth;}
  68. void FFCTileWidth(ffc f, int tilew) { f->TileWidth = tilew; }
  69. void FFCTileWidth(ffc f, int tilew, bool change) {
  70.     if ( change ) f->TileWidth += tilew;
  71.     else f->TileWidth = tilew;
  72. }
  73.  
  74. int FFCTileHeight(ffc f) { return f->TileWidth;}
  75. void FFCTileHeight(ffc f, int tileh) { f->TileHeight = tileh;}
  76. void FFCTileHeight(ffc f, int tileh, bool change) {
  77.     if ( change ) f->TileHeight += tileh;
  78.     else f->TileHeight = tileh;
  79. }
  80.  
  81. int FFCEffectWidth(ffc f) { return f->EffectWidth;}
  82. void FFCEffectWidth(ffc f, int effectw){ f->EffectWidth = effectw;}
  83. void FFCEffectWidth(ffc f, int effectw, bool change){
  84.     if ( change ) f->EffectWidth += effectw;
  85.         else f->EffectWidth = effectw;
  86. }
  87.  
  88. int FFCEffectHeight(ffc f){ return f->EffectHeight;}
  89. void FFCEffectHeight(ffc f, int effecth){ f->EffectHeight = effecth;}
  90.  
  91. int FFCLink(ffc f) { return f->Link;}
  92. void FFCLink(ffc f, int linkval){ f->Link = linkval;}
  93.  
  94. int GetFFCInitD(ffc f, int reg){ return f->InitD[reg];}
  95. void SetFFCInitD(ffc f, int reg, int val){ f->InitD[reg] = val;}
  96.  
  97. int GetFFCMisc(ffc f, int reg){ return f->Misc[reg];}
  98. void SetFFCMisc(ffc f, int reg, float val) {f->Misc[reg] = val;}
  99.  
  100. //Namespace Link
  101.  
  102. int LinkX(){return Link->X;}
  103.  
  104. void LinkX(int x){ Link->X = x;}
  105.  
  106. void LinkX(int x, bool change){
  107.     if ( change ) Link->X += x;
  108.     else Link->X = x;
  109. }
  110.  
  111. int LinkY(){return Link->Y;}
  112. void LinkY(int y){ Link->Y = y;}
  113. void LinkY(int y, bool change){
  114.     if ( change ) Link->Y += y;
  115.     else Link->Y = y;
  116. }
  117.  
  118. int LinkZ(){return Link->Z;}
  119. void LinkZ(int z){Link->Z = z;}
  120. void LinkZ(int z, bool change){
  121.     if ( change ) Link->Z += z;
  122.     else Link->Z = z;
  123. }
  124.  
  125. bool LinkCollDetection(){return Link->CollDetection;}
  126. void LinkCollDetection(bool state) { Link->CollDetection = state;}
  127.  
  128. int LinkJump(){ return Link->Jump;}
  129. void LinkJump(int height){ Link->Jump = height;}
  130. void LinkJump(int height, bool change){
  131.     if ( change ) Link->Jump += height;
  132.     else Link->Jump = height;
  133. }
  134.  
  135.  
  136. int SwordJinx(){return Link->SwordJinx;}
  137. void SwordJinx(int jinxtime){ Link->SwordJinx = jinxtime;}
  138. void SwordJinx(int jinxtime, bool change){
  139.     if (change) Link->SwordJinx += jinxtime;
  140.     else Link->SwordJinx = jinxtime;
  141. }
  142.  
  143. int ItemJinx(){ return Link->ItemJinx;}
  144. void ItemJinx(int jinxtime){ Link->ItemJinx = jinxtime;}
  145. void ItemJinx(int jinxtime, bool change){
  146.     if ( change ) Link->ItemJinx += jinxtime;
  147.     else Link->ItemJinx = jinxtime;
  148. }
  149.  
  150. int Drunk(){ return Link->Drunk;}
  151. void Drunk(int drunktime){ Link->Drunk = drunktime;}
  152. void Drunk(int drunktime, bool change){
  153.     if ( change ) Link->Drunk += drunktime;
  154.     else Link->Drunk = drunktime;
  155. }
  156.  
  157. int LinkDir(){return Link->Dir;}
  158. void LinkDir(int dir){ Link->Dir = dir;}
  159.  
  160. int LinkHP() { return Link->HP;}
  161. void LinkHP(int hp) { Link->HP = hp;}
  162. void LinkHP(int amount, bool change) {
  163.     if ( change ) Link->HP += amount;
  164.     else Link->HP = amount;
  165. }
  166.  
  167. int LinkMP(){ return Link->MP;}
  168. void LinkMP(int mp){ Link->MP = mp;}
  169. void LinkMP(int amount, bool change) {
  170.     if ( change ) Link->MP += amount;
  171.     else Link->MP = amount;
  172. }
  173.  
  174. int LinkMaxHP() { return Link->MaxHP;}
  175. void LinkMaxHP(int hp) { Link->MaxHP = hp;}
  176. void LinkMaxHP(int amount, bool change) {
  177.     if ( change ) Link->MaxHP += amount;
  178.     else Link->MaxHP = amount;
  179. }
  180.  
  181. int LinkMaxMP(){ return Link->MaxMP;}
  182. void LinkMaxMP(int mp){ Link->MaxMP = mp;}
  183. void LinkMaxMP(int amount, bool change) {
  184.     if ( change ) Link->MaxMP += amount;
  185.     else Link->MaxMP = amount;
  186. }
  187.  
  188. int Action(){ return Link->Action;}
  189. void Action(int action) { Link->Action = action;}
  190.  
  191. int LinkAction(){ return Link->Action;}
  192. void LinkAction(int action) { Link->Action = action;}
  193.  
  194. int HeldItem(){ return Link->HeldItem;}
  195. void HeldItem(int itm){ Link->HeldItem = itm;}
  196.  
  197. int LadderX(){ return Link->LadderX;}
  198. int LadderY(){ return Link->LadderY;}
  199.  
  200. bool InputStart() {return Link->InputStart;}
  201. bool InputMap() {return Link->InputMap;}
  202. bool InputUp() {return Link->InputUp;}
  203. bool InputDown() {return Link->InputDown;}
  204. bool InputLeft() {return Link->InputLeft;}
  205. bool InputRight() {return Link->InputRight;}
  206. bool InputA() {return Link->InputA;}
  207. bool InputB() {return Link->InputB;}
  208. bool InputL() {return Link->InputL;}
  209. bool InputR() {return Link->InputR;}
  210. bool InputEx1() {return Link->InputEx1;}
  211. bool InputEx2() {return Link->InputEx2;}
  212. bool InputEx3() {return Link->InputEx3;}
  213. bool InputEx4() {return Link->InputEx4;}
  214. bool InputAxisUp() {return Link->InputAxisUp;}
  215. bool InputAxisDown() {return Link->InputAxisDown;}
  216. bool InputAxisLeft() {return Link->InputAxisLeft;}
  217. bool InputAxisRight() {return Link->InputAxisRight;}
  218. bool PressStart() {return Link->PressStart;}
  219. bool PressMap() {return Link->PressMap;}
  220. bool PressUp() {return Link->PressUp;}
  221. bool PressDown() {return Link->PressDown;}
  222. bool PressLeft() {return Link->PressLeft;}
  223. bool PressRight() {return Link->PressRight;}
  224. bool PressA() {return Link->PressA;}
  225. bool PressB() {return Link->PressB;}
  226. bool PressL() {return Link->PressL;}
  227. bool PressR() {return Link->PressR;}
  228. bool PressEx1() {return Link->PressEx1;}
  229. bool PressEx2() {return Link->PressEx2;}
  230. bool PressEx3() {return Link->PressEx3;}
  231. bool PressEx4() {return Link->PressEx4;}
  232. bool PressAxisUp() {return Link->PressAxisUp;}
  233. bool PressAxisDown() {return Link->PressAxisDown;}
  234. bool PressAxisLeft() {return Link->PressAxisLeft;}
  235. bool PressAxisRight() {return Link->PressAxisRight;}
  236.  
  237. int InputMouseX() {return Link->InputMouseX;}
  238. int InputMouseY() {return Link->InputMouseY;}
  239. int InputMouseB() {return Link->InputMouseB;}
  240. int InputMouseZ() {return Link->InputMouseZ;}
  241.  
  242. void InputStart(bool val) { Link->InputStart = val;}
  243. void InputMap(bool val) { Link->InputMap = val;}
  244. void InputUp(bool val) { Link->InputUp = val;}
  245. void InputDown(bool val) { Link->InputDown = val;}
  246. void InputLeft(bool val) { Link->InputLeft = val;}
  247. void InputRight(bool val) { Link->InputRight = val;}
  248. void InputA(bool val) { Link->InputA = val;}
  249. void InputB(bool val) { Link->InputB = val;}
  250. void InputL(bool val) { Link->InputL = val;}
  251. void InputR(bool val) { Link->InputR = val;}
  252. void InputEx1(bool val) { Link->InputEx1 = val;}
  253. void InputEx2(bool val) { Link->InputEx2 = val;}
  254. void InputEx3(bool val) { Link->InputEx3 = val;}
  255. void InputEx4(bool val) { Link->InputEx4 = val;}
  256. void InputAxisUp(bool val) { Link->InputAxisUp = val;}
  257. void InputAxisDown(bool val) { Link->InputAxisDown = val;}
  258. void InputAxisLeft(bool val) { Link->InputAxisLeft = val;}
  259. void InputAxisRight(bool val) { Link->InputAxisRight = val;}
  260. void PressStart(bool val) { Link->PressStart = val;}
  261. void PressMap(bool val) { Link->PressMap = val;}
  262. void PressUp(bool val) { Link->PressUp = val;}
  263. void PressDown(bool val) { Link->PressDown = val;}
  264. void PressLeft(bool val) { Link->PressLeft = val;}
  265. void PressRight(bool val) { Link->PressRight = val;}
  266. void PressA(bool val) { Link->PressA = val;}
  267. void PressB(bool val) { Link->PressB = val;}
  268. void PressL(bool val) { Link->PressL = val;}
  269. void PressR(bool val) { Link->PressR = val;}
  270. void PressEx1(bool val) { Link->PressEx1 = val;}
  271. void PressEx2(bool val) { Link->PressEx2 = val;}
  272. void PressEx3(bool val) { Link->PressEx3 = val;}
  273. void PressEx4(bool val) { Link->PressEx4 = val;}
  274. void PressAxisUp(bool val) { Link->PressAxisUp = val;}
  275. void PressAxisDown(bool val) { Link->PressAxisDown = val;}
  276. void PressAxisLeft(bool val) { Link->PressAxisLeft = val;}
  277. void PressAxisRight(bool val) { Link->PressAxisRight = val;}
  278.  
  279. void InputMouseX(int val) { Link->InputMouseX = val;}
  280. void InputMouseY(int val) { Link->InputMouseY = val;}
  281. void InputMouseB(int val) { Link->InputMouseB = val;}
  282. void InputMouseZ(int val) { Link->InputMouseZ = val;}
  283.  
  284. int LinkTile(){ return Link->Tile;}
  285.  
  286. int LinkFlip(){ return Link->Flip;}
  287.  
  288. //int LinkExtend(){ return Link->Extend;}
  289. //void LinkExtend(int ext){ Link->Extend = ext;}
  290.  
  291. int LinkHitHeight(){ return Link->HitHeight;}
  292. void LinkHitHeight(int hith){ Link->HitHeight = hith;}
  293. void LinkHitHeight(int hith, bool change) {
  294.     if ( change ) Link->HitHeight += hith;
  295.     else Link->HitHeight = hith;
  296. }
  297.  
  298.  
  299. int LinkHitWidth(){ return Link->HitWidth;}
  300. void LinkHitWidth(int hitw){ Link->HitWidth = hitw;}
  301. void LinkHitWidth(int hitw, bool change) {
  302.     if ( change ) Link->HitWidth += hitw;
  303.     else Link->HitWidth = hitw;
  304. }
  305.  
  306. int LinkHitZ(){ return Link->HitZHeight;}
  307. void LinkHitZ(int hitz){ Link->HitZHeight = hitz;}
  308. void LinkHitZ(int hitz, bool change) {
  309.     if ( change ) Link->HitZHeight += hitz;
  310.     else Link->HitZHeight = hitz;
  311. }
  312.  
  313. int LinkTileHeight(){ return Link->TileHeight;}
  314. void LinkTileHeight(int tilh){ Link->TileHeight = tilh;}
  315. void LinkTileHeight(int tilh, bool change) {
  316.     if ( change ) Link->TileHeight += tilh;
  317.     else Link->TileHeight = tilh;
  318. }
  319.  
  320.  
  321. int LinkTileWidth(){ return Link->TileWidth;}
  322. void LinkTileWidth(int tilw){ Link->TileWidth = tilw;}
  323. void LinkTileWidth(int tilw, bool change) {
  324.     if ( change ) Link->TileWidth += tilw;
  325.     else Link->TileWidth = tilw;
  326. }
  327.  
  328. int LinkHitX(){ return Link->HitXOffset;}
  329. void LinkHitX(int hitx){ Link->HitXOffset = hitx;}
  330. void LinkHitX(int hitx, bool change) {
  331.     if ( change ) Link->HitXOffset += hitx;
  332.     else Link->HitXOffset = hitx;
  333. }
  334.  
  335.  
  336. int LinkHitY(){ return Link->HitYOffset;}
  337. void LinkHitY(int hity){ Link->HitYOffset = hity;}
  338. void LinkHitY(int hity, bool change) {
  339.     if ( change ) Link->HitYOffset += hity;
  340.     else Link->HitYOffset = hity;
  341. }
  342.  
  343. int LinkDrawX(){ return Link->DrawXOffset;}
  344. void LinkDrawX(int drawx){ Link->DrawXOffset = drawx;}
  345. void LinkDrawX(int drawx, bool change) {
  346.     if ( change ) Link->DrawXOffset += drawx;
  347.     else Link->DrawXOffset = drawx;
  348. }
  349.  
  350.  
  351. int LinkDrawY(){ return Link->DrawYOffset;}
  352. void LinkDrawY(int drawy){ Link->DrawYOffset = drawy;}
  353. void LinkDrawY(int drawy, bool change) {
  354.     if ( change ) Link->DrawYOffset += drawy;
  355.     else Link->DrawYOffset = drawy;
  356. }
  357.  
  358. int LinkDrawZ(){ return Link->DrawZOffset;}
  359. void LinkDrawZ(int drawz){ Link->DrawZOffset = drawz;}
  360. void LinkDrawZ(int drawz, bool change) {
  361.     if ( change ) Link->DrawZOffset += drawz;
  362.     else Link->DrawYOffset = drawz;
  363. }
  364.  
  365. int LinkMisc(int index){ return Link->Misc[index];}
  366. void LinkMisc(int index, float value) { Link->Misc[index] = value;}
  367. void LinkMisc(int index, float value, bool change) {
  368.     if ( change ) Link->Misc[index] += value;
  369.     else Link->Misc[index] = value;
  370. }
  371.  
  372. int GetLinkMisc(int index){ return Link->Misc[index];}
  373. void SetLinkMisc(int index, float value) { Link->Misc[index] = value;}
  374. void ModLinkMisc(int index, float value) { Link->Misc[index] += value;}
  375.  
  376.  
  377. //Link Functions
  378.  
  379. void Warp(int dmap, int screen){
  380.     Link->Warp(dmap,screen);
  381. }
  382.  
  383.  
  384. void PitWarp(int dmap, int screen){
  385.     Link->PitWarp(dmap,screen);
  386. }
  387.  
  388. void SelectAWeapon(int dir) {
  389.     Link->SelectAWeapon(dir);
  390. }
  391.  
  392. void SelectBWeapon(int dir) {
  393.     Link->SelectBWeapon(dir);
  394. }
  395.  
  396. //Returns if an inventory item is true;
  397. bool Inv(int itm){
  398.     return Link->Item[itm];
  399. }
  400.  
  401. //Sets Link->Item, safely.
  402. void Inv(int itm, bool setting){
  403.     if ( Link->Item[itm] != setting ) Link->Item[itm] = setting;
  404. }
  405.  
  406. //Returns if an inventory item is true;
  407. bool Item(int itm){
  408.     return Link->Item[itm];
  409. }
  410.  
  411. //Sets Link->Item, safely.
  412. void Item(int itm, bool setting){
  413.     if ( Link->Item[itm] != setting ) Link->Item[itm] = setting;
  414. }
  415.  
  416. //Namespace Game Functions
  417.  
  418. void ModScreenD(int reg, int amount) {
  419.     Screen->D[reg] += amount;
  420. }
  421.  
  422. int GetCurScreen(){
  423.     return Game->GetCurScreen();
  424. }
  425.  
  426. int GetCurDMap(){
  427.     return Game->GetCurDMap();
  428. }
  429.  
  430. int GetCurMap(){
  431.     return Game->GetCurMap();
  432. }
  433.  
  434. int GetCurDMapScreen(){
  435.     return Game->GetCurDMapScreen();
  436. }
  437.  
  438. int GetCurLevel(){
  439.     return Game->GetCurLevel();
  440. }
  441.  
  442.  
  443. int NumDeaths(){
  444.     return Game->NumDeaths;
  445. }
  446.  
  447. void NumDeaths(int num){
  448.     Game->NumDeaths = num;
  449. }
  450.  
  451. int Cheat(){
  452.     return Game->Cheat;
  453. }
  454.  
  455. void Cheat(int cheatLevel){
  456.     Game->Cheat = cheatLevel;
  457. }
  458.  
  459. int Time(){
  460.     return Game->Time;
  461. }
  462.  
  463. void Time(int t){
  464.     Game->Time = t;
  465. }
  466.  
  467. bool TimeValid(){
  468.     return Game->TimeValid;
  469. }
  470.  
  471. void TimeValid(bool t){
  472.     Game->TimeValid = t;
  473. }
  474.  
  475. bool HasPlayed(){
  476.     return Game->HasPlayed;
  477. }
  478.  
  479. void HasPlayed(bool a){
  480.     Game->HasPlayed = a;
  481. }
  482.  
  483. bool Standalone(){
  484.     return Game->Standalone;
  485. }
  486.  
  487. int ContinueDMap(){
  488.     return Game->ContinueDMap;
  489. }
  490.  
  491. void ContinueDMap(int dmap){
  492.     Game->ContinueDMap = dmap;
  493. }
  494.  
  495. int ContinueScreen(){
  496.     return Game->ContinueScreen;
  497. }
  498.  
  499. void ContinueScreen(int scr){
  500.     Game->ContinueScreen = scr;
  501. }
  502.  
  503. int LastEntranceDMap(){
  504.     return Game->LastEntranceDMap;
  505. }
  506.  
  507. void LastEntranceDMap(int dmap){
  508.     Game->LastEntranceDMap = dmap;
  509. }
  510.  
  511. int LastEntranceScreen(){
  512.     return Game->LastEntranceScreen;
  513. }
  514.  
  515. void LastEntranceScreen(int scr){
  516.     Game->LastEntranceScreen = scr;
  517. }
  518.  
  519. int Counter(int ctr){
  520.     return Game->Counter[ctr];
  521. }
  522.  
  523. void Counter(int ctr, int val){
  524.     Game->Counter[ctr] = val;
  525. }
  526.  
  527. void Counter(int ctr, bool bump){
  528.     if ( bump ) {
  529.         Game->Counter[ctr]++;
  530.     }
  531.     else Game->Counter[ctr]--;
  532. }
  533.  
  534. void Counter(int ctr, bool bump, int val){
  535.     if ( bump ) {
  536.         Game->Counter[ctr] += val;
  537.     }
  538.     else Game->Counter[ctr] -= val;
  539. }
  540.  
  541. int MCounter(int ctr){
  542.     return Game->MCounter[ctr];
  543. }
  544.  
  545. void MCounter(int ctr, int val){
  546.     Game->MCounter[ctr] = val;
  547. }
  548.  
  549. void MCounter(int ctr, bool bump){
  550.     if ( bump ) {
  551.         Game->MCounter[ctr]++;
  552.     }
  553.     else Game->MCounter[ctr]--;
  554. }
  555.  
  556. void MCounter(int ctr, bool bump, int val){
  557.     if ( bump ) {
  558.         Game->MCounter[ctr] += val;
  559.     }
  560.     else Game->MCounter[ctr] -= val;
  561. }
  562.  
  563. int DCounter(int ctr){
  564.     return Game->DCounter[ctr];
  565. }
  566.  
  567. void DCounter(int ctr, int val){
  568.     Game->DCounter[ctr] = val;
  569. }
  570.  
  571. void DCounter(int ctr, bool bump){
  572.     if ( bump ) {
  573.         Game->DCounter[ctr]++;
  574.     }
  575.     else Game->DCounter[ctr]--;
  576. }
  577.  
  578. void DCounter(int ctr, bool bump, int val){
  579.     if ( bump ) {
  580.         Game->DCounter[ctr] += val;
  581.     }
  582.     else Game->DCounter[ctr] -= val;
  583. }
  584.  
  585.  
  586. int NumHeartPieces(){
  587.     return Game->Generic[GEN_HEARTPIECES];
  588. }
  589.  
  590. void NumHeartPieces(int num){
  591.     Game->Generic[GEN_HEARTPIECES] = num;
  592. }
  593.  
  594. void NumHeartPieces(int num, bool increase){
  595.     Game->Generic[GEN_HEARTPIECES] += num;
  596. }
  597.  
  598. int MagicDrainRate(){
  599.     return Game->Generic[GEN_MAGICDRAINRATE] ;
  600. }
  601.  
  602. void MagicDrainRate(int amount){
  603.     Game->Generic[GEN_MAGICDRAINRATE] = amount;
  604. }
  605.  
  606. int CanSlash(){
  607.     return Game->Generic[GEN_CANSLASH];
  608. }
  609.  
  610. void CanSlash(bool canSlash){
  611.     if ( canSlash ) {
  612.         Game->Generic[GEN_CANSLASH] = 1;
  613.     }
  614.     else {
  615.         Game->Generic[GEN_CANSLASH] = 0;
  616.     }
  617. }
  618.  
  619. int WarpLevel(){
  620.     return Game->Generic[GEN_WARPLEVEL];
  621. }
  622.  
  623. void WarpLevel(int warpSpot){
  624.     Game->Generic[GEN_WARPLEVEL] = warpSpot;
  625. }
  626.  
  627. int HeartPiecesPerHC(){
  628.     return Game->Generic[GEN_HCPPERHC];
  629. }
  630.  
  631. void HeartPiecesPerHC(int num){
  632.     Game->Generic[GEN_HCPPERHC] = num;
  633. }
  634.  
  635. int ContinueHearts(){
  636.     return Game->Generic[GEN_CONTINUEHEARTS];
  637. }
  638.  
  639. void ContinueHearts(int hearts){
  640.     Game->Generic[GEN_CONTINUEHEARTS] = hearts;
  641. }
  642.  
  643. int ContinueIsPercent(){
  644.     return Game->Generic[GEN_CONTINUEISPERCENT];
  645. }
  646.  
  647. void ContinueIsPercent(int perc){
  648.     Game->Generic[GEN_CONTINUEISPERCENT] = perc;
  649. }
  650.  
  651. int LevelKeys(int lvl){
  652.     return Game->LKeys[lvl];
  653. }
  654.  
  655. void LevelKeys(int lvl, int amt){
  656.     Game->LKeys[lvl] += amt;
  657. }
  658.  
  659. void LevelKeys(int lvl, int amt, bool set){
  660.     Game->LKeys[lvl] = amt;
  661. }
  662.  
  663. //Shortcuts to Class and Namespace functions
  664.  
  665. //Screen functions.
  666.  
  667. int ComboD(int pos){
  668.     return Screen->ComboD[pos];
  669. }
  670.  
  671. int ComboT(int pos){
  672.     return Screen->ComboT[pos];
  673. }
  674.  
  675. int ComboF(int pos){
  676.     return Screen->ComboF[pos];
  677. }
  678.  
  679. int ComboI(int pos){
  680.     return Screen->ComboI[pos];
  681. }
  682.  
  683. int ComboC(int pos){
  684.     return Screen->ComboC[pos];
  685. }
  686.  
  687. int ComboS(int pos){
  688.     return Screen->ComboS[pos];
  689. }
  690.  
  691.  
  692. void ComboD(int pos, int comboID){
  693.     Screen->ComboD[pos] = comboID;
  694. }
  695.  
  696. void ComboT(int pos, int type){
  697.     Screen->ComboT[pos] = type;
  698. }
  699.  
  700. void ComboF(int pos, int flag){
  701.     Screen->ComboF[pos] = flag;
  702. }
  703.  
  704. void ComboI(int pos, int inhFlag){
  705.     Screen->ComboI[pos] = inhFlag;
  706. }
  707.  
  708. void ComboC(int pos, int cset){
  709.     Screen->ComboC[pos] = cset;
  710. }
  711.  
  712. void ComboS(int pos, int solidity){
  713.     Screen->ComboS[pos] = solidity;
  714. }
  715.  
  716. bool GetComboD(int pos, int comboID){
  717.     if ( Screen->ComboD[pos] == comboID ) return true;
  718.     return false;
  719. }
  720.  
  721. bool GetComboT(int pos, int type){
  722.     if ( Screen->ComboT[pos] == type ) return true;
  723.     return false;
  724. }
  725.  
  726. bool GetComboF(int pos, int flag){
  727.     if ( Screen->ComboF[pos] == flag ) return true;
  728.     return false;
  729. }
  730.  
  731. bool GetComboI(int pos, int inhFlag){
  732.     if ( Screen->ComboI[pos] == inhFlag ) return true;
  733.     return false;
  734. }
  735.  
  736. bool GetComboC(int pos, int cset, int check){
  737.     if ( Screen->ComboC[pos] == cset ) return true;
  738.     return false;
  739. }
  740.  
  741. bool GetComboS(int pos, int solidity){
  742.     if ( Screen->ComboS[pos] == solidity ) return true;
  743.     return false;
  744. }
  745.  
  746. void SetComboD(int pos, int comboID){
  747.     Screen->ComboD[pos] = comboID;
  748. }
  749.  
  750. void SetComboT(int pos, int type){
  751.     Screen->ComboT[pos] = type;
  752. }
  753.  
  754. void SetComboF(int pos, int flag){
  755.     Screen->ComboF[pos] = flag;
  756. }
  757.  
  758. void SetComboI(int pos, int inhFlag){
  759.     Screen->ComboI[pos] = inhFlag;
  760. }
  761.  
  762. void SetComboC(int pos, int cset){
  763.     Screen->ComboC[pos] = cset;
  764. }
  765.  
  766. void SetComboS(int pos, int solidity){
  767.     Screen->ComboS[pos] = solidity;
  768. }
  769.  
  770.  
  771. int Wavy(){
  772.     return Screen->Wavy;
  773. }
  774.  
  775. void Wavy(int dur){
  776.     Screen->Wavy = dur;
  777. }
  778.  
  779. void Wavy(int dur, int frames){
  780.     for ( int q = 0; q < frames; q++ ){
  781.         Screen->Wavy = dur - q;
  782.         //Do we need a Waitframe here?
  783.     }
  784. }
  785.  
  786. int Quake(){
  787.     return Screen->Quake;
  788. }
  789.  
  790. void Quake(int dur){
  791.     Screen->Quake = dur;
  792. }
  793.  
  794. void Quake(int dur, int frames){
  795.     for ( int q = 0; q < frames; q++ ){
  796.         Screen->Quake = dur - q;
  797.         //Do we need a Waitframe here?
  798.     }
  799. }
  800.  
  801. bool Lit(){
  802.     return Screen->Lit;
  803. }
  804.  
  805. void Lit(bool setting){
  806.     Screen->Lit = setting;
  807. }
  808.  
  809. //void TriggerSecrets(){
  810. //  return Screen->TriggerSecrets();
  811. //}
  812.  
  813. void TriggerSecrets(bool triggered){
  814.     Screen->TriggerSecrets();
  815. }
  816.  
  817. void TriggerSecrets(int state){
  818.     Screen->State[ST_SECRET] = state;
  819.     Screen->TriggerSecrets();
  820. }
  821.  
  822.  
  823.  
  824. int MovingBlockX(){ return Screen->MovingBlockX;}
  825. int MovingBlockY(){ return Screen->MovingBlockY;}
  826. int MovingBlockCombo(){ return Screen->MovingBlockCombo;}
  827. int MovingBlockCSet(){ return Screen->MovingBlockCSet;}
  828.  
  829. int UnderCSet(){ return Screen->UnderCSet;}
  830. void UnderCSet(int value){ Screen->UnderCSet = value;}
  831.  
  832. int UnderCombo(){ return Screen->UnderCombo;}
  833. void UnderCombo(int value){ Screen->UnderCombo = value;}
  834.  
  835. int RoomType(){return Screen->RoomType;}
  836. int RoomData(){return Screen->RoomData;}
  837. void RoomData(int val){Screen->RoomData = val;}
  838. //void TriggerSecrets(){Screen->TriggerSecrets();}
  839. //bool Lit(){return Screen->Lit;}
  840. void Lit(int val){Screen->Lit = val;}
  841.  
  842. void SetSideWarp(int warp, int screen, int dmap, int type){
  843.     Screen->SetSideWarp(warp, screen, dmap, type);
  844. }
  845.  
  846. void SetTileWarp(int warp, int screen, int dmap, int type){
  847.     Screen->SetTileWarp(warp, screen, dmap, type);
  848. }
  849.  
  850.  
  851. void GetSideWarpDMap(int warp){
  852.     Screen->GetSideWarpDMap(warp);
  853. }
  854.  
  855. void GetSideWarpScreen(int warp){
  856.     Screen->GetSideWarpScreen(warp);
  857. }
  858.  
  859.  
  860. void GetSideWarpType(int warp){
  861.     Screen-> GetSideWarpType(warp);
  862. }
  863.  
  864. void GetTileWarpDMap(int warp){
  865.     Screen->GetTileWarpDMap(warp);
  866. }
  867.  
  868. void GetTileWarpScreen(int warp){
  869.     Screen->GetTileWarpScreen(warp);
  870. }
  871.  
  872. void GetTileWarpType(int warp){
  873.     Screen->GetTileWarpType(warp);
  874. }
  875.  
  876. int LayerMap(int n){
  877.     return Screen->LayerMap(n);
  878. }
  879.  
  880. int LayerScreen(int n){
  881.     return Screen->LayerScreen(n);
  882. }
  883.  
  884. int NumItems(){
  885.     return Screen->NumItems();
  886. }
  887.  
  888. void LoadItem(int itm){
  889.     Screen->LoadItem(itm);
  890. }
  891.  
  892. void CreateItem(int id){
  893.     Screen->CreateItem(id);
  894. }
  895.  
  896. ffc LoadFFC(int num){
  897.     return Screen->LoadFFC(num);
  898. }
  899.  
  900. int NumNPCs(){
  901.     return Screen->NumNPCs();
  902. }
  903.  
  904. void LoadNOC(int num){
  905.     Screen->LoadNPC(num);
  906. }
  907.  
  908. void CreateNPC(int id){
  909.     Screen->CreateNPC(id);
  910. }
  911.  
  912. int NumLWeapons(){
  913.     return Screen->NumLWeapons();
  914. }
  915.  
  916. void LoadLWeapon(int num){
  917.     Screen->LoadLWeapon(num);
  918. }
  919.  
  920. void CreateLWeapon(int type){
  921.     Screen->CreateLWeapon(type);
  922. }
  923.  
  924. int NumEWeapons(){
  925.     return Screen->NumEWeapons();
  926. }
  927.  
  928. void LoadEWeapon(int num){
  929.     Screen->LoadEWeapon(num);
  930. }
  931.  
  932. void CreateEWeapon(int type){
  933.     Screen->CreateEWeapon(type);
  934. }
  935.  
  936. bool isSolid(int x, int y){
  937.     return Screen->isSolid(x,y);
  938. }
  939.  
  940. void ClearSprites(int spritelist){
  941.     Screen->ClearSprites(spritelist);
  942. }
  943.  
  944. //Drawing
  945.  
  946. void Rectangle(int layer, int x, int y, int x2, int y2, int color, float scale, int rx, int ry, int rangle, bool fill, int opacity){
  947.     Screen->Rectangle(layer, x, y, x2, y2, color, scale, rx, ry, rangle, fill, opacity);
  948. }
  949.  
  950. void Circle(int layer, int x, int y, int radius, int color, float scale, int rx, int ry, int rangle, bool fill, int opacity){
  951.     Screen->Circle(layer, x, y, radius, color, scale, rx, ry, rangle, fill, opacity);
  952. }
  953.  
  954. void Arc(int layer, int x, int y, int radius, int startangle, int endangle, int color, float scale, int rx, int ry, int rangle, bool closed, bool fill, int opacity){
  955.     Screen->Arc(layer, x, y, radius, startangle, endangle, color, scale, rx, ry, rangle, closed, fill, opacity);
  956. }
  957.  
  958. void Ellipse(int layer, int x, int y, int xradius, int yradius, int color, float scale, int rx, int ry, int rangle, bool fill, int opacity){
  959.     Screen->Ellipse(layer, x, y, xradius, yradius, color, scale, rx, ry, rangle, fill, opacity);
  960. }
  961.  
  962. void Spline(int layer, int x1, int y1, int x2, int y2, int x3, int y3,int x4, int y4, int color, int opacity){
  963.     Screen->Spline(layer, x1, y1, x2, y2, x3, y3, x4, y4, color, opacity);
  964. }
  965.  
  966. void Line(int layer, int x, int y, int x2, int y2, int color, float scale, int rx, int ry, int rangle, int opacity){
  967.     Screen->Line(layer, x, y, x2, y2, color, scale, rx, ry, rangle, opacity);
  968. }
  969.  
  970. void PutPixel(int layer, int x, int y, int color, int rx, int ry, int rangle, int opacity){
  971.     Screen->PutPixel(layer, x, y, color, rx, ry, rangle, opacity);
  972. }
  973.  
  974. void DrawTile(int layer, int x, int y, int tile, int blockw, int blockh, int cset, int xscale, int yscale, int rx, int ry, int rangle, int flip, bool transparency, int opacity){
  975.     Screen->DrawTile(layer, x, y, tile, blockw, blockh, cset, xscale, yscale, rx, ry, rangle, flip, transparency, opacity);
  976. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×