forked from NearInfinityBrowser/NearInfinity
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve "Check for invalid opcodes" to include opcode definitions in
effect parameters (e.g. op101, ...) Created new specialized datatype for opcode list representation.
- Loading branch information
Showing
7 changed files
with
57 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Near Infinity - An Infinity Engine Browser and Editor | ||
// Copyright (C) 2001 Jon Olav Hauglid | ||
// See LICENSE.txt for license information | ||
|
||
package org.infinity.datatype; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
import org.infinity.resource.effects.BaseOpcode; | ||
|
||
/** | ||
* Specialized {@link Bitmap} type that represents a list of available effect opcodes. | ||
*/ | ||
public class EffectBitmap extends Bitmap { | ||
public static final String EFFECT_FX = "Effect"; | ||
|
||
public EffectBitmap(ByteBuffer buffer, int offset, int length) { | ||
this(buffer, offset, length, EFFECT_FX); | ||
} | ||
|
||
public EffectBitmap(ByteBuffer buffer, int offset, int length, String name) { | ||
super(buffer, offset, length, name, BaseOpcode.getEffectNames()); | ||
} | ||
|
||
public EffectBitmap(ByteBuffer buffer, int offset, int length, boolean signed) { | ||
this(buffer, offset, length, EFFECT_FX, signed); | ||
} | ||
|
||
public EffectBitmap(ByteBuffer buffer, int offset, int length, String name, boolean signed) { | ||
super(buffer, offset, length, name, BaseOpcode.getEffectNames(), signed); | ||
} | ||
|
||
public EffectBitmap(ByteBuffer buffer, int offset, int length, boolean signed, | ||
boolean showAsHex) { | ||
this(buffer, offset, length, EFFECT_FX, signed, showAsHex); | ||
} | ||
|
||
public EffectBitmap(ByteBuffer buffer, int offset, int length, String name, boolean signed, | ||
boolean showAsHex) { | ||
super(buffer, offset, length, name, BaseOpcode.getEffectNames(), signed, showAsHex); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters