Permalink
Browse files

2001 version

  • Loading branch information...
0 parents commit 219f1d69833751c68ee94a8414dff39e3b3d57e9 @KuiKui committed Apr 10, 2012
Showing with 23,918 additions and 0 deletions.
  1. BIN BMTools.dll
  2. BIN BMTools.lib
  3. +483 −0 BMTools/BMAnim.cpp
  4. +74 −0 BMTools/BMAnims.h
  5. +209 −0 BMTools/BMBombs.cpp
  6. +55 −0 BMTools/BMBombs.h
  7. +201 −0 BMTools/BMBonus.cpp
  8. +52 −0 BMTools/BMBonus.h
  9. +299 −0 BMTools/BMClient.cpp
  10. +46 −0 BMTools/BMClient.h
  11. +282 −0 BMTools/BMClientServer.cpp
  12. +218 −0 BMTools/BMClientServer.h
  13. +1,009 −0 BMTools/BMConsole.cpp
  14. +232 −0 BMTools/BMConsole.h
  15. +538 −0 BMTools/BMConsoleBasicCommands.cpp
  16. +158 −0 BMTools/BMConsoleScript.cpp
  17. +332 −0 BMTools/BMConsoleUI.cpp
  18. +124 −0 BMTools/BMDebug.cpp
  19. +39 −0 BMTools/BMDebug.h
  20. +490 −0 BMTools/BMEntity.cpp
  21. +67 −0 BMTools/BMEntity.h
  22. +59 −0 BMTools/BMEntity.org
  23. +142 −0 BMTools/BMFile.cpp
  24. +31 −0 BMTools/BMFile.h
  25. +178 −0 BMTools/BMGame.cpp
  26. +39 −0 BMTools/BMGame.h
  27. +50 −0 BMTools/BMGlobalInclude.h
  28. +746 −0 BMTools/BMGlobalInit.cpp
  29. +93 −0 BMTools/BMGlobalInit.h
  30. +167 −0 BMTools/BMImage.cpp
  31. +42 −0 BMTools/BMImage.h
  32. +107 −0 BMTools/BMKeys.h
  33. +153 −0 BMTools/BMList.cpp
  34. +40 −0 BMTools/BMList.h
  35. +1,167 −0 BMTools/BMMap.cpp
  36. +135 −0 BMTools/BMMap.h
  37. +633 −0 BMTools/BMMenu.cpp
  38. +77 −0 BMTools/BMMenu.h
  39. +261 −0 BMTools/BMMenuBehavior.cpp
  40. +290 −0 BMTools/BMPlayer.cpp
  41. +93 −0 BMTools/BMPlayer.h
  42. +276 −0 BMTools/BMServer.cpp
  43. +17 −0 BMTools/BMServer.h
  44. +599 −0 BMTools/BMSprite.cpp
  45. +78 −0 BMTools/BMSprite.h
  46. +29 −0 BMTools/BMTimer.h
  47. +767 −0 BMTools/BMTools.dep
  48. BIN BMTools/BMTools.dll
  49. BIN BMTools/BMTools.lib
  50. +754 −0 BMTools/BMUIFont.cpp
  51. +73 −0 BMTools/BMUIFont.h
  52. +2,075 −0 BMTools/BMUIOS.cpp
  53. +260 −0 BMTools/BMUIOS.h
  54. +182 −0 BMTools/BMWin32.cpp
  55. +43 −0 BMTools/BMWin32.h
  56. +318 −0 BMTools/BMWin32Console.cpp
  57. +127 −0 BMTools/BMWin32Keys.cpp
  58. +38 −0 BMTools/BMWin32Keys.h
  59. +169 −0 BMTools/BMWin32Timer.cpp
  60. +35 −0 BMTools/BMWin32Type.h
  61. BIN BaseMOD.dll
  62. +115 −0 BaseMOD/BMod.h
  63. +23 −0 BaseMOD/BModClose.cpp
  64. +74 −0 BaseMOD/BModInit.cpp
  65. +817 −0 BaseMOD/BModProceed.cpp
  66. +302 −0 BaseMOD/BaseMOD.cpp
  67. +121 −0 BaseMOD/BaseMOD.dep
  68. BIN BaseMOD/BaseMOD.dll
  69. +42 −0 BomberMan.cpp
  70. +29 −0 Bomberman.dep
  71. BIN Bomberman.exe
  72. BIN Data/Console/backconsole.bmp
  73. +16 −0 Data/Fire/fire.spr
  74. BIN Data/Fire/fire_boom.kms
  75. BIN Data/Fire/fire_center.kms
  76. BIN Data/Fire/fire_down.kms
  77. BIN Data/Fire/fire_horizon.kms
  78. BIN Data/Fire/fire_left.kms
  79. BIN Data/Fire/fire_right.kms
  80. BIN Data/Fire/fire_up.kms
  81. BIN Data/Fire/fire_vertical.kms
  82. +18 −0 Data/Font/FontModel.txt
  83. BIN Data/Font/font.bmp
  84. BIN Data/Font/minifont.bmp
  85. BIN Data/Items/bomb.kms
  86. +9 −0 Data/Items/bomb.spr
  87. +40 −0 Data/Map/Bomberman.fie
  88. +29 −0 Data/Map/Map description.txt
  89. BIN Data/Map/background0.bmp
  90. BIN Data/Map/brique.kms
  91. BIN Data/Map/items.bmp
  92. BIN Data/Map/pierre.kms
  93. BIN Data/Menu/Menu.bmp
  94. BIN Data/Menu/cursor2.bmp
  95. +20 −0 Data/Menu/menu.txt
  96. +15 −0 Data/Menu/newgame.txt
  97. +14 −0 Data/Menu/setup.txt
  98. BIN Data/Menu/tools.bmp
  99. BIN Data/Menu/windowback.bmp
  100. +24 −0 Data/Perso/Perso.spr
  101. BIN Data/Perso/bas_move.kms
  102. BIN Data/Perso/bas_stop.kms
  103. BIN Data/Perso/droite_move.kms
  104. BIN Data/Perso/droite_stop.kms
  105. BIN Data/Perso/gauche_move.kms
  106. BIN Data/Perso/gauche_stop.kms
  107. BIN Data/Perso/haut_move.kms
  108. BIN Data/Perso/haut_stop.kms
  109. BIN Data/Perso/items.bmp
  110. +14 −0 Data/SpriteModel.txt
  111. +11 −0 Data/UserConfig.cfg
  112. BIN Docs/index.chm
  113. BIN KMLLight.dll
  114. BIN KMLLight.lib
  115. +31 −0 KMLLight/KMLLight.dep
  116. BIN KMLLight/KMLLight.dll
  117. BIN KMLLight/KMLLight.lib
  118. +740 −0 KMLLight/control.cpp
  119. +1,303 −0 KMLLight/direct.cpp
  120. +830 −0 KMLLight/images.cpp
  121. +892 −0 KMLLight/kmllight.h
  122. +741 −0 KMLLight/memory.cpp
  123. +714 −0 KMLLight/pack.cpp
  124. +1,558 −0 KMLLight/sound.cpp
  125. +125 −0 bmtodo.txt
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,74 @@
+#ifndef __BMANIM_H__
+#define __BMANIM_H__
+
+#include "BMGlobalInclude.h"
+
+//--------------------------------
+// Structures
+//--------------------------------
+
+typedef struct
+{
+ STRING *FileName; //name of the KMS
+ BMLIST *ListFrames; //list of the frames of the anim, BMANIMFRAME...
+ KMLIMAGE *Image; //pointer to image
+ UDWORD NumberUsed; //Number of instance of this model
+}ANIMMODEL;
+
+typedef struct
+{
+ UDWORD AnimFrameUCoords; //coord u from uv
+ UDWORD AnimFrameVCoords; //coord v from uv
+ UDWORD AnimFrameWidth; //width of animation
+ UDWORD AnimFrameHeight; //height of animation
+ UDWORD AnimFrameTimeDuration; //time to keep this frame in ms
+
+}BMANIMFRAME;
+
+typedef struct
+{
+ UBYTE IsPlaying; //1 if the anim is playing
+ UDWORD AnimTimeFrame; //Time to keep the current frame active
+ BMNODE *CurrentFrame; //The current node which point to the frame to display (BMANIMFRAME..)
+ ANIMMODEL *Model; //Model of the anim
+}BMANIM;
+
+typedef struct
+{
+ UDWORD NumberUsed; //Number of time the image is used
+ KMLIMAGE *Image; //ptr to the image
+}BMANIMIMAGE;
+
+//--------------------------------
+// Globals Debug Memory
+//--------------------------------
+extern SDWORD BMAnimMemory;
+
+//--------------------------------
+// Globales
+//--------------------------------
+
+extern BMLIST *AnimsListe; //list of create anims
+extern BMLIST *AnimModel; //list of anim model
+
+//--------------------------------
+// Fonctions
+//--------------------------------
+
+extern SBYTE BMAnimStart ();
+extern SBYTE BMAnimEnd ();
+
+extern SBYTE BMAnimAddModel (STRING *pszFichier, STRING *pszPath = NULL);
+
+extern SBYTE BMAnimAdd (BMANIM **Anim, STRING *pszFichier, STRING *pszPath = NULL);
+extern SBYTE BMAnimDelete (BMANIM *AnimToDelete);
+
+extern SBYTE BMAnimPlay (BMANIM *AnimToPlay);
+//extern SBYTE BMAnimPlay (BMANIM *AnimToPlay, UDWORD *TimeToKeepFrame);
+
+//extern SBYTE BMAnimUpdate (BMANIM *Anim, UDWORD *TimeToKeepFrame);
+extern SBYTE BMAnimUpdate (BMANIM *Anim);
+
+extern SBYTE BMAnimDisplay (BMANIM *Anim, UWORD CoordX, UWORD CoordY);
+
+#endif
@@ -0,0 +1,209 @@
+#include "BMBombs.h"
+
+//--------------------------------
+// Globales
+//--------------------------------
+SDWORD BMBombsMemory = 0; //Allocate memory
+
+BMLIST *ListBombs; //List of the entity, BMBOMBS.
+CALLBACKFUNCTION BMBombsCallBack; //CallBack to Call to free a bonus
+
+//*********************************************************************
+//* FUNCTION: BMBombsStart
+//*--------------------------------------------------------------------
+//* DESCRIPT: Start the bombs API, create the lists ..
+//*
+//*--------------------------------------------------------------------
+//* IN : void
+//*--------------------------------------------------------------------
+//* OUT : return code
+//*--------------------------------------------------------------------
+//* AUTHOR : MikE 25/01/2001 09:47:36
+//* REVISION:
+//*********************************************************************
+SBYTE BMBombsStart ()
+{
+ BMBombsCallBack = NULL;
+ ListBombs = BMListNew ();
+
+ return (BMTRUE);
+}
+
+
+//*********************************************************************
+//* FUNCTION: BMBonusEnd
+//*--------------------------------------------------------------------
+//* DESCRIPT: End the bonus API, clean the lists
+//*
+//*--------------------------------------------------------------------
+//* IN : void
+//*--------------------------------------------------------------------
+//* OUT : return code
+//*--------------------------------------------------------------------
+//* AUTHOR : MikE 25/01/2001 10:39:47
+//* REVISION:
+//*********************************************************************
+SBYTE BMBombsEnd ()
+{
+ while (ListBombs->First->Next != NULL)
+ {
+ if (BMBombsDelete ( (BMBOMBS *)ListBombs->First->Info) != BMTRUE)
+ return (BMTRUE - 1);
+ //we don't erase the node, it's the function deleteentity which does that feature !!
+ }
+ BMListDelete (ListBombs);
+
+ return (BMTRUE);
+}
+
+
+//*********************************************************************
+//* FUNCTION: BMBombsAdd
+//*--------------------------------------------------------------------
+//* DESCRIPT: Add a bomb
+//*
+//*--------------------------------------------------------------------
+//* IN : ptr to the new bombs, type of the bomb, time when it does explode, filename, path (can be NULL)
+//*--------------------------------------------------------------------
+//* OUT : return code
+//*--------------------------------------------------------------------
+//* AUTHOR : MikE 25/01/2001 10:40:11
+//* REVISION:
+//*********************************************************************
+SBYTE BMBombsAdd (BMBOMBS **NewBombs, SDWORD Type, UDWORD TimeExplode, STRING *FileName, STRING *pszPath)
+{
+ BMENTITY *NewEnt;
+
+ (*NewBombs) = (BMBOMBS *) ALLOC2 (sizeof (BMBOMBS),BMBombsMemory);
+
+ if (BMEntityAdd (&NewEnt, *NewBombs, FileName, BMENTITY_BOMBS) != BMTRUE) //Create the entity
+ return (BMTRUE - 1); //Error, can't create the entity
+
+ (*NewBombs)->Type = Type;
+ (*NewBombs)->Entity = NewEnt;
+ (*NewBombs)->ModDatas = NULL;
+ (*NewBombs)->TimeExplode = BMTimerGetTime () + TimeExplode;
+
+ BMListAddTail (ListBombs, *NewBombs);
+
+ return (BMTRUE);
+}
+
+//*********************************************************************
+//* FUNCTION: BMBombsDelete
+//*--------------------------------------------------------------------
+//* DESCRIPT: delete the bombs, and remove it from the list
+//*
+//*--------------------------------------------------------------------
+//* IN : the bombs
+//*--------------------------------------------------------------------
+//* OUT : return code
+//*--------------------------------------------------------------------
+//* AUTHOR : MikE 25/01/2001 10:41:17
+//* REVISION:
+//*********************************************************************
+SBYTE BMBombsDelete (BMBOMBS *Bombs)
+{
+ BMNODE *Courant;
+ BMNODE *Suivant;
+
+ Courant = ListBombs->First;
+
+ while (Suivant = Courant->Next)
+ {
+ if ( (BMBOMBS *)Courant->Info == Bombs)
+ {
+ if (BMEntityDelete (Bombs->Entity) != BMTRUE)
+ return (BMTRUE - 1);
+
+ //Call the callback of the mod...
+ if (BMBombsCallBack)
+ (*BMBombsCallBack)(Bombs);
+
+ FREE2 (Bombs, BMBombsMemory);
+
+ BMDeleteNode (Courant);
+
+ return (BMTRUE);
+ }
+ Courant = Suivant;
+ }
+
+
+ return (BMTRUE - 1);
+}
+
+//*********************************************************************
+//* FUNCTION: BMBombsDisplay
+//*--------------------------------------------------------------------
+//* DESCRIPT: display the specified bombs
+//*
+//*--------------------------------------------------------------------
+//* IN : the bombs to display
+//*--------------------------------------------------------------------
+//* OUT : return code
+//*--------------------------------------------------------------------
+//* AUTHOR : MikE 25/01/2001 10:41:51
+//* REVISION:
+//*********************************************************************
+SBYTE BMBombsDisplay (BMBOMBS *Bombs)
+{
+ if (BMEntityDisplay(Bombs->Entity) != BMTRUE)
+ return (BMTRUE - 1);
+
+ return (BMTRUE);
+}
+
+//*********************************************************************
+//* FUNCTION: BMBombsSetCallBack
+//*--------------------------------------------------------------------
+//* DESCRIPT: set the callback for cleaning dynamic allocation (of moddatas)
+//*
+//*--------------------------------------------------------------------
+//* IN : the funcion
+//*--------------------------------------------------------------------
+//* OUT : return code
+//*--------------------------------------------------------------------
+//* AUTHOR : MikE 25/01/2001 10:42:23
+//* REVISION:
+//*********************************************************************
+SBYTE BMBombsSetCallBack (CALLBACKFUNCTION Function)
+{
+ BMBombsCallBack = Function;
+ return (BMTRUE);
+}
+
+
+//**************************************************************
+/** \fn SBYTE BMBombsResetAll ()
+ *
+ * \param void
+ *
+ * \return BMTRUE or BMFALSE
+ *
+ ***************************************************************
+ * \brief
+ *
+ * \author MikE \date 12/04/2001 13:47:10
+ ***************************************************************/
+SBYTE BMBombsResetAll ()
+{
+ while (ListBombs->First->Next)
+ {
+ if (BMEntityDelete ( ((BMBOMBS *)ListBombs->First->Info)->Entity) != BMTRUE)
+ return (BMTRUE - 1);
+
+ //Call the callback of the mod...
+ if (BMBombsCallBack)
+ (*BMBombsCallBack)(((BMBOMBS *)ListBombs->First->Info));
+
+ FREE2 (ListBombs->First->Info, BMBombsMemory);
+
+ BMDeleteNode (ListBombs->First);
+
+ }
+
+ return (BMTRUE);
+}
+
+
@@ -0,0 +1,55 @@
+#ifndef __BMBOMBS_H__
+#define __BMBOMBS_H__
+
+#include "BMGlobalInclude.h"
+#include "BMSprite.h"
+#include "BMEntity.h"
+#include "BMTimer.h"
+
+//--------------------------------
+// Defines
+//--------------------------------
+
+#define BMBOMBS_NORMAL 1
+#define BMBOMBS_TR 2
+#define BMBOMBS_GOUTTE 3
+#define BMBOMBS_JE_T_EMMERDE_KUIKUI 4
+#define BMBOMBS_FLAMES 5
+
+//--------------------------------
+// Structures
+//--------------------------------
+typedef struct
+{
+ SDWORD Type; //Type of bombs
+ UDWORD TimeExplode; //Time when it does explode
+ BMENTITY *Entity; //Ptr to the entity of this bombs
+ void *ModDatas; //Mod specific
+}BMBOMBS;
+
+//--------------------------------
+// Globals Debug Memory
+//--------------------------------
+extern SDWORD BMBombsMemory;
+
+//--------------------------------
+// Globales
+//--------------------------------
+
+
+//--------------------------------
+// Fonctions
+//--------------------------------
+
+extern SBYTE BMBombsStart ();
+extern SBYTE BMBombsEnd ();
+
+EXPORT_DLL SBYTE BMBombsAdd (BMBOMBS **NewBombs, SDWORD Type, UDWORD TimeExplode, STRING *FileName, STRING *pszPath = NULL);
+EXPORT_DLL SBYTE BMBombsDelete (BMBOMBS *Bombs);
+
+extern SBYTE BMBombsDisplay (BMBOMBS *Bombs);
+
+EXPORT_DLL SBYTE BMBombsSetCallBack (CALLBACKFUNCTION Function);
+
+EXPORT_DLL SBYTE BMBombsResetAll ();
+#endif
Oops, something went wrong.

0 comments on commit 219f1d6

Please sign in to comment.