Commits

GhostlyDeath committed 794587f

Add support for letter frames in ReMooD Data.
* This makes DECORATE -> RMOD a bit easier.
* DECORATE uses letter based while RMOD is zero-indexed.

  • Participants
  • Parent commits 1322a39

Comments (0)

Files changed (1)

 	StateP->DehackEdID = D_RMODGetValueInt(a_Sub, "DeHackEdNum", 0);
 	
 	// Get normal values
-	StateP->frame = D_RMODGetValueInt(a_Sub, "Frame", 0);
 	StateP->tics = D_RMODGetValueInt(a_Sub, "Tics", 0);
 	StateP->RMODFastTics = D_RMODGetValueInt(a_Sub, "FastTics", 0);
 	
+	// GhostlyDeath <April 28, 2012> -- To make DECORATE translation easier I
+	// have decided to add support for A-Z.
+	Value = Z_TableGetValue(a_Sub, "Frame");
+	
+	// Is it a letter?
+	if (Value)
+	{
+		if (toupper(Value[0]) >= 'A' && toupper(Value[1]) <= 'Z')
+			StateP->frame = toupper(Value[0]) - 'A';
+		else
+			StateP->frame = D_RMODGetValueInt(a_Sub, "Frame", 0);
+	}
+	
 	// Get booleans
 	if (D_RMODGetValueBool(a_Sub, "FullBright", false))
 		StateP->frame |= FF_FULLBRIGHT;