dMZX Forums: Test counter -> Rejected Requests -> Tracker

Jump to content

Report ID 574 Title Test counter
Product Rejected Requests Status Rejected (Severity 0 - None Assigned)
Version - Fixed in -

Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Report ID #574: Test counter

#1 User is offline  
Graham 

  • . "@Master Procrastinator"
  • PipPipPipPip
  • Group: Members
  • Posts: 625
  • Joined: 28-December 12
  • Gender:Male
  • Location:Oregon

Posted 10 February 2013 - 03:33 PM

How about a counter that is set to 1 when in test mode (Alt T) or 0 when just playing the game naturally? Being able to easily set up differences in the game based on wether you are testing it or not would make debugging easier I think. Thanks for your consideration.
Currently working on Servo for MegaZeux, I hope to complete it by the middle of 2015? Who knows...

"Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you’re a mile away and you have their shoes."
-Jack Handey


Page 1 of 1  
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Replies (1 - 4)

#2 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 10 February 2013 - 04:49 PM

Something you can do almost always to see if the game is in test mode is this:

. "this is the temporary file used to back up the unsaved world in test mode"
set "__test.mzx" "FREAD_OPEN"

. "this is a sorta stupid special case usage of FREAD_POS that seeks the end of the file"
set "FREAD_POS" -1

. "If FREAD_POS returns -1, then there is no file open (ie, it doesn't exist)"
if "FREAD_POS" = -1 "noDebugMode"
set "debugMode" 1
: "noDebugMode"

. "always close the file by doing this"
set "" "FREAD_OPEN"


It can be shortened to
set "__test.mzx" "FREAD_OPEN"
set "FREAD_POS" -1
set "debugMode" "('FREAD_POS'>-1)"
set "" "FREAD_OPEN"


That said, it's not 100% foolproof. Adding a counter for this would be easy and look far less horrible in code.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#3 User is offline  
Graham 

  • . "@Master Procrastinator"
  • PipPipPipPip
  • Group: Members
  • Posts: 625
  • Joined: 28-December 12
  • Gender:Male
  • Location:Oregon

Posted 10 February 2013 - 08:35 PM

Ok thanks, that's good to know. I've been setting a counter on the first board I start on when playing a natural (not test game). Basically that counter wouldn't be set when testing because you are starting on whatever board you have open in the editor. Kind of a workaround too, but it does the trick. Still a counter would be cool. Thanks.
Currently working on Servo for MegaZeux, I hope to complete it by the middle of 2015? Who knows...

"Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you’re a mile away and you have their shoes."
-Jack Handey

#4 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 22 March 2015 - 03:45 PM

Updating status to: Rejected

this isn't necessary, as there are multiple ways to already do this, as described
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#5 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

Posted 23 March 2015 - 06:09 PM

Moving to: Rejected Requests


Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

1 User(s) are reading this issue
1 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.2 © 2024  IPS, Inc.