mirror of
https://github.com/NovaSquirrel/Mesen-X.git
synced 2024-05-16 03:00:54 -04:00
Adjust randomBackground condition
This commit is contained in:
parent
2e676c1c65
commit
f7c1975a2c
|
@ -399,6 +399,6 @@ struct HdPackRandomBackgroundCondition : public HdPackCondition
|
|||
|
||||
bool InternalCheckCondition(HdScreenInfo* screenInfo, int x, int y, HdPpuTileInfo* tile) override
|
||||
{
|
||||
return screenInfo->nameTableRandVal[tile->nameTableIdx] >= OperandA;
|
||||
return screenInfo->nameTableRandVal[tile->nameTableIdx] <= OperandA;
|
||||
}
|
||||
};
|
|
@ -181,6 +181,23 @@ The condition is true when the following expression is true:
|
|||
**Syntax**: `<condition>[name - text], frameRange, [divisorValue - integer], [compareValue - integer]`
|
||||
**Example**: `<condition>myCondition,frameRange,8,10` (This condition will be true for the last 2 frames out of every 10 frames)
|
||||
|
||||
#### spriteFrameRange ####
|
||||
|
||||
The spriteFrameRange conditions can be used to conditionally replace sprite tiles based on the number of frames have passed since the sprite is visible on screen.
|
||||
The condition is true when the following expression is true:
|
||||
`[number of frames have passed] % [divisorValue] >= [compareValue]`
|
||||
|
||||
**Syntax**: `<condition>[name - text], spriteFrameRange, [divisorValue - integer], [compareValue - integer]`
|
||||
**Example**: `<condition>myCondition,spriteFrameRange,8,10` (This condition will be true for the last 2 frames out of every 10 frames since the sprite is visible)
|
||||
|
||||
#### randomBackground ####
|
||||
|
||||
The randomBackground conditions can be used to randomly replace background tiles with a given probability.
|
||||
The condition is true when the following expression is true:
|
||||
`[random number between 0 and 1 assigned to the tile] <= [compareValue]`
|
||||
|
||||
**Syntax**: `<condition>[name - text], randomBackground, [compareValue]`
|
||||
**Example**: `<condition>myCondition,randomBackground,0.1` (This condition will be true for 10% of the background tiles)
|
||||
|
||||
### <tile> tag ###
|
||||
|
||||
|
|
Loading…
Reference in a new issue