quake2ts 0.0.207 → 0.0.208

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quake2ts",
3
- "version": "0.0.207",
3
+ "version": "0.0.208",
4
4
  "description": "Quake II re-release port to TypeScript with WebGL renderer - A complete game engine with physics, networking, and BSP rendering",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@8.15.7",
@@ -171,23 +171,22 @@ var MessageSystem = class {
171
171
  clearCenterPrint() {
172
172
  this.centerPrintMsg = null;
173
173
  }
174
- drawCenterPrint(renderer, now, layout) {
174
+ drawCenterPrint(cgi3, now, layout) {
175
175
  if (!this.centerPrintMsg) return;
176
176
  if (now > this.centerPrintMsg.startTime + this.centerPrintMsg.duration) {
177
177
  this.centerPrintMsg = null;
178
178
  return;
179
179
  }
180
- this.centerPrintMsg.text.length * 8;
181
180
  const y = layout.CENTER_PRINT_Y;
182
- renderer.drawCenterString(y, this.centerPrintMsg.text);
181
+ cgi3.SCR_DrawCenterString(y, this.centerPrintMsg.text);
183
182
  }
184
- drawNotifications(renderer, now) {
183
+ drawNotifications(cgi3, now) {
185
184
  while (this.notifyMessages.length > 0 && now > this.notifyMessages[0].startTime + this.notifyMessages[0].duration) {
186
185
  this.notifyMessages.shift();
187
186
  }
188
187
  let y = 10;
189
188
  for (const msg of this.notifyMessages) {
190
- renderer.drawString(10, y, msg.text);
189
+ cgi3.SCR_DrawFontString(10, y, msg.text);
191
190
  y += 10;
192
191
  }
193
192
  }
@@ -346,6 +345,8 @@ function CG_DrawHUD(isplit, data, hud_vrect, hud_safe, scale2, playernum, ps) {
346
345
  y += 16;
347
346
  }
348
347
  }
348
+ messageSystem.drawCenterPrint(cgi, timeMs, layout);
349
+ messageSystem.drawNotifications(cgi, timeMs);
349
350
  Draw_Crosshair(cgi, hud_vrect.width, hud_vrect.height);
350
351
  }
351
352
  function CG_GetMessageSystem() {